status_codes

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 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

Index

Constants

View Source
const (
	InvalidParams       = 1001
	IncorrectAddress    = 100101
	DomainMissing       = 100102
	OwnerAddressMissing = 100103
	OnSaleFlagNotSet    = 100104

	IOError        = 1002
	IOErrorNodeKey = 100201

	ParseError        = 1003
	ParseErrorAddress = 100301

	ConfigurationError          = 1004
	ConfigurationErrorChainType = 100401

	ResourceNotFoundError = 1005
	AccountNotFound       = 100501
	DomainNotFound        = 100502

	InternalError                  = 1006
	InternalErrorSerialization     = 100601
	InternalErrorSigning           = 100602
	InternalErrorGeneratingKeyPair = 100603
	InternalErrorGettingBalance    = 100604
	InternalErrorListValidators    = 100605

	WalletError               = 2006
	WalletErrorAddingAccount  = 200601
	WalletErrorGettingAccount = 200602
	WalletErrorDeleteAccount  = 200603

	AccountsError                     = 2007
	AccountsErrorGeneratingNewAccount = 200701

	// Transaction statuses
	TxErrMisingData         = 300101
	TxErrUnserializable     = 300102
	TxErrWrongTxType        = 300103
	TxErrInvalidAmount      = 300104
	TxErrInvalidPubKey      = 300105
	TxErrUnmatchedSigner    = 300106
	TxErrInvalidSignature   = 300107
	TxErrInvalidFeeCurrency = 300108
	TxErrInvalidFeePrice    = 300109
	TxErrInsufficientFunds  = 300110
	TxErrGasOverflow        = 300111
)

Variables

View Source
var (
	ErrSerialization = ProtocolError{InternalErrorSerialization, "error in serialization"}

	ErrLoadingNodeKey = ProtocolError{IOErrorNodeKey, "error reading node key file"}
	ErrParsingAddress = ProtocolError{ParseErrorAddress, "error parsing address"}
	ErrChainType      = ProtocolError{ConfigurationErrorChainType, "error getting chain type"}

	ErrAddingAccount   = ProtocolError{WalletErrorAddingAccount, "error adding account to wallet"}
	ErrGettingAccount  = ProtocolError{WalletErrorGettingAccount, "error getting account from wallet"}
	ErrDeletingAccount = ProtocolError{WalletErrorDeleteAccount, "error in deleting account"}

	ErrGeneratingAccount = ProtocolError{AccountsErrorGeneratingNewAccount, "error generating new account"}
	ErrAccountNotFound   = ProtocolError{AccountNotFound, "account doesn't in wallet"}
	ErrSigningError      = ProtocolError{InternalErrorSigning, "error while signing"}
	ErrKeyGeneration     = ProtocolError{InternalErrorGeneratingKeyPair, "error generating key pair"}

	// Query errors
	ErrBadAddress     = ProtocolError{IncorrectAddress, "address incorrect"}
	ErrGettingBalance = ProtocolError{InternalErrorGettingBalance, "error  getting balance"}
	ErrListValidators = ProtocolError{InternalErrorListValidators, "error getting list of validators"}

	// ONS errors
	ErrBadName        = ProtocolError{DomainMissing, "domain name not provided"}
	ErrBadOwner       = ProtocolError{OwnerAddressMissing, "owner address not provided"}
	ErrDomainNotFound = ProtocolError{DomainNotFound, "domain not found"}
	ErrFlagNotSet     = ProtocolError{OnSaleFlagNotSet, "onsale flag not set"}
)

Status declarations

Functions

This section is empty.

Types

type ProtocolError

type ProtocolError struct {
	Code int
	Msg  string
}

Protocol Error definition

func WrapError

func WrapError(err error, code int, msg string) *ProtocolError

func (ProtocolError) Error

func (se ProtocolError) Error() string

func (ProtocolError) ErrorMsg

func (se ProtocolError) ErrorMsg() string

func (ProtocolError) Wrap

func (se ProtocolError) Wrap(err error) *ProtocolError

Jump to

Keyboard shortcuts

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