feat(gateway): wire real services into Gateway API handlers

- Router accepts full Dependencies (memory/voice/orchestrator/WShub)
- Memory API: CRUD + search endpoints with PostgreSQL persistence
- Voice API: STT/TTS endpoints
- Admin dashboard: real uptime + service status
- WebSocket chat: routes to AI-Core orchestrator pipeline
- APIAdapter bridges memory domain model to REST interface
- Smoke test: memory CRUD + session creation verified
This commit is contained in:
Aska committed 2026-08-12 12:04:31 +08:00
1 parent 4a71965686
commit 6811480786
5 files changed
+448 -111

No files matched your search

+5 -5
View File
@@ -8,7 +8,7 @@ import (
)
func TestHealth(t *testing.T) {
r := New(NewStubAuthManager())
r := New(Dependencies{AuthMgr: NewStubAuthManager()})
srv := httptest.NewServer(r)
defer srv.Close()
@@ -25,7 +25,7 @@ func TestHealth(t *testing.T) {
func TestLoginAndProtectedEndpoint(t *testing.T) {
auth := NewStubAuthManager()
r := New(auth)
r := New(Dependencies{AuthMgr: auth})
srv := httptest.NewServer(r)
defer srv.Close()
@@ -57,7 +57,7 @@ func TestLoginAndProtectedEndpoint(t *testing.T) {
func TestLoginWrongPassword(t *testing.T) {
auth := NewStubAuthManager()
r := New(auth)
r := New(Dependencies{AuthMgr: auth})
srv := httptest.NewServer(r)
defer srv.Close()
@@ -75,7 +75,7 @@ func TestLoginWrongPassword(t *testing.T) {
func TestProtectedWithoutToken(t *testing.T) {
auth := NewStubAuthManager()
r := New(auth)
r := New(Dependencies{AuthMgr: auth})
srv := httptest.NewServer(r)
defer srv.Close()
@@ -115,7 +115,7 @@ func TestStubAuthManager(t *testing.T) {
}
func TestCORSHeaders(t *testing.T) {
r := New(NewStubAuthManager())
r := New(Dependencies{AuthMgr: NewStubAuthManager()})
srv := httptest.NewServer(r)
defer srv.Close()