corecode

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalid        = errors.New("invalid.operate")
	ErrColumnTypeFail = errors.New("column.type.fail")
	ErrSearchFail     = errors.New("search.item.error")
	ErrAssert         = errors.New("assert.is.fail")
	ErrExist          = errors.New("data.is.exist")
	ErrRedisNotFind   = errors.New("data.not.find.to.redis")
	ErrRedisSetFail   = errors.New("redis.set.fail")
	ErrIdFail         = errors.New("id.error")
	ErrToken          = errors.New("token.create.error")
	ErrRelationId     = errors.New("relation.id.fail")
	ErrAccess         = errors.New("access.bad")
	ErrNilClass       = errors.New("object.is.nil")
)

业务常用错误码

View Source
var (
	// 一切正常
	CodeSuccess = 1000
	// 参数类型错误
	CodeFail = 1001
	// 数据未通过验证
	CodeValidateFail = 1002
)
View Source
var (
	CodeRdbTokenCurrent = "-current"
	CodeRdbTokenBackup  = "-backup"
)

Functions

func ReqBad

func ReqBad(msg string, tip ...string) *baseReq

func ReqFail

func ReqFail(msg string, tip ...string) *baseReq

func ReqOk

func ReqOk(data interface{}) *baseReq

Types

This section is empty.

Jump to

Keyboard shortcuts

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