results

package
v0.0.0-...-7a3883e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Failed                 = -1
	OK                     = 0
	SUCCESS                = 0
	Unauthorized           = 401
	PaymentRequired        = 402
	Forbidden              = 403
	NotFound               = 404
	MethodNotAllowed       = 405
	NotAcceptable          = 406
	RequestTimeout         = 408
	Conflict               = 409
	InnerError             = 500
	NotImplemented         = 501
	ServiceUnavailable     = 503
	Timeout                = 504
	ServiceNotSupported    = 701
	VerifyFailed           = 704
	DataNotExists          = 705
	NothingToDo            = 706
	NotEmptyReferences     = 707
	InvalidPassword        = 708
	NotLogin               = 709
	InvalidInput           = 1101
	UnknownOrgnazationCode = 1102
)

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultObject

type ResultObject struct {
	Code      int         `json:"code" validate:"required" comment:"结果编码"`
	Message   string      `json:"message" validate:"required" comment:"结果描述"`
	Data      interface{} `json:"data,omitempty" validate:"optional" comment:"响应结果"`
	RequestSn interface{} `json:"requestSn,omitempty" validate:"optional" comment:"请求序列号"`
}

ResultObject result

func NewResultObject

func NewResultObject() ResultObject

NewResultObject result

func NewResultObjectWithRequestSn

func NewResultObjectWithRequestSn(requestSn interface{}) ResultObject

NewResultObjectWithRequestSn result

func (*ResultObject) Decode

func (r *ResultObject) Decode(s string) error

Decode unserializer

func (*ResultObject) Encode

func (r *ResultObject) Encode() string

Encode serializer

func (*ResultObject) StatusCode

func (r *ResultObject) StatusCode() int

StatusCode of result

Jump to

Keyboard shortcuts

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