diff --git a/pkg/gin/frame/auth_jwt.go b/pkg/gin/frame/auth_jwt.go index 822732e..a653636 100644 --- a/pkg/gin/frame/auth_jwt.go +++ b/pkg/gin/frame/auth_jwt.go @@ -17,6 +17,7 @@ const ( ) // AuthJWT creates a gin middleware for authorization +//goland:noinspection GoUnusedExportedFunction func AuthJWT(tokenMaker token.Maker) gin.HandlerFunc { return func(c *gin.Context) { authorizationHeader := c.GetHeader(authorizationHeaderKey) diff --git a/pkg/gin/frame/response.go b/pkg/gin/frame/response.go index af962a4..fcbb89d 100644 --- a/pkg/gin/frame/response.go +++ b/pkg/gin/frame/response.go @@ -25,6 +25,14 @@ type response struct { // Value string `json:"error"` //} +// PageData 分页数据 +type PageData struct { + Total int `json:"total"` + PageNo int `json:"page_no"` + PageSize int `json:"page_size"` + Result interface{} `json:"result"` +} + // NewResponse return response instance func NewResponse() *response { return &response{