errorcode

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 0 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package errorcode contains a list of pre-defined error code to return to client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode string
const (
	// System error code
	Succeed ErrorCode = "0"

	// validate error code
	InvalidArg            ErrorCode = "100"
	InvalidParam          ErrorCode = "101"
	ValidationFail        ErrorCode = "102"
	InvalidWalletInActive ErrorCode = "103"

	// Business error code
	BizUnableParse            ErrorCode = "300"
	BizUnableCreateTX         ErrorCode = "301"
	BizUnableCreateWallet     ErrorCode = "302"
	BizUnableGetWallet        ErrorCode = "303"
	BizUnableUpdateWallet     ErrorCode = "304"
	BizUnableMintToken        ErrorCode = "305"
	BizUnableBurnToken        ErrorCode = "306"
	BizUnableCreateToken      ErrorCode = "307"
	BizBalanceNotEnough       ErrorCode = "308"
	BizUnableMapDecode        ErrorCode = "309"
	BizUnableGetTokenType     ErrorCode = "310"
	BizUnableGetTx            ErrorCode = "311"
	BizUnableApproveAllowance ErrorCode = "312"
	BizUnableGetAllowance     ErrorCode = "313"
	BizAllowanceNotEnough     ErrorCode = "314"
	BizUnableUpdateAllowance  ErrorCode = "315"
	BizUnableTransferDiffType ErrorCode = "316"
	BizUnableGetEnrollment    ErrorCode = "317"
	BizIssueNotPermission     ErrorCode = "318"
	BizUnableCreateEnrollment ErrorCode = "319"
	BizUnableUpdateTX         ErrorCode = "320"
	BizUnableCreateNFT        ErrorCode = "321"
	BizUnableGetNFT           ErrorCode = "322"
	BizUnableUpdateNFT        ErrorCode = "323"
)

func (ErrorCode) Code

func (e ErrorCode) Code() string

func (ErrorCode) Message

func (e ErrorCode) Message() string

type ErrorStruct

type ErrorStruct struct {
	ErrCode       ErrorCode
	MessageDetail string
}

func (ErrorStruct) Error

func (e ErrorStruct) Error() string

Jump to

Keyboard shortcuts

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