Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
func GetJWTSecret ¶
func GetJWTSecret() []byte
func GetPageOffset ¶
func GetPageSize ¶
Types ¶
type Claims ¶
type Claims struct { Appkey string `json:"app_key"` AppSecret string `json:"app_secret"` jwt.StandardClaims }
func ParseToken ¶
type Response ¶
响应处理
func NewResponse ¶
func (*Response) ToErrorResponse ¶
func (*Response) ToResponse ¶
func (r *Response) ToResponse(data interface{})
func (*Response) ToResponseList ¶
type ValidError ¶
type ValidErrors ¶
type ValidErrors []*ValidError
func BindAndValid ¶
func BindAndValid(c *gin.Context, v interface{}) (bool, ValidErrors)
func (ValidErrors) Error ¶
func (v ValidErrors) Error() string
func (ValidErrors) Errors ¶
func (v ValidErrors) Errors() []string
Click to show internal directories.
Click to hide internal directories.