errno

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success             = NewErrNo(int32(0), "Success")
	ServiceErr          = NewErrNo(int32(1), "Service is unable to start successfully")
	ParamErr            = NewErrNo(int32(2), "Wrong Parameter has been given")
	UserAlreadyExistErr = NewErrNo(int32(3), "User already exists")
	AuthInvalidJwt      = NewErrNo(int32(4), "Invalid jwt")
	AuthInvalidAccount  = NewErrNo(int32(4), "username or password wrong")
	ResourceNotFound    = NewErrNo(int32(6), "Resource not found")
)

Functions

This section is empty.

Types

type ErrNo

type ErrNo struct {
	ErrCode int32  `json:"status_code"`
	ErrMsg  string `json:"status_msg"`
}

func ConvertErr

func ConvertErr(err error) ErrNo

func NewErrNo

func NewErrNo(code int32, msg string) 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