converts

package
v0.0.0-...-f282eec Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminConvertAuthInfo

func AdminConvertAuthInfo(ad *models.Admin) dto.AuthInfo

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 ConvertGormConfig

func ConvertGormConfig(c configstc.DBConfig) *gorm.Config

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.

Jump to

Keyboard shortcuts

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