repositories

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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) Create

func (r *AdminPermissionDao) Create(db *gorm.DB, TenantId int64, UserId int64, permission []int64) (createErr error)

func (*AdminPermissionDao) Delete

func (r *AdminPermissionDao) Delete(db *gorm.DB, id int64) error

Delete 主键条件删除

func (*AdminPermissionDao) DeleteUserPermission

func (r *AdminPermissionDao) DeleteUserPermission(db *gorm.DB, userId int64, roleId int64) error

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) Revoke

func (r *AdminPermissionDao) Revoke(db *gorm.DB, UserId int64, permission []int64) error

Revoke 删除用户权限

func (*AdminPermissionDao) RevokeRoleToPermission

func (r *AdminPermissionDao) RevokeRoleToPermission(db *gorm.DB, roleId int64) error

type RoleHasPermissionDao

type RoleHasPermissionDao struct {
}

func (*RoleHasPermissionDao) Create

func (r *RoleHasPermissionDao) Create(db *gorm.DB, roleId int64, permission []int64) error

Create 创建

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 (*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 (r *RoleHasPermissionDao) RemovePermission(db *gorm.DB, roleId int64, PermissionId int64) error

func (*RoleHasPermissionDao) RoleToPermission

func (r *RoleHasPermissionDao) RoleToPermission(db *gorm.DB, roleId int64, PermissionId int64) bool

func (*RoleHasPermissionDao) Take

func (r *RoleHasPermissionDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.RolePermissions

type RolesDao

type RolesDao struct {
}

func (*RolesDao) AnyRole

func (r *RolesDao) AnyRole(db *gorm.DB, roleId int64) (rolesList []sysmodel.SysRoles)

func (*RolesDao) Create

func (r *RolesDao) Create(db *gorm.DB, roles *sysmodel.SysRoles) (*sysmodel.SysRoles, error)

func (*RolesDao) Delete

func (r *RolesDao) Delete(db *gorm.DB, id int64) error

Delete 主键条件删除

func (*RolesDao) GetById

func (r *RolesDao) GetById(db *gorm.DB, id int64) *sysmodel.SysRoles

func (*RolesDao) GetByName

func (r *RolesDao) GetByName(db *gorm.DB, name string) *sysmodel.SysRoles

func (*RolesDao) IsHasTable

func (r *RolesDao) IsHasTable(db *gorm.DB)

func (*RolesDao) RemoveRole

func (r *RolesDao) RemoveRole(db *gorm.DB, roleId int64) error

func (*RolesDao) RoleInfo

func (r *RolesDao) RoleInfo(db *gorm.DB, roleId int64) (roles sysmodel.SysRoles)

func (*RolesDao) Take

func (r *RolesDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.SysRoles

type UserRoleDao

type UserRoleDao struct {
}

func (*UserRoleDao) Create

func (r *UserRoleDao) Create(db *gorm.DB, appId int64, userId int64, roleId int64) (createErr error)

func (*UserRoleDao) Delete

func (r *UserRoleDao) Delete(db *gorm.DB, id int64) error

Delete 主键条件删除

func (*UserRoleDao) HasRole

func (r *UserRoleDao) HasRole(db *gorm.DB, userId int64, roleId int64) bool

func (*UserRoleDao) IsHasTable

func (r *UserRoleDao) IsHasTable(db *gorm.DB)

func (*UserRoleDao) RemoveUserRole

func (r *UserRoleDao) RemoveUserRole(db *gorm.DB, userId int64, roleId int64) error

func (*UserRoleDao) Take

func (r *UserRoleDao) Take(db *gorm.DB, where ...interface{}) *sysmodel.UserRoles

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL