errno

package
v0.0.0-...-ab065fd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success = &Errno{Code: New(1), Msg: "ok"}

	ErrBind             = &Errno{Code: New(10), Msg: "bind json error"}
	ErrParams           = &Errno{Code: New(11), Msg: "params empty error"}
	ErrTraceNoContext   = &Errno{Code: New(12), Msg: "tracer no context error"}
	ErrTraceIntoContext = &Errno{Code: New(13), Msg: "tracer into context error"}
	ErrCopy             = &Errno{Code: New(14), Msg: "copy data error"}
	ErrNoTokenUid       = &Errno{Code: New(15), Msg: "no token uid error"}
	ErrTooManyReqyest   = &Errno{Code: New(16), Msg: "too many request error"}
)

[1, 10000)

View Source
var (
	ErrVerifyEmail = errors.New("verify email error")
	ErrVerifyPhone = errors.New("verify phone error")
)
View Source
var (
	ErrUserRegister = &Errno{Code: New(100000), Msg: "web user register error"}
	ErrUserInfo     = &Errno{Code: New(100001), Msg: "web user get error"}
	ErrUserLogin    = &Errno{Code: New(100002), Msg: "web user login error"}
	ErrUserAuthMid  = &Errno{Code: New(100003), Msg: "web user auth mid error"}
	ErrUserList     = &Errno{Code: New(100004), Msg: "web user list error"}
)

[10000, 1000000)

Functions

func New

func New(e int32) int32

Types

type Errno

type Errno struct {
	Code int32       `json:"Code"`
	Msg  string      `json:"Msg"`
	Data interface{} `json:"Data,omitempty"`
}

func (Errno) Error

func (e Errno) Error() string

Jump to

Keyboard shortcuts

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