cherryCode

package
v1.1.28 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

View Source
const (
	OK                    int32 = 0  // is ok
	SessionUIDNotBind     int32 = 10 // session uid not bind
	DiscoveryNotFoundNode int32 = 11 // discovery not fond node id
	RPCNetError           int32 = 20 // rpc net error
	RPCUnmarshalError     int32 = 21 // rpc data unmarshal error
	RPCMarshalError       int32 = 22 // rpc data marshal error
	RPCRemoteExecuteError int32 = 23 // rpc remote method executor error
	RPCReplyParamsError   int32 = 24 // rpc reply parameter error
	RPCRouteDecodeError   int32 = 25 // rpc route decode error
	RPCRouteHashError     int32 = 26 // rpc route hash error
	RPCNotImplement       int32 = 27 // rpc method not implement
	RPCHandlerError       int32 = 28 // rpc get handler error
)

Variables

This section is empty.

Functions

func Add

func Add(code int32, message string)

func AddAll

func AddAll(maps map[int32]string)

func GetCodeResult

func GetCodeResult(code int32) *cherryProto.CodeResult

func GetMessage

func GetMessage(code int32) string

func IsFail

func IsFail(code int32) bool

func IsOK

func IsOK(code int32) bool

Types

type DataResult

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

func NewDataResult

func NewDataResult(code int32) DataResult

func (*DataResult) SetCode

func (p *DataResult) SetCode(code int32)

Jump to

Keyboard shortcuts

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