实现角色接口增删改查
This commit is contained in:
36
internal/service/role.go
Normal file
36
internal/service/role.go
Normal file
@ -0,0 +1,36 @@
|
||||
// ================================================================================
|
||||
// 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 (
|
||||
IRole interface {
|
||||
Create(ctx context.Context, in *model.RoleCreateInput) (out *model.CreateOut, err error)
|
||||
Delete(ctx context.Context, in *model.RoleDeleteInput) (out *model.DeleteOut, err error)
|
||||
BatchDelete(ctx context.Context, in *model.BatchDeleteIn) (out *model.DeleteOut, err error)
|
||||
Update(ctx context.Context, in *model.RoleUpdateInput) (out *model.UpdateOut, err error)
|
||||
GetRoleList(ctx context.Context, in *model.RoleListInput) (out *model.RoleListOutput, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localRole IRole
|
||||
)
|
||||
|
||||
func Role() IRole {
|
||||
if localRole == nil {
|
||||
panic("implement not found for interface IRole, forgot register?")
|
||||
}
|
||||
return localRole
|
||||
}
|
||||
|
||||
func RegisterRole(i IRole) {
|
||||
localRole = i
|
||||
}
|
||||
Reference in New Issue
Block a user