error

package
v0.0.0-...-ac41614 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 1 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EEmpty               = DBerror{"Parameter was empty or nil", eEMPTY}
	ELength              = DBerror{"Parameter is too long", eLENGTH}
	ENoVNode             = DBerror{"This node does not contain keys in this partition", eNO_VNODE}
	EStorage             = DBerror{"The storage driver experienced an error", eSTORAGE}
	ECorrupted           = DBerror{"The storage medium is corrupted", eCORRUPTED}
	EInvalidKey          = DBerror{"A key was misformatted", eINVALID_KEY}
	EInvalidBucket       = DBerror{"An invalid bucket was specified", eINVALID_BUCKET}
	EInvalidBatch        = DBerror{"An invalid batch was specified", eINVALID_BATCH}
	EMerkleRange         = DBerror{"An invalid merkle node was requested", eMERKLE_RANGE}
	EInvalidOp           = DBerror{"An invalid operation was specified", eINVALID_OP}
	EInvalidContext      = DBerror{"An invalid context was provided in an update", eINVALID_CONTEXT}
	EUnauthorized        = DBerror{"Operation not permitted", eUNAUTHORIZED}
	EInvalidPeer         = DBerror{"The specified peer is invalid", eINVALID_PEER}
	EReadBody            = DBerror{"Unable to read request body", eREAD_BODY}
	ERequestQuery        = DBerror{"Invalid query parameter format", eREQUEST_QUERY}
	EAlertBody           = DBerror{"Invalid alert body. Body must be true or false", eALERT_BODY}
	ENodeConfigBody      = DBerror{"Invalid node config body.", eNODE_CONFIG_BODY}
	ENodeDecommissioning = DBerror{"This node is in the process of leaving the cluster.", eNODE_DECOMMISSIONING}
	EDuplicateNodeID     = DBerror{"The ID the node is using was already used by a cluster member at some point.", eDUPLICATE_NODE_ID}
	EProposalError       = DBerror{"An error occurred while proposing cluster configuration change.", ePROPOSAL_ERROR}
	ESiteDoesNotExist    = DBerror{"The specified site does not exist at this node.", eNO_SUCH_SITE}
	ERelayDoesNotExist   = DBerror{"The specified relay does not exist at this node.", eNO_SUCH_RELAY}
	EBucketDoesNotExist  = DBerror{"The site does not contain the specified bucket.", eNO_SUCH_BUCKET}
	ENoQuorum            = DBerror{"The database operation was not able to achieve participation from the necessary number of replicas.", eNO_QUORUM}
	EOperationLocked     = DBerror{"The attempted operation is currently locked on the partition that the specified data belongs to.", eOPERATION_LOCKED}
	ESnapshotInProgress  = DBerror{"The specified snapshot is still in progress", eSNAPSHOT_IN_PROGRESS}
	ESnapshotOpenFailed  = DBerror{"The snapshot could not be opened.", eSNAPSHOT_OPEN_FAILED}
	ESnapshotReadFailed  = DBerror{"The snapshot could be opened, but it appears to be incomplete or invalid.", eSNAPSHOT_READ_FAILED}
)

Functions

This section is empty.

Types

type DBerror

type DBerror struct {
	Msg       string `json:"message"`
	ErrorCode int    `json:"code"`
}

func DBErrorFromJSON

func DBErrorFromJSON(encodedError []byte) (DBerror, error)

func (DBerror) Code

func (dbError DBerror) Code() int

func (DBerror) Error

func (dbError DBerror) Error() string

func (DBerror) JSON

func (dbError DBerror) JSON() []byte

Jump to

Keyboard shortcuts

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