erro

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrSuccess        = 200
	ErrDefault        = 500
	ErrReqContent     = 503
	ErrBreaker        = 3000
	ErrMaxRequest     = 3005
	ErrRateLimiter    = 3001
	ErrDelayLimiter   = 3002
	ErrReserveLimiter = 3004
	ErrAuthor         = 4003

	ErrFileMime   = 501
	ErrNoFile     = 502
	ErrDbRead     = 504
	ErrDbModify   = 505
	ErrDbRemove   = 506
	ErrUserName   = 507
	ErrPassword   = 508
	ErrPermission = 401
	ErrToken      = 510
	ErrDbInsert   = 511
	ErrTemplate   = 512
	ErrImport     = 513
	ErrExport     = 514
	ErrNotExist   = 517
	ErrDb         = 520
	ErrFileOpen   = 521
	ErrFileParse  = 522
)

错误码

Variables

This section is empty.

Functions

func GetMsg

func GetMsg(code int) string

func GetMsgByLang

func GetMsgByLang(code int, lang string) string

func Register

func Register(code int, msg string)

func RegisterByLang

func RegisterByLang(code int, msg string, lang string)

func SetSuccess

func SetSuccess(code int)

func Success

func Success() int

Types

type Err

type Err struct {
	Code int
	Msg  string
}

func (*Err) Error

func (e *Err) Error() string

Jump to

Keyboard shortcuts

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