初始化项目框架,完成部分接口开发
This commit is contained in:
37
internal/service/user.go
Normal file
37
internal/service/user.go
Normal file
@ -0,0 +1,37 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IUser interface {
|
||||
Login(ctx context.Context, in *model.UserLoginIn) (out *model.UserLoginOut, err error)
|
||||
Register(ctx context.Context, in *model.UserRegisterIn) (out *model.UserRegisterOut, err error)
|
||||
Info(ctx context.Context, in *model.UserInfoIn) (out *model.UserInfoOut, err error)
|
||||
Delete(ctx context.Context, in *model.UserDeleteIn) (out *model.UserDeleteOut, err error)
|
||||
Code(ctx context.Context, in *model.UserCodeIn) (out *model.UserCodeOut, err error)
|
||||
EditPass(ctx context.Context, in *model.UserEditPassIn) (out *model.UserEditPassOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localUser IUser
|
||||
)
|
||||
|
||||
func User() IUser {
|
||||
if localUser == nil {
|
||||
panic("implement not found for interface IUser, forgot register?")
|
||||
}
|
||||
return localUser
|
||||
}
|
||||
|
||||
func RegisterUser(i IUser) {
|
||||
localUser = i
|
||||
}
|
||||
Reference in New Issue
Block a user