feat: 补齐模块接口契约与管理 API 文档

This commit is contained in:
Nixevol
2026-09-30 06:36:28 +08:00
parent dd5a331db2
commit 22c56d1f35
23 changed files with 1782 additions and 3 deletions
+48
View File
@@ -0,0 +1,48 @@
package identity
import (
"context"
"git.asio.asia/nixevol/NixMsg/internal/protocol"
)
// Stub 是测试用假实现。
type Stub struct{}
func NewStub() *Stub { return &Stub{} }
func (s *Stub) Register(context.Context, RegisterRequest) (RegisterResult, error) {
return RegisterResult{}, ErrNotImplemented
}
func (s *Stub) SelfGet(context.Context, string) (SelfInfo, error) {
return SelfInfo{}, ErrNotImplemented
}
func (s *Stub) SelfUpdate(context.Context, string, *protocol.SelfUpdate) error {
return ErrNotImplemented
}
func (s *Stub) SelfSetTalkPassword(context.Context, string, string) error {
return ErrNotImplemented
}
func (s *Stub) SelfChangeLoginPassword(context.Context, string, string, string) (string, error) {
return "", ErrNotImplemented
}
func (s *Stub) SelfLogout(context.Context, string) error { return ErrNotImplemented }
func (s *Stub) UnlockTalk(context.Context, string, string, string) error {
return ErrNotImplemented
}
func (s *Stub) HasTalkGrant(context.Context, string, string) (bool, error) {
return false, nil
}
func (s *Stub) Disable(context.Context, string) error { return ErrNotImplemented }
func (s *Stub) Enable(context.Context, string) error { return ErrNotImplemented }
func (s *Stub) Delete(context.Context, string) error { return ErrNotImplemented }
var _ Service = (*Stub)(nil)