fault

package
v0.0.0-...-dba23ac Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: ISC Imports: 0 Imported by: 0

Documentation

Overview

error instances

Provides a single instance of errors to allow easy comparison

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyInitialised               = ExistsError("already initialised")
	ErrBitmarkConsoleIsNotRunning       = ProcessError("Bitmark console is not running")
	ErrBitcoinAddress                   = InvalidError("Invalid bitcoin address")
	ErrBitcoindIsNotRunning             = InvalidError("Bitcoind is not running")
	ErrBitcoindIsRunning                = InvalidError("Bitcoind not running")
	ErrBitmarkdIsNotRunning             = InvalidError("Bitmarkd is not running")
	ErrBitmarkdIsRunning                = InvalidError("Bitmarkd is running")
	ErrProoferdIsNotRunning             = InvalidError("Prooferd is not running")
	ErrProoferdIsRunning                = InvalidError("Prooferd is running")
	ErrBitmarkPayIsRunning              = InvalidError("Bitmark-pay is running")
	ErrCertificateFileAlreadyExists     = ExistsError("certificate file already exists")
	ErrConfigFileExited                 = ExistsError("Config file is existed")
	ErrExecBitmarkPayJob                = ProcessError("Failed to execute bitmark pay job ")
	ErrInvalidAccessBitmarkPayJobResult = InvalidError("invalid access bitmark-pay job result")
	ErrInvalidCommandType               = InvalidError("invalid command type")
	ErrInvalidCommandParams             = InvalidError("invalid command params")
	ErrInvalidLoggerChannel             = InvalidError("invalid logger channel")
	ErrInvalidStructPointer             = InvalidError("invalid struct pointer")
	ErrJsonParseFail                    = ProcessError("Parse to json failed")
	ErrKeyFileAlreadyExists             = ExistsError("key file already exists")
	ErrNodeInfoRequestFail              = ProcessError("Send info request failed")
	ErrNotFoundBitmarkPayJob            = NotFoundError("bitmark-pay job is not found")
	ErrNotFoundBinFile                  = NotFoundError("Bin file is not found")
	ErrNotFoundConfigFile               = NotFoundError("Config file is not found")
	ErrNotFoundPublicKey                = NotFoundError("PublicKey is not existed")
	ErrNotInitialised                   = NotFoundError("not initialised")
	ErrPasswordLength                   = InvalidError("Password Length is invalid")
	ErrVerifiedPassword                 = InvalidError("Verified password is different")
	ErrWrongPassword                    = InvalidError("Wrong password")

	// For API response
	ApiErrAlreadyLoggedIn = InvalidError("Already logged in")
	ApiErrChekAuthorize   = InvalidError("Failed to check authorization")
	ApiErrSetAuthorize    = InvalidError("Failed to authorize")
	ApiErrUnauthorized    = InvalidError("API Unauthorized")
)

common errors - keep in alphabetic order

Functions

func IsErrExists

func IsErrExists(e error) bool

determine the class of an error

func IsErrInvalid

func IsErrInvalid(e error) bool

func IsErrNotFound

func IsErrNotFound(e error) bool

func IsErrProcess

func IsErrProcess(e error) bool

Types

type ExistsError

type ExistsError GenericError

to allow for different classes of errors

func (ExistsError) Error

func (e ExistsError) Error() string

the error interface methods

type GenericError

type GenericError string

error base

func (GenericError) Error

func (e GenericError) Error() string

the error interface base method

type InvalidError

type InvalidError GenericError

func (InvalidError) Error

func (e InvalidError) Error() string

type NotFoundError

type NotFoundError GenericError

func (NotFoundError) Error

func (e NotFoundError) Error() string

type ProcessError

type ProcessError GenericError

func (ProcessError) Error

func (e ProcessError) Error() string

Jump to

Keyboard shortcuts

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