feat: 补齐模块接口契约与管理 API 文档
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.asio.asia/nixevol/NixMsg/internal/protocol"
|
||||
)
|
||||
|
||||
// Stub 是测试用假实现。
|
||||
type Stub struct{}
|
||||
|
||||
func NewStub() *Stub { return &Stub{} }
|
||||
|
||||
func (s *Stub) Create(context.Context, string, *protocol.GroupCreate) (CreateResult, error) {
|
||||
return CreateResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Add(context.Context, string, *protocol.GroupAdd) (AddResult, error) {
|
||||
return AddResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Remove(context.Context, string, *protocol.GroupRemove) error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Leave(context.Context, string, *protocol.GroupLeave) error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Transfer(context.Context, string, *protocol.GroupTransfer) error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Rename(context.Context, string, *protocol.GroupRename) error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) Dissolve(context.Context, string, *protocol.GroupDissolve) error {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) List(context.Context, string, *protocol.GroupList) ([]ListItem, string, error) {
|
||||
return nil, "", nil
|
||||
}
|
||||
|
||||
func (s *Stub) Get(context.Context, string, *protocol.GroupGet) (GetResult, error) {
|
||||
return GetResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) AdminCreate(context.Context, string, string, []string) (CreateResult, error) {
|
||||
return CreateResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
func (s *Stub) AdminAddMembers(context.Context, string, []string) (AddResult, error) {
|
||||
return AddResult{}, ErrNotImplemented
|
||||
}
|
||||
|
||||
var _ Service = (*Stub)(nil)
|
||||
Reference in New Issue
Block a user