Documentation
¶
Index ¶
- Variables
- func ExecTrans(ctx context.Context, transModel model.ITrans, fn TransFunc) error
- func ExecTransWithLock(ctx context.Context, transModel model.ITrans, fn TransFunc) error
- func GetRootUser() *userPB.User
- func NewNoTrans(ctx context.Context) context.Context
- type LoginService
- type Menu
- func (a *Menu) Create(ctx context.Context, item schema.Menu) (*schema.IDResult, error)
- func (a *Menu) Delete(ctx context.Context, id string) error
- func (a *Menu) Get(ctx context.Context, id string, opts ...schema.MenuQueryOptions) (*schema.Menu, error)
- func (a *Menu) InitData(ctx context.Context, dataFile string) error
- func (a *Menu) Query(ctx context.Context, params schema.MenuQueryParam, ...) (*schema.MenuQueryResult, error)
- func (a *Menu) QueryActions(ctx context.Context, id string) (schema.MenuActions, error)
- func (a *Menu) Update(ctx context.Context, id string, item schema.Menu) error
- func (a *Menu) UpdateStatus(ctx context.Context, id string, status int) error
- type Role
- func (a *Role) Create(ctx context.Context, item schema.Role) (*schema.IDResult, error)
- func (a *Role) Delete(ctx context.Context, id string) error
- func (a *Role) Get(ctx context.Context, id string, opts ...schema.RoleQueryOptions) (*schema.Role, error)
- func (a *Role) Query(ctx context.Context, params schema.RoleQueryParam, ...) (*schema.RoleQueryResult, error)
- func (a *Role) QueryRoleMenus(ctx context.Context, roleID string) (schema.RoleMenus, error)
- func (a *Role) Update(ctx context.Context, id string, item schema.Role) error
- func (a *Role) UpdateStatus(ctx context.Context, id string, status int) error
- type TransFunc
- type User
- func (a *User) Create(ctx context.Context, item schema.User) (*schema.IDResult, error)
- func (a *User) Delete(ctx context.Context, id string) error
- func (a *User) Get(ctx context.Context, id string, opts ...schema.UserQueryOptions) (*schema.User, error)
- func (a *User) Query(ctx context.Context, params schema.UserQueryParam, ...) (*schema.UserQueryResult, error)
- func (a *User) QueryShow(ctx context.Context, params schema.UserQueryParam, ...) (*schema.UserShowQueryResult, error)
- func (a *User) Update(ctx context.Context, id string, item schema.User) error
- func (a *User) UpdateStatus(ctx context.Context, id string, status int) error
Constants ¶
This section is empty.
Variables ¶
BllSet bll注入
View Source
var LoginSet = wire.NewSet(wire.Struct(new(LoginService), "*"), wire.Bind(new(bll.ILogin), new(*LoginService)))
View Source
var MenuSet = wire.NewSet(wire.Struct(new(Menu), "*"), wire.Bind(new(bll.IMenu), new(*Menu)))
MenuSet 注入Menu
View Source
var RoleSet = wire.NewSet(wire.Struct(new(Role), "*"), wire.Bind(new(bll.IRole), new(*Role)))
RoleSet 注入Role
View Source
var UserSet = wire.NewSet(wire.Struct(new(User), "*"), wire.Bind(new(bll.IUser), new(*User)))
UserSet 注入User
Functions ¶
func ExecTransWithLock ¶
ExecTransWithLock 执行事务(加锁)
func GetRootUser ¶
Types ¶
type LoginService ¶
type LoginService struct { Auth auth.Auther UserModel model.IUser UserRoleModel model.IUserRole RoleModel model.IRole RoleMenuModel model.IRoleMenu MenuModel model.IMenu MenuActionModel model.IMenuAction }
Login 登录管理
func (*LoginService) GetCaptcha ¶
func (*LoginService) Verify ¶
func (loginService *LoginService) Verify(ctx context.Context, req *loginPB.LoginParam, res *unified.Response) error
Verify 登录验证
type Menu ¶
type Menu struct { TransModel model.ITrans MenuModel model.IMenu MenuActionModel model.IMenuAction MenuActionResourceModel model.IMenuActionResource }
Menu 菜单管理
func (*Menu) Get ¶
func (a *Menu) Get(ctx context.Context, id string, opts ...schema.MenuQueryOptions) (*schema.Menu, error)
Get 查询指定数据
func (*Menu) Query ¶
func (a *Menu) Query(ctx context.Context, params schema.MenuQueryParam, opts ...schema.MenuQueryOptions) (*schema.MenuQueryResult, error)
Query 查询数据
func (*Menu) QueryActions ¶
QueryActions 查询动作数据
type Role ¶
type Role struct { Enforcer *casbin.SyncedEnforcer TransModel model.ITrans RoleModel model.IRole RoleMenuModel model.IRoleMenu UserModel model.IUser }
Role 角色管理
func (*Role) Get ¶
func (a *Role) Get(ctx context.Context, id string, opts ...schema.RoleQueryOptions) (*schema.Role, error)
Get 查询指定数据
func (*Role) Query ¶
func (a *Role) Query(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleQueryResult, error)
Query 查询数据
func (*Role) QueryRoleMenus ¶
QueryRoleMenus 查询角色菜单列表
type User ¶
type User struct { Enforcer *casbin.SyncedEnforcer TransModel model.ITrans UserModel model.IUser UserRoleModel model.IUserRole RoleModel model.IRole }
User 用户管理
func (*User) Get ¶
func (a *User) Get(ctx context.Context, id string, opts ...schema.UserQueryOptions) (*schema.User, error)
Get 查询指定数据
func (*User) Query ¶
func (a *User) Query(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserQueryResult, error)
Query 查询数据
func (*User) QueryShow ¶
func (a *User) QueryShow(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserShowQueryResult, error)
QueryShow 查询显示项数据
Click to show internal directories.
Click to hide internal directories.