Documentation
¶
Index ¶
- Variables
- func CheckPasswordHash(password, hashedPassword string) error
- func GenerateID() int64
- func GenerateToken(userID int64) (string, error)
- func GetBaseURL(model string) (string, error)
- func GetUserIDFromContext(c *gin.Context) int64
- func HashPassword(password string) (string, error)
- func JSONError(c *gin.Context, code int, err error)
- func ParseToken(tokenStr string) (jwt.MapClaims, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var URLMapping = map[string]string{ "gpt": constant.GPTBaseURL, "glm": constant.GLMBaseURL, }
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash 验证密码是否正确
func GenerateID ¶
func GenerateID() int64
func GetUserIDFromContext ¶
GetUserIDFromContext 从上下文中获取用户 ID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.