Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ClientMiddleware ¶
ClientMiddleware client middleware print server address 、rpc timeout and connection timeout.
func CommonMiddleware ¶
CommonMiddleware common middleware print some rpc info、real request and real response.
func JWTAuth ¶
func JWTAuth() app.HandlerFunc
func Recovery ¶
func Recovery() app.HandlerFunc
Types ¶
type JWT ¶
type JWT struct {
SigningKey []byte
}
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claims models.CustomClaims) (string, error)
CreateToken to create a token.
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*models.CustomClaims, error)
ParseToken to parse a token.
Click to show internal directories.
Click to hide internal directories.