feat: 补齐模块接口契约与管理 API 文档
This commit is contained in:
+44
-2
@@ -1,4 +1,46 @@
|
||||
package main
|
||||
|
||||
// wire 组装各业务模块。T0.1 仅占位,T0.4 起由各线注册。
|
||||
func wire() {}
|
||||
import (
|
||||
"git.asio.asia/nixevol/NixMsg/internal/app/group"
|
||||
"git.asio.asia/nixevol/NixMsg/internal/app/identity"
|
||||
"git.asio.asia/nixevol/NixMsg/internal/app/message"
|
||||
"git.asio.asia/nixevol/NixMsg/internal/app/port"
|
||||
"git.asio.asia/nixevol/NixMsg/internal/app/presence"
|
||||
"git.asio.asia/nixevol/NixMsg/internal/auth"
|
||||
)
|
||||
|
||||
// appDeps 是 serve 组装出的模块依赖。各线在后续任务中替换假实现为真实实现。
|
||||
type appDeps struct {
|
||||
HashPool auth.HashPool
|
||||
SessionTokens auth.SessionTokens
|
||||
APITokens auth.APITokens
|
||||
LoginLocks auth.LoginLocks
|
||||
|
||||
Messages message.Service
|
||||
Identity identity.Service
|
||||
Groups group.Service
|
||||
Presence presence.Service
|
||||
|
||||
Uplink port.UplinkHandler
|
||||
Downlink port.Downlink
|
||||
Conns port.ConnControl
|
||||
}
|
||||
|
||||
// wire 组装各业务模块的骨架依赖(T0.4:假实现;后续各线替换)。
|
||||
func wire() appDeps {
|
||||
return appDeps{
|
||||
HashPool: auth.NewStubHashPool(),
|
||||
SessionTokens: auth.NewStubSessionTokens(),
|
||||
APITokens: auth.NewStubAPITokens(),
|
||||
LoginLocks: auth.NewStubLoginLocks(),
|
||||
|
||||
Messages: message.NewStub(),
|
||||
Identity: identity.NewStub(),
|
||||
Groups: group.NewStub(),
|
||||
Presence: presence.NewStub(),
|
||||
|
||||
Uplink: port.StubUplinkHandler{},
|
||||
Downlink: &port.StubDownlink{},
|
||||
Conns: &port.StubConnControl{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user