Documentation ¶
Index ¶
- type IAuth
- type IPage
- type IPerm
- type IQuery
- type IRole
- type IRolePerm
- type IUser
- type IUserRole
- type RBAC
- func (self *RBAC) AddPerm(p IPerm) (int64, error)
- func (self *RBAC) AddRole(r IRole) (int64, error)
- func (self *RBAC) AddUser(u IUser) (int64, error)
- func (self *RBAC) DelPerm(p IPerm) error
- func (self *RBAC) DelRole(r IRole) error
- func (self *RBAC) DelUser(u IUser) error
- func (self *RBAC) GetAllByUser(q IQuery) error
- func (self *RBAC) PermList(p IPage) ([]IPerm, error)
- func (self *RBAC) RoleList(p IPage) ([]IRole, error)
- func (self *RBAC) RolePermLink(rp IRolePerm) error
- func (self *RBAC) UserList(p IPage) ([]IUser, error)
- func (self *RBAC) UserRoleLink(ur IUserRole) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAuth ¶
type IAuth interface { AddUser(IUser) (int64, error) // 添加用户 AddRole(IRole) (int64, error) // 添加角色 AddPerm(IPerm) (int64, error) // 添加权限 UserRoleLink(IUserRole) error // 修改用户角色 RolePermLink(IRolePerm) error // 修改角色权限 DelUser(IUser) error // 禁用用户 DelRole(IRole) error // 禁用角色 DelPerm(IPerm) error // 禁用权限 UserList(IPage) ([]IUser, error) // 用户列表 RoleList(IPage) ([]IRole, error) // 角色列表 PermList(IPage) ([]IPerm, error) // 权限列表 GetAllByUser(IQuery) error // 根据用户id获取整个权限信息 }
type RBAC ¶
type RBAC struct{}
func (*RBAC) GetAllByUser ¶
func (*RBAC) RolePermLink ¶
func (*RBAC) UserRoleLink ¶
Click to show internal directories.
Click to hide internal directories.