collect

package
v0.0.0-...-f140749 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const SuccessValue = "0"
View Source
const UnSuccessValue = "-1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	//Status  int64  `json:"status"`  // 0成功,其他失败
	Count   int64  `json:"count"`   // 总数
	Success bool   `json:"success"` // 是否成功
	Code    string `json:"code"`    //编码
	Msg     string `json:"msg"`     // 消息
	Data    any    `json:"data"`    //请求参数
	// contains filtered or unexported fields
}

func NotOk

func NotOk(msg string) *Result

func Ok

func Ok(data any, msg string) *Result

func OkWithCount

func OkWithCount(data any, msg string, count int64) *Result

func (*Result) GetCode

func (r *Result) GetCode() string

func (*Result) GetCount

func (r *Result) GetCount() int64

func (*Result) GetData

func (r *Result) GetData() any

func (*Result) GetMsg

func (r *Result) GetMsg() string

func (*Result) GetSuccess

func (r *Result) GetSuccess() bool

func (*Result) IsFinish

func (r *Result) IsFinish() bool

func (*Result) NotOk

func (r *Result) NotOk(msg string) *Result

func (*Result) Ok

func (r *Result) Ok(data any, msg string) *Result

func (*Result) OkWithCount

func (r *Result) OkWithCount(data any, msg string, count int64) *Result

func (*Result) SetFinish

func (r *Result) SetFinish(value bool)

func (*Result) ToString

func (r *Result) ToString() string

Jump to

Keyboard shortcuts

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