Documentation
¶
Index ¶
Constants ¶
View Source
const (
AccessToken = "AccessToken"
)
Variables ¶
View Source
var ( // ErrTokenEmpty token 为空 ErrTokenEmpty = errors.New("token is empty") // ErrTokenInvalid token 无效 ErrTokenInvalid = errors.New("token is invalid") )
Functions ¶
func Logger ¶
func Logger() gin.HandlerFunc
func NewCors ¶
func NewCors(configs ...cors.Config) gin.HandlerFunc
NewCors returns a CORS middleware.
func Recover ¶
func Recover() gin.HandlerFunc
Recover is a middleware that recovers from any panics and writes a 500 if there was one.
Types ¶
type AesAuthConfig ¶
type AesAuthConfig struct {
// contains filtered or unexported fields
}
AesAuthConfig 鉴权中间件配置
func NewAesAuthConfig ¶
func NewAesAuthConfig(cipherInstance cipher.AesInterface, opts ...Option) *AesAuthConfig
NewAesAuthConfig 鉴权中间件配置
Click to show internal directories.
Click to hide internal directories.