feat: meta manage api

This commit is contained in:
Noah Hsu
2022-06-26 19:09:28 +08:00
parent acd4083399
commit 4cef3adc90
10 changed files with 120 additions and 13 deletions

View File

@ -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)

View 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"`
}

View 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"`
}