dto

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CODE_FAIL = CODE_SERVER_ERR
View Source
const CODE_NOFOUND_RECORD = 501
View Source
const CODE_REQUEST_BAD = 400
View Source
const CODE_SERVER_ERR = 500
View Source
const CODE_SUCCESS = 200
View Source
const CURRENT = 0
View Source
const PAGE_SIZE = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonResult

type JsonResult struct {
	Code int32  `json:"code"`
	Msg  string `json:"msg"`
	Data string `json:"data"`
}

func (*JsonResult) Fail

func (result *JsonResult) Fail() *JsonResult

func (*JsonResult) FailMessage

func (result *JsonResult) FailMessage(msg string) *JsonResult

func (*JsonResult) GetData

func (p *JsonResult) GetData() string

func (*JsonResult) SetData

func (p *JsonResult) SetData(s string)

func (*JsonResult) String

func (result *JsonResult) String() string

func (*JsonResult) Success

func (result *JsonResult) Success() *JsonResult

func (*JsonResult) SuccessData

func (result *JsonResult) SuccessData(data string) *JsonResult

func (*JsonResult) SuccessMessage

func (result *JsonResult) SuccessMessage(msg string, data string) *JsonResult

func (*JsonResult) ToString

func (result *JsonResult) ToString() string

type PageParam

type PageParam struct {
	Current  int32 `json:"current"`
	PageSize int32 `json:"page_size"`
	Total    int32 `json:"total"`
	Count    int   `json:"count"`
}

func (*PageParam) String

func (pageParam *PageParam) String() string

func (*PageParam) ToString

func (pageParam *PageParam) ToString() string

type PageResult

type PageResult struct {
	JsonResult
	Page PageParam     `json:"data"`
	Data []interface{} `json:"data"`
}

func (*PageResult) String

func (pageResult *PageResult) String() string

func (*PageResult) ToString

func (pageResult *PageResult) ToString() string

type QueryParam

type QueryParam struct {
	Current    int32   `json:"current"`
	PageSize   int32   `json:"page_size"`
	OrderBys   *string `json:"order_bys"`
	FuzzyQuery bool    `json:"fuzzy_query"`
	EsQuery    bool    `json:"es_query"`

	Param model.ParamBase `json:"param"`
}

func (*QueryParam) String

func (param *QueryParam) String() string

func (*QueryParam) ToString

func (param *QueryParam) ToString() string

Jump to

Keyboard shortcuts

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