hcode

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EN = "en"
)
View Source
const LanguageLen = 0

Variables

View Source
var (
	OK                        = addCode(200)
	ServerErr                 = addCode(300)
	TranErr                   = addCode(301)
	ParameterErr              = addCode(304)
	RedisExecErr              = addCode(305)
	ResourcesNotFindErr       = addCode(306)
	SysParameterErr           = addCode(307)
	MgoExecErr                = addCode(308)
	TokenValidErr             = addCode(309)
	ResourcesAlreadyExistsErr = addCode(310)
)

Functions

func Click

func Click()

func EqualError

func EqualError(code Codes, err error) bool

Types

type Code

type Code int

func String

func String(e string) Code

func (Code) Code

func (e Code) Code() int

func (Code) Error

func (e Code) Error() string

func (Code) Message

func (e Code) Message(lang ...string) string

type Codes

type Codes interface {
	Error() string
	Code() int
	Message(lang ...string) string
}

func Cause

func Cause(e error) Codes

Jump to

Keyboard shortcuts

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