Documentation ¶
Index ¶
- Constants
- func AddErrorMessage(code int, message string)
- func AddErrorMessages(messages map[int]string)
- func ErrorCode(name string) int
- func ErrorMessage(name string) string
- func GetErrorMessage(code int) string
- func New(message string) error
- func RegisterError(name string, code int, message string)
- func RegisterErrors(errs []Error)
- type Error
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_CREATE_FAIL = 10006 ERROR_UPDATE_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 ¶
func AddErrorMessages ¶
func ErrorMessage ¶ added in v0.0.3
func GetErrorMessage ¶
func RegisterError ¶ added in v0.0.3
func RegisterErrors ¶ added in v0.0.3
func RegisterErrors(errs []Error)
Types ¶
Click to show internal directories.
Click to hide internal directories.