status

package
v1.0.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDatabaseError deprecated

func CheckDatabaseError(err error, msg ...string) error

Deprecated: pls check database error and return defined status error

Types

type Error

type Error int
const (
	// @errTalk InternalServerError internal error
	InternalServerError Error = http.StatusInternalServerError*1e6 + iota + 1
	// @errTalk Database Error
	DatabaseError
	// @errTalk Upload File Failed
	UploadFileFailed
	// @errTalk Create Message Channel Failed
	CreateChannelFailed
	// @errTalk Config Initialization Failed
	ConfigInitializationFailed
)
const (
	// @errTalk Unauthorized unauthorized
	Unauthorized Error = http.StatusUnauthorized*1e6 + iota + 1
	// @errTalk Invalid Auth Value
	InvalidAuthValue
	// @errTalk Invalid Auth Account ID
	InvalidAuthAccountID
	// @errTalk No Project Permission
	NoProjectPermission
	// @errTalk No Admin Permission
	NoAdminPermission
	// @errTalk Invalid Old Password
	InvalidOldPassword
	// @errTalk Invalid New Password
	InvalidNewPassword
	// @errTalk Invalid Password
	InvalidPassword
	// @errTalk Invalid Siwe Signature
	InvalidEthLoginSignature
	// @errTalk Invalid Siwe Message
	InvalidEthLoginMessage
	// @errTalk Invalid Auth Publisher ID
	InvalidAuthPublisherID
	// @errTalk Current Account Absence
	CurrentAccountAbsence
)
const (
	// @errTalk Forbidden
	Forbidden Error = http.StatusForbidden*1e6 + iota + 1
	// @errTalk deployed instance limit
	InstanceLimit
	// @errTalk Disabled Account
	DisabledAccount
	// @errTalk White List Forbidden
	WhiteListForbidden
)
const (
	// @errTalk Conflict conflict error
	Conflict Error = http.StatusConflict*1e6 + iota + 1
	// @errTalk Project Config Conflict
	ProjectConfigConflict
	// @errTalk Project Name Conflict
	ProjectNameConflict
	// @errTalk Strategy Conflict
	StrategyConflict
)
const (
	// @errTalk BadRequest
	BadRequest Error = http.StatusBadRequest*1e6 + iota + 1
	// @errTalk Md5 Checksum Failed
	MD5ChecksumFailed
	// @errTalk Invalid Chain Client
	InvalidChainClient
)
const (
	// @errTalk NotFound
	NotFound Error = http.StatusNotFound*1e6 + iota + 1
	// @errTalk Project Not Found
	ProjectNotFound
	// @errTalk Config Not Found
	ConfigNotFound
	// @errTalk Applet Not Found
	AppletNotFound
	// @errTalk Instance Not Found
	InstanceNotFound
	// @errTalk Resource Not Found
	ResourceNotFound
	// @errTalk Strategy Not Found
	StrategyNotFound
	// @errTalk Publisher Not Found
	PublisherNotFound
	// @errTalk Account Identity Not Found
	AccountIdentityNotFound
)

func (Error) CanBeTalk

func (v Error) CanBeTalk() bool

func (Error) Code

func (v Error) Code() int

func (Error) Error

func (v Error) Error() string

func (Error) Key

func (v Error) Key() string

func (Error) Msg

func (v Error) Msg() string

func (Error) ServiceCode

func (Error) ServiceCode() int

func (Error) StatusCode

func (v Error) StatusCode() int

func (Error) StatusErr

func (v Error) StatusErr() *statusx.StatusErr

func (Error) Unwrap

func (v Error) Unwrap() error

Jump to

Keyboard shortcuts

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