enum

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Single = iota + 1
	Multi
	Dynamic
)

请求类型

View Source
const (
	MD5Str    = "md5"
	SHA1Str   = "sha1"
	SHA256Str = "sha256"
	SHA512Str = "sha512"
	HMACStr   = "hmac"
	RSAStr    = "rsa"
	AESStr    = "aes"
	DESStr    = "des"
	CertStr   = "cert"
)

加密类型枚举值

View Source
const (
	All    = "all"
	Data   = "data"
	Static = "static"
)

签名原串排序方式

View Source
const (
	Head     = "head"
	Tail     = "tail"
	HeadTail = "headtail"
)

签名原串key拼接位置

View Source
const (
	EUIDName       = "euid"
	SignName       = "sign"
	TimestampName  = "timestamp"
	DynamicKeyName = "secret_id"
)

公有字段默认名

View Source
const (
	None   = 0
	MD5    = 1
	SHA1   = 2
	SHA256 = 4
	SHA512 = 8
	HMAC   = 16
	RSA    = 32
	AES    = 64
	DES    = 128
	Cert   = 256
)

加密类型枚举值

View Source
const (
	ERR_PARAMS   = 901
	ERR_NotExits = 902 //

	ERR_NotGenerate        = 903 //该类型密钥未生成
	ERR_NotSupport         = 904
	ERR_MissingParam       = 905
	ERR_NotRemoteConfig    = 906
	ERR_ExistsSecret       = 907
	ERR_NotExitsSecretType = 908 //

	ERR_DataFormat = 999
)

Variables

This section is empty.

Functions

func CheckEncryptType

func CheckEncryptType(eType string, authType int) error

CheckEncryptType 检查加密类型是否支持

func CheckSignType

func CheckSignType(sType string, authType int) error

CheckSignType 检查签名类型是否支持

func CheckType

func CheckType(enTypes ...string) error

CheckType 检查类型是否支持

func GetNameByType

func GetNameByType(enType string) string

GetNameByType 按类型获取类型对应参数名

func GetNameByValue

func GetNameByValue(enType int) string

GetNameByValue 按枚举值获取类型对应参数名

func GetTypes

func GetTypes() []string

GetTypes 获取类型

func GetValueByName

func GetValueByName(enType string) int

GetValueByName 按名称获取枚举值

Types

This section is empty.

Jump to

Keyboard shortcuts

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