You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
// ================================================================================
|
|
// 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"
|
|
"gf_demo_02/api/user/v1"
|
|
"gf_demo_02/internal/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type (
|
|
IUser interface {
|
|
GetUser(cond g.Map) (user *entity.User, err error)
|
|
GetUserList(ctx context.Context) (users []entity.User, err error)
|
|
AddUser(ctx context.Context, req *user.EditUserReq) error
|
|
UpdateUser(ctx context.Context, req *user.EditUserReq) error
|
|
DeleteUser(ctx context.Context, req *user.DeleteUserReq) error
|
|
SearchUser(ctx context.Context, keyword string) ([]entity.User, 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
|
|
}
|