Documentation
¶
Index ¶
- Variables
- func CopyProperties[T any](from any) (to T)
- func EncodeMD5(value string) string
- func FailMessage(c *gin.Context, message string)
- func GenerateToken(claims Claims) (string, error)
- func GetOffset(req request.PageQuery) (offset int)
- func OK(c *gin.Context)
- func Response(c *gin.Context, errCode int, data interface{})
- func Setup()
- type Claims
- type ResponseEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var IP = new(ipUtil)
Functions ¶
func FailMessage ¶
func GenerateToken ¶
GenerateToken generate tokens used for auth
Types ¶
type Claims ¶
type Claims struct {
UserID uint64 `json:"id"`
Role *int `json:"role"`
jwt.StandardClaims
}
type ResponseEntity ¶
Click to show internal directories.
Click to hide internal directories.