Documentation ¶
Index ¶
- func AdminConvertAuthInfo(ad *models.Admin) dto.AuthInfo
- func AuthToDataPacket(authInfo dto.AuthInfo, expire time.Duration, jwtAuth interfaces.ItfJwtParser, ...) (*dto.AuthDataPacket, error)
- func ConvertGormConfig(c configstc.DBConfig) *gorm.Config
- func ConvertPermissionSimple(r *models.RbacPermission) *dto.RbacPermissionSimple
- func ConvertPermissionSimples(perms []*models.RbacPermission) []*dto.RbacPermissionSimple
- func ConvertRoleSimple(r *models.RbacRole) *dto.RbacRoleSimple
- func ConvertRoleSimples(roles []*models.RbacRole) []*dto.RbacRoleSimple
- func PermissionSimpleToTree(list []*dto.RbacPermissionSimple) []*dto.RbacPermissionSimple
- func TokenToAuthDataPacket(token string, jwtAuth interfaces.ItfJwtParser) (*dto.AuthDataPacket, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthToDataPacket ¶
func AuthToDataPacket(authInfo dto.AuthInfo, expire time.Duration, jwtAuth interfaces.ItfJwtParser, others ...map[string]interface{}) (*dto.AuthDataPacket, error)
AuthToDataPacket auth信息转为dataPacket(包含token)
func ConvertPermissionSimple ¶
func ConvertPermissionSimple(r *models.RbacPermission) *dto.RbacPermissionSimple
func ConvertPermissionSimples ¶
func ConvertPermissionSimples(perms []*models.RbacPermission) []*dto.RbacPermissionSimple
func ConvertRoleSimple ¶
func ConvertRoleSimple(r *models.RbacRole) *dto.RbacRoleSimple
func ConvertRoleSimples ¶
func ConvertRoleSimples(roles []*models.RbacRole) []*dto.RbacRoleSimple
func PermissionSimpleToTree ¶
func PermissionSimpleToTree(list []*dto.RbacPermissionSimple) []*dto.RbacPermissionSimple
PermissionSimpleToTree 转换为树形结构,存在环的话整个环不会进入树列表
func TokenToAuthDataPacket ¶
func TokenToAuthDataPacket(token string, jwtAuth interfaces.ItfJwtParser) (*dto.AuthDataPacket, error)
TokenToAuthDataPacket token转为解析为authPacket
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.