47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
package main
|
|
|
|
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{},
|
|
}
|
|
}
|