errno

package
v0.0.0-...-55e1567 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success    = NewErrNo(int64(errno.Err_Success), "success")
	ParamsEr   = NewErrNo(int64(errno.Err_ParamsErr), "params err")
	ServiceErr = NewErrNo(int64(errno.Err_ServiceErr), "service err")

	RPCInteractionErr    = NewErrNo(int64(errno.Err_RPCInteractionErr), "rpc call interaction server error")
	InteractionServerErr = NewErrNo(int64(errno.Err_InteractionServerErr), "interaction server error")

	RPCSocialityErr    = NewErrNo(int64(errno.Err_RPCSocialityErr), "rpc call sociality server error")
	SocialityServerErr = NewErrNo(int64(errno.Err_SocialityServerErr), "sociality server error")

	RPCUserErr          = NewErrNo(int64(errno.Err_RPCUserErr), "rpc call user server error")
	UserServerErr       = NewErrNo(int64(errno.Err_UserServerErr), "user server error")
	UserAlreadyExistErr = NewErrNo(int64(errno.Err_UserAlreadyExistErr), "user already exist")
	UserNotFoundErr     = NewErrNo(int64(errno.Err_UserNotFoundErr), "user not found")
	AuthorizeFailErr    = NewErrNo(int64(errno.Err_AuthorizeFailErr), "authorize failed")

	RPCVideoErr    = NewErrNo(int64(errno.Err_RPCVideoErr), "rpc call video server error")
	VideoServerErr = NewErrNo(int64(errno.Err_VideoServerErr), "video server error")

	RPCChatErr    = NewErrNo(int64(errno.Err_RPCChatErr), "rpc call chat server error")
	ChatServerErr = NewErrNo(int64(errno.Err_ChatServerErr), "chat server error")
)

Functions

func SendResponse

func SendResponse(c *app.RequestContext, data interface{})

SendResponse pack response

Types

type ErrNo

type ErrNo struct {
	ErrCode int64
	ErrMsg  string
}

func NewErrNo

func NewErrNo(code int64, msg string) ErrNo

NewErrNo return ErrNo

func (ErrNo) Error

func (e ErrNo) Error() string

func (ErrNo) WithMessage

func (e ErrNo) WithMessage(msg string) ErrNo

Jump to

Keyboard shortcuts

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