| 123456789101112131415161718192021222324 |
- package service
- import (
- "UserManager/internal/model"
- "context"
- )
- type IUser interface {
- Register(ctx context.Context, in model.UserRegisterInput) error
- GetList(ctx context.Context, in model.UserListInput) (out *model.UserListOutput, err error)
- GetByPassport(ctx context.Context, passport string) (out *model.UserOutput, err error)
- Login(ctx context.Context, in model.UserLoginInput) (out *model.UserLoginOutput, err error)
- }
- var localUser IUser
- func User() IUser {
- if localUser == nil {
- panic("implement not registered")
- }
- return localUser
- }
- func RegisterUser(i IUser) { localUser = i }
|