feat: meta manage api
This commit is contained in:
@ -5,12 +5,6 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Resp struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
func ErrorResp(c *gin.Context, err error, code int, l ...bool) {
|
||||
if len(l) != 0 && l[0] {
|
||||
log.Errorf("%+v", err)
|
||||
|
6
internal/server/common/req.go
Normal file
6
internal/server/common/req.go
Normal file
@ -0,0 +1,6 @@
|
||||
package common
|
||||
|
||||
type PageReq struct {
|
||||
PageIndex int `json:"page_index" form:"page_index"`
|
||||
PageSize int `json:"page_size" form:"page_size"`
|
||||
}
|
12
internal/server/common/resp.go
Normal file
12
internal/server/common/resp.go
Normal file
@ -0,0 +1,12 @@
|
||||
package common
|
||||
|
||||
type Resp struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type PageResp struct {
|
||||
Content interface{} `json:"content"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
Reference in New Issue
Block a user