ze

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Ok       int = 0
	Fail     int = -1
	Request  int = -400
	Internal int = -500
)

Variables

View Source
var InternalErr = Err{Code: Internal, Name: "INTERNAL_ERROR"}
View Source
var RequestErr = Err{Code: Request, Name: "REQUEST_ERROR"}
View Source
var UnknownErr = Err{Code: Fail, Name: "UNKNOWN_ERROR"}

Functions

func ToErr

func ToErr(code int) error

Types

type Err

type Err struct {
	Name string `json:"name"`
	Code int    `json:"code"`
	Ext  z.H    `json:"ext,omitempty"`
}

func (Err) Error

func (e Err) Error() string

func (*Err) More

func (e *Err) More(h z.H) *Err

Jump to

Keyboard shortcuts

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