joint

package
v0.5.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespMarshal added in v0.5.0

func RespMarshal(data any) (stdJson.RawMessage, error)

Types

type BasePageInfo

type BasePageInfo struct {
	Page     int `form:"-" binding:"-"`
	PageSize int `form:"-" binding:"-"`
}

func (*BasePageInfo) SetPageInfo

func (r *BasePageInfo) SetPageInfo(page int, pageSize int)

type CachePageResp added in v0.5.0

type CachePageResp struct {
	Data     *PageResp
	JsonResp stdJson.RawMessage
}

func (*CachePageResp) Render added in v0.5.0

func (r *CachePageResp) Render(c *gin.Context)

type JsonResp added in v0.5.0

type JsonResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg,omitempty"`
	Data any    `json:"data,omitempty"`
}

type PageResp added in v0.5.0

type PageResp struct {
	List  any   `json:"list"`
	Pager Pager `json:"pager"`
}

func PageRespFrom added in v0.5.0

func PageRespFrom(list any, page int, pageSize int, totalRows int64) *PageResp

type Pager added in v0.5.0

type Pager struct {
	Page      int   `json:"page"`
	PageSize  int   `json:"page_size"`
	TotalRows int64 `json:"total_rows"`
}

Jump to

Keyboard shortcuts

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