codes

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package codes provide codes list

Index

Constants

View Source
const (
	OK = 0

	TrSuccess             = 200
	TrBadRequest          = 400
	TrError               = 500
	TrInvalidError        = 4000
	TrInvalidToken        = 4001
	TrFileTooLarge        = 4002
	TrDuplicatePrimaryKey = 4003
	TrLoginError          = 4004
	TrNotLogin            = 4005
	TrUserNotExist        = 4006
	TrDisableUser         = 4007
	TrWrongPassword       = 4008
	TrNoPermission        = 4009
	TrIllegalOperation    = 4010
	TrRecordNotFound      = 4011
	TrLoginUnSupport      = 4012

	TrSystemError = 5001
	TrSystemBusy  = 5002
	TrTimeout     = 5003

	TrContentIllegal = 10201
	TrImageIllegal   = 10202
	TrVideoIllegal   = 10203

	TrDbError      = 80001
	TrDataNotFound = 80002

	TrAccessTooFrequently = 99999
)

Code define

Variables

This section is empty.

Functions

func AppCodeToHttpStatus added in v1.13.0

func AppCodeToHttpStatus(code int32) int32

AppCodeToHttpStatus app codes to http status

func Default

func Default() lang.Lang

Default Lang, config by cfgkey.GlobalLang

Types

This section is empty.

Jump to

Keyboard shortcuts

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