joint

package
v0.0.0-...-85b3044 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespMarshal

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

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

func (*CachePageResp) Render

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

type JsonResp

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

type PageResp

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

func PageRespFrom

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

type Pager

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