Documentation ¶
Index ¶
- Variables
- type AdminPermissionDao
- func (r *AdminPermissionDao) Create(db *gorm.DB, TenantId int64, UserId int64, permission []int64) (createErr error)
- func (r *AdminPermissionDao) Delete(db *gorm.DB, id int64) error
- func (r *AdminPermissionDao) DeleteUserPermission(db *gorm.DB, userId int64, roleId int64) error
- func (r *AdminPermissionDao) Find(db *gorm.DB, cnd *sqlcmd.Cnd) (list []sysmodel.AdminPermissions)
- func (r *AdminPermissionDao) IsHasTable(db *gorm.DB)
- func (r *AdminPermissionDao) Revoke(db *gorm.DB, UserId int64, permission []int64) error
- func (r *AdminPermissionDao) RevokeRoleToPermission(db *gorm.DB, roleId int64) error
- type RoleHasPermissionDao
- func (r *RoleHasPermissionDao) Create(db *gorm.DB, roleId int64, permission []int64) error
- func (r *RoleHasPermissionDao) CreateOne(db *gorm.DB, tenantId int64, roleId int64, permissionId int64) (err error)
- func (r *RoleHasPermissionDao) Delete(db *gorm.DB, id int64) error
- func (r *RoleHasPermissionDao) DeleteRolePermission(db *gorm.DB, roleId int64) error
- func (r *RoleHasPermissionDao) Find(db *gorm.DB, cnd *sqlcmd.Cnd) []sysmodel.Permissions
- func (r *RoleHasPermissionDao) GetById(db *gorm.DB, id int64) *sysmodel.RolePermissions
- func (r *RoleHasPermissionDao) GetByRoleId(db *gorm.DB, roleId int64) *sysmodel.RolePermissions
- func (r *RoleHasPermissionDao) IsHasTable(db *gorm.DB)
- func (r *RoleHasPermissionDao) RemovePermission(db *gorm.DB, roleId int64, PermissionId int64) error
- func (r *RoleHasPermissionDao) RoleToPermission(db *gorm.DB, roleId int64, PermissionId int64) bool
- func (r *RoleHasPermissionDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.RolePermissions
- type RolesDao
- func (r *RolesDao) AnyRole(db *gorm.DB, roleId int64) (rolesList []sysmodel.SysRoles)
- func (r *RolesDao) Create(db *gorm.DB, roles *sysmodel.SysRoles) (*sysmodel.SysRoles, error)
- func (r *RolesDao) Delete(db *gorm.DB, id int64) error
- func (r *RolesDao) GetById(db *gorm.DB, id int64) *sysmodel.SysRoles
- func (r *RolesDao) GetByName(db *gorm.DB, name string) *sysmodel.SysRoles
- func (r *RolesDao) IsHasTable(db *gorm.DB)
- func (r *RolesDao) RemoveRole(db *gorm.DB, roleId int64) error
- func (r *RolesDao) RoleInfo(db *gorm.DB, roleId int64) (roles sysmodel.SysRoles)
- func (r *RolesDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.SysRoles
- type UserRoleDao
- func (r *UserRoleDao) Create(db *gorm.DB, appId int64, userId int64, roleId int64) (createErr error)
- func (r *UserRoleDao) Delete(db *gorm.DB, id int64) error
- func (r *UserRoleDao) HasRole(db *gorm.DB, userId int64, roleId int64) bool
- func (r *UserRoleDao) IsHasTable(db *gorm.DB)
- func (r *UserRoleDao) RemoveUserRole(db *gorm.DB, userId int64, roleId int64) error
- func (r *UserRoleDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.UserRoles
Constants ¶
This section is empty.
Variables ¶
View Source
var AdminPermissionRepository = new(AdminPermissionDao)
View Source
var AdminRepository = new(adminRepository)
View Source
var AppInfoRepository = new(appInfoRepository)
View Source
var AuthorityRepository = new(authorityDao)
View Source
var PermissionRepository = new(synPermissionDao)
View Source
var RolePermissionRepository = new(RoleHasPermissionDao)
View Source
var RolesRepository = new(RolesDao)
View Source
var UserRepository = new(userRepository)
View Source
var UserRoleRepository = new(UserRoleDao)
View Source
var UserTokenRepository = new(userTokenRepository)
Functions ¶
This section is empty.
Types ¶
type AdminPermissionDao ¶
type AdminPermissionDao struct { }
func (*AdminPermissionDao) Delete ¶
func (r *AdminPermissionDao) Delete(db *gorm.DB, id int64) error
Delete 主键条件删除
func (*AdminPermissionDao) DeleteUserPermission ¶
func (*AdminPermissionDao) Find ¶
func (r *AdminPermissionDao) Find(db *gorm.DB, cnd *sqlcmd.Cnd) (list []sysmodel.AdminPermissions)
func (*AdminPermissionDao) IsHasTable ¶
func (r *AdminPermissionDao) IsHasTable(db *gorm.DB)
func (*AdminPermissionDao) RevokeRoleToPermission ¶
func (r *AdminPermissionDao) RevokeRoleToPermission(db *gorm.DB, roleId int64) error
type RoleHasPermissionDao ¶
type RoleHasPermissionDao struct { }
func (*RoleHasPermissionDao) CreateOne ¶
func (r *RoleHasPermissionDao) CreateOne(db *gorm.DB, tenantId int64, roleId int64, permissionId int64) (err error)
CreateOne 添加一个角色权限
func (*RoleHasPermissionDao) Delete ¶
func (r *RoleHasPermissionDao) Delete(db *gorm.DB, id int64) error
Delete 主键条件删除
func (*RoleHasPermissionDao) DeleteRolePermission ¶
func (r *RoleHasPermissionDao) DeleteRolePermission(db *gorm.DB, roleId int64) error
DeleteRolePermission 角色ID条件删除
func (*RoleHasPermissionDao) Find ¶
func (r *RoleHasPermissionDao) Find(db *gorm.DB, cnd *sqlcmd.Cnd) []sysmodel.Permissions
Find 返回权限列表(菜单)
func (*RoleHasPermissionDao) GetById ¶
func (r *RoleHasPermissionDao) GetById(db *gorm.DB, id int64) *sysmodel.RolePermissions
func (*RoleHasPermissionDao) GetByRoleId ¶
func (r *RoleHasPermissionDao) GetByRoleId(db *gorm.DB, roleId int64) *sysmodel.RolePermissions
GetByRoleId 查询角色下是否分配有权限
func (*RoleHasPermissionDao) IsHasTable ¶
func (r *RoleHasPermissionDao) IsHasTable(db *gorm.DB)
func (*RoleHasPermissionDao) RemovePermission ¶
func (*RoleHasPermissionDao) RoleToPermission ¶
func (*RoleHasPermissionDao) Take ¶
func (r *RoleHasPermissionDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.RolePermissions
type RolesDao ¶
type RolesDao struct { }
func (*RolesDao) IsHasTable ¶
type UserRoleDao ¶
type UserRoleDao struct { }
func (*UserRoleDao) Delete ¶
func (r *UserRoleDao) Delete(db *gorm.DB, id int64) error
Delete 主键条件删除
func (*UserRoleDao) IsHasTable ¶
func (r *UserRoleDao) IsHasTable(db *gorm.DB)
func (*UserRoleDao) RemoveUserRole ¶
Click to show internal directories.
Click to hide internal directories.