errors

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS        = 200
	ERROR          = 500
	INVALID_PARAMS = 400

	ERROR_EXIST       = 10001
	ERROR_EXIST_FAIL  = 10002
	ERROR_NOT_EXIST   = 10003
	ERROR_GET_S_FAIL  = 10004
	ERROR_COUNT_FAIL  = 10005
	ERROR_ADD_FAIL    = 10006
	ERROR_EDIT_FAIL   = 10007
	ERROR_DELETE_FAIL = 10008
	ERROR_EXPORT_FAIL = 10009
	ERROR_IMPORT_FAIL = 10010

	ERROR_BASE_PATH = 10011

	ERROR_AUTH_CHECK_TOKEN_FAIL    = 20001
	ERROR_AUTH_CHECK_TOKEN_TIMEOUT = 20002
	ERROR_AUTH_TOKEN               = 20003
	ERROR_AUTH                     = 20004

	ERROR_FUNC_EVENT_ALREADY_EXISTS = 30001
	ERROR_FUNC_EVENT_NOT_CALL       = 30002
	ERROR_FUNC_EVENT_NOT_REGISTER   = 30003

	ERROR_REDIS_INIT_CONNECT_FAIL = 40001
	ERROR_REDIS_AUTH_FAIL         = 40002

	ERROR_CONFIG_INIT_FAIL             = 50001
	ERROR_CONTAINER_KEY_ALREADY_EXISTS = 50002
)

Variables

This section is empty.

Functions

func AddErrorMessage added in v0.0.6

func AddErrorMessage(code int, message string)

func AddErrorMessages added in v0.0.6

func AddErrorMessages(messages map[int]string)

func GetErrorMessage

func GetErrorMessage(code int) string

func New

func New(message string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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