Documentation ¶
Index ¶
- Constants
- Variables
- func AesCBCDncrypt(encryptData, key []byte) ([]byte, error)
- func AesCBCEncrypt(rawData, key []byte) ([]byte, error)
- func AesDePassword(guid, seed, password string) (string, error)
- func AesDecode(key string, encryptData string) (password string, err error)
- func AesEnPassword(guid, seed, password, cipher string) (string, error)
- func AesEncode(key string, rawData string) (string, error)
- func CheckRoleEndpointOwner(roles []string)
- func CreateRandomPassword() string
- func DecodeCoreToken(token, key string) (result m.CoreJwtToken, err error)
- func DelSession(sId string)
- func Dncrypt(rawData string) (string, error)
- func Encrypt(rawData []byte) (string, error)
- func GetCoreToken(c *gin.Context) m.CoreJwtToken
- func GetMessageMap(c *gin.Context) *models.ErrorMessageObj
- func GetOperateUser(c *gin.Context) string
- func GetSessionData(sId string) m.Session
- func InitErrorMessageList()
- func InitRoleEndpointMap()
- func InitSession()
- func IsActive(sId string, clientIp string) (bool, string)
- func IsIllegalCond(str string) bool
- func IsIllegalIp(str string) bool
- func IsIllegalLast(str string) bool
- func IsIllegalName(str string) bool
- func IsIllegalNormalInput(str string) bool
- func IsIllegalPath(str string) bool
- func Md5Encode(rawData string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func ReturnBodyError(c *gin.Context, err error)
- func ReturnData(c *gin.Context, data interface{})
- func ReturnDeleteTableError(c *gin.Context, table, key, value string, err error)
- func ReturnError(c *gin.Context, code int, msg string, err error)
- func ReturnFetchDataError(c *gin.Context, table, key, value string)
- func ReturnHandleError(c *gin.Context, msg string, err error)
- func ReturnParamEmptyError(c *gin.Context, key string)
- func ReturnParamTypeError(c *gin.Context, paramName, typeName string)
- func ReturnPasswordError(c *gin.Context)
- func ReturnQueryTableError(c *gin.Context, table string, err error)
- func ReturnRequestJsonError(c *gin.Context, err error)
- func ReturnSuccess(c *gin.Context)
- func ReturnSuccessData(c *gin.Context, data interface{})
- func ReturnSuccessWithMessage(c *gin.Context, msg string)
- func ReturnTokenAuthorityError(c *gin.Context)
- func ReturnTokenError(c *gin.Context)
- func ReturnUpdateTableError(c *gin.Context, table string, err error)
- func ReturnValidateError(c *gin.Context, msg string)
- func SaveSession(session m.Session) (isOk bool, sId string)
- func UpdateRoleEndpointMap()
- func ValidateGet(c *gin.Context)
- func ValidatePost(c *gin.Context, obj interface{}, ex ...string) bool
- type RespJson
Constants ¶
View Source
const ( PASSWORD_LEN = 12 DEFALT_CIPHER = "CIPHER_A" )
Variables ¶
View Source
var CIPHER_MAP = map[string]string{
"CIPHER_A": "{cipher_a}",
}
View Source
var LocalMem = make(map[string]m.Session)
View Source
var RecordRequestMap = make(map[string]int64)
View Source
var RedisClient *redis.Client
Functions ¶
func AesCBCDncrypt ¶ added in v1.0.1
func AesCBCEncrypt ¶ added in v1.0.1
aes加密,填充秘钥key的16位,24,32分别对应AES-128, AES-192, or AES-256.
func AesDePassword ¶ added in v1.4.0
func AesEnPassword ¶ added in v1.4.0
func CheckRoleEndpointOwner ¶ added in v1.9.0
func CheckRoleEndpointOwner(roles []string)
func CreateRandomPassword ¶ added in v1.4.0
func CreateRandomPassword() string
func DecodeCoreToken ¶ added in v1.5.4
func DecodeCoreToken(token, key string) (result m.CoreJwtToken, err error)
func DelSession ¶
func DelSession(sId string)
func GetCoreToken ¶ added in v1.6.0
func GetCoreToken(c *gin.Context) m.CoreJwtToken
func GetMessageMap ¶ added in v1.5.3
func GetMessageMap(c *gin.Context) *models.ErrorMessageObj
func GetOperateUser ¶
func GetSessionData ¶
func InitErrorMessageList ¶ added in v1.5.3
func InitErrorMessageList()
func InitRoleEndpointMap ¶ added in v1.9.0
func InitRoleEndpointMap()
func InitSession ¶ added in v1.0.1
func InitSession()
func IsIllegalCond ¶ added in v1.1.0
func IsIllegalIp ¶ added in v1.7.0
func IsIllegalLast ¶ added in v1.1.0
func IsIllegalName ¶
func IsIllegalNormalInput ¶ added in v1.5.0
func IsIllegalPath ¶ added in v1.5.0
func PKCS7Padding ¶ added in v1.0.1
func PKCS7UnPadding ¶ added in v1.0.1
func ReturnBodyError ¶ added in v1.5.3
func ReturnData ¶
func ReturnDeleteTableError ¶ added in v1.5.3
func ReturnFetchDataError ¶ added in v1.5.3
func ReturnHandleError ¶ added in v1.5.3
func ReturnParamEmptyError ¶ added in v1.5.3
func ReturnParamTypeError ¶ added in v1.5.3
func ReturnPasswordError ¶ added in v1.5.3
func ReturnQueryTableError ¶ added in v1.5.3
func ReturnRequestJsonError ¶ added in v1.5.3
func ReturnSuccess ¶
func ReturnSuccessData ¶ added in v1.5.3
func ReturnSuccessWithMessage ¶ added in v1.5.3
func ReturnTokenAuthorityError ¶ added in v1.9.0
func ReturnTokenError ¶ added in v1.5.3
func ReturnUpdateTableError ¶ added in v1.5.3
func ReturnValidateError ¶ added in v1.5.3
func UpdateRoleEndpointMap ¶ added in v1.9.0
func UpdateRoleEndpointMap()
func ValidateGet ¶
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.