response

package
v0.0.0-...-05e86ca Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RespSuccess int64 = 0
	RespFailure int64 = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TRespDataSet

type TRespDataSet struct {
	Total   int64       `json:"total"`
	ArrData interface{} `json:"list,omitempty"`
}

type TResponse

type TResponse struct {
	Code int64         `json:"code"`
	Data *TRespDataSet `json:"data"` //,omitempty
	Info string        `json:"message"`
}

func Failure

func Failure(info string) *TResponse

func Ongoing

func Ongoing() *TResponse

func RespData

func RespData(total int64, data interface{}, err error) *TResponse

func ReturnInt

func ReturnInt(value int64) *TResponse

func ReturnStr

func ReturnStr(value string) *TResponse

func Success

func Success(data *TRespDataSet) *TResponse

Jump to

Keyboard shortcuts

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