errs

package
v0.0.0-...-0473bba Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_NONE          = 200
	ERR_SEP           = "=>"
	ERR_PARAM         = e(400, lang.I("errs.param"))
	ERR_INVALID_TOKEN = e(401, lang.I("errs.invalid.token"))
	ERR_LOGIN         = e(402, lang.I("errs.login"))
	ERR_SIGN          = e(403, lang.I("errs.sign"))
	ERR_NO_RECORD     = e(404, lang.I("errs.no.record"))

	ERR_OPERATE = e(500, lang.I("errs.operate"))
	ERR_UNKNOWN = e(501, lang.I("errs.unknown"))
	ERR_SYSTEM  = e(503, lang.I("errs.system"))

	// users
	ERR_USER_EXIST = e(1001, lang.I("user.exist"))

	// projects
	ERR_PROJECT_EXIST = e(2001, lang.I("project.exist"))

	// project roles
	ERR_PROJECT_ROLE_EXIST = e(2101, lang.I("project_role.exist"))

	// member
	ERR_MEMBER_EXIST = e(2201, lang.I("member.exist"))

	// app
	ERR_APP_EXIST = e(2301, lang.I("app.exist"))

	// env
	ERR_ENV_EXIST = e(2401, lang.I("env.exist"))

	// cluster
	ERR_CLUSTER_EXIST = e(2501, lang.I("cluster.exist"))
)

Functions

func IsErrStr

func IsErrStr(err error) bool

Types

type ErrStr

type ErrStr string

func NoFound

func NoFound(err error, info ...string) ErrStr

func (ErrStr) Error

func (ErrStr ErrStr) Error() string

func (ErrStr) GetErrmsg

func (ErrStr ErrStr) GetErrmsg() string

func (ErrStr) GetErrno

func (ErrStr ErrStr) GetErrno() int

Jump to

Keyboard shortcuts

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