Documentation ¶ Index ¶ func GenerateJWT(jwtSecret []byte, userId int64, exp int64) (string, error) func GenerateJWTCustom(jwtSecret []byte, userId any, exp int64) (string, error) func ParseJWT(tokenString string, jwtSecret []byte) (int64, error) func ParseJWTCustom(tokenString string, jwtSecret []byte) (any, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GenerateJWT ¶ func GenerateJWT(jwtSecret []byte, userId int64, exp int64) (string, error) GenerateJWT 生成 JWT Token func GenerateJWTCustom ¶ func GenerateJWTCustom(jwtSecret []byte, userId any, exp int64) (string, error) func ParseJWT ¶ func ParseJWT(tokenString string, jwtSecret []byte) (int64, error) ParseJWT 解析并验证 JWT Token func ParseJWTCustom ¶ func ParseJWTCustom(tokenString string, jwtSecret []byte) (any, error) ParseJWT 解析并验证 JWT Token Types ¶ This section is empty. Source Files ¶ View all Source files jwt.go Click to show internal directories. Click to hide internal directories.