Documentation ¶
Index ¶
- func Cors(params ...interface{}) gin.HandlerFunc
- func GetChildDomain(host string) string
- func GetJWTToken(tokenString, tokenKey string) (t *jwt.Token, e error)
- func GetJWTTokenString(info map[string]interface{}, key string, exp time.Duration) (string, error)
- func HandlerStaticFiles(files fs.FS) gin.HandlerFunc
- func StringToBytes(s string) []byte
- type BasicAuthPair
- type BasicAuthPairs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJWTTokenString ¶
info 存储的信息 key 加密的key exp 有效期 GetJWTTokenString 获取Token字符串
func HandlerStaticFiles ¶ added in v1.3.1
func HandlerStaticFiles(files fs.FS) gin.HandlerFunc
func StringToBytes ¶ added in v1.3.1
Types ¶
type BasicAuthPair ¶ added in v1.3.1
type BasicAuthPair struct {
// contains filtered or unexported fields
}
type BasicAuthPairs ¶ added in v1.3.1
type BasicAuthPairs []BasicAuthPair
func ProcessAccounts ¶ added in v1.3.1
func ProcessAccounts(accounts gin.Accounts) BasicAuthPairs
func (BasicAuthPairs) SearchCredential ¶ added in v1.3.1
func (a BasicAuthPairs) SearchCredential(authValue string) (string, bool)
Click to show internal directories.
Click to hide internal directories.