response

package
v0.0.0-...-9f09256 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParameter = &Error{
		Code: invalidParameter,
		Msg:  "invalid parameter",
	}

	ErrRecordNotFind = &Error{
		Code: recordNotFindErr,
		Msg:  "record not find",
	}
)
View Source
var (
	ErrVerityContract = &Error{
		Code: contractVerityErr,
		Msg:  "",
	}

	ErrExportNum = &Error{
		Code: exportNumErr,
		Msg:  "the number of exported items cannot exceed 10000.",
	}
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

func Err

func Err(err error) *Error

func NewUnknownError

func NewUnknownError(err error) *Error

func Ok

func Ok(data interface{}) *Error

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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