helper

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MSPNormalStateHTTPStatusCode ...
	MSPNormalStateHTTPStatusCode int64 = 1001
)

Variables

View Source
var DefaultMSPNormalizeListPaginateParams = MSPNormalizeListPaginateParams{
	Page:     1,
	LimitNum: 20,
}

DefaultMSPNormalizeListPaginateParams ...

Functions

func WrapH

func WrapH(h HTTPWrapHandler) func(*gin.Context)

WrapH ...

Types

type HTTPErrCode

type HTTPErrCode string

HTTPErrCode ...

type HTTPWrapContext

type HTTPWrapContext struct {
	Ctx context.Context
	G   *gin.Context
}

HTTPWrapContext ...

func (*HTTPWrapContext) BindG

func (c *HTTPWrapContext) BindG(params interface{})

BindG ...

type HTTPWrapErrorResponse

type HTTPWrapErrorResponse struct {
	Msg     string      `json:"msg,omitempty"`
	ErrCode HTTPErrCode `json:"errCode,omitempty"`
}

HTTPWrapErrorResponse ...

type HTTPWrapHandler

type HTTPWrapHandler func(c *HTTPWrapContext) (interface{}, error)

HTTPWrapHandler ...

type MSPNormalizeHTTPResponseBody

type MSPNormalizeHTTPResponseBody struct {
	Code    int64       `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

MSPNormalizeHTTPResponseBody ...

type MSPNormalizeList

type MSPNormalizeList struct {
	List     interface{}          `json:"list"`
	Paginate MSPNormalizePaginate `json:"paginate"`
}

MSPNormalizeList ...

type MSPNormalizeListPaginateParams

type MSPNormalizeListPaginateParams struct {
	Page     int `json:"page" form:"page"`
	LimitNum int `json:"limit_num" form:"limit_num"`
}

MSPNormalizeListPaginateParams ...

type MSPNormalizePaginate

type MSPNormalizePaginate struct {
	Total    int64 `json:"total"`
	Current  int   `json:"current"`
	PageSize int   `json:"pageSize"`
}

MSPNormalizePaginate ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL