cherryResult

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v1.1.16

func Add(code int32, message string)

func GetMessage added in v1.1.16

func GetMessage(code int32) string

func InitStatus added in v1.1.16

func InitStatus(maps map[int32]string)

Types

type Result

type Result struct {
	Code    int32       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func GetResult added in v1.1.16

func GetResult(code int32) Result

func New

func New(code ...int32) *Result

func NewResult

func NewResult(code int32, message string) Result

type StatusResult added in v1.1.16

type StatusResult struct {
	Code    int32  `json:"code"`
	Message string `json:"message"`
}

func NewStatus added in v1.1.16

func NewStatus(code int32) *StatusResult

func (*StatusResult) Error added in v1.1.16

func (s *StatusResult) Error() string

Jump to

Keyboard shortcuts

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