Documentation ¶
Index ¶
- func As(err error, target interface{}) bool
- func DisableLocationTracking()
- func EnableLocationTracking()
- func Is(err, target error) bool
- func NotFound(format string, args ...interface{}) error
- func Unknown(format string, args ...interface{}) error
- func Unwrap(err error) error
- func Wrap(code Status, err error) error
- type CallSite
- func (v *CallSite) Copy() *CallSite
- func (v *CallSite) CopyAsInterface() interface{}
- func (v *CallSite) Equal(u *CallSite) bool
- func (v *CallSite) IsValid() error
- func (v *CallSite) MarshalBinary() ([]byte, error)
- func (v *CallSite) UnmarshalBinary(data []byte) error
- func (v *CallSite) UnmarshalBinaryFrom(rd io.Reader) error
- type Error
- func (e *Error) CodeID() uint64
- func (v *Error) Copy() *Error
- func (v *Error) CopyAsInterface() interface{}
- func (v *Error) Equal(u *Error) bool
- func (e *Error) Error() string
- func (e *Error) Format(f fmt.State, verb rune)
- func (e *Error) Is(target error) bool
- func (v *Error) IsValid() error
- func (v *Error) MarshalBinary() ([]byte, error)
- func (v *Error) MarshalJSON() ([]byte, error)
- func (e *Error) Print() string
- func (e *Error) PrintFullCallstack() string
- func (v *Error) UnmarshalBinary(data []byte) error
- func (v *Error) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *Error) UnmarshalJSON(data []byte) error
- func (e *Error) Unwrap() error
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLocationTracking ¶
func DisableLocationTracking()
func EnableLocationTracking ¶
func EnableLocationTracking()
Types ¶
type CallSite ¶
type CallSite struct { FuncName string `json:"funcName,omitempty" form:"funcName" query:"funcName" validate:"required"` File string `json:"file,omitempty" form:"file" query:"file" validate:"required"` Line int64 `json:"line,omitempty" form:"line" query:"line" validate:"required"` // contains filtered or unexported fields }
func (*CallSite) CopyAsInterface ¶
func (v *CallSite) CopyAsInterface() interface{}
func (*CallSite) MarshalBinary ¶
func (*CallSite) UnmarshalBinary ¶
type Error ¶
type Error struct { Message string `json:"message,omitempty" form:"message" query:"message" validate:"required"` Code Status `json:"code,omitempty" form:"code" query:"code" validate:"required"` Cause *Error `json:"cause,omitempty" form:"cause" query:"cause" validate:"required"` CallStack []*CallSite `json:"callStack,omitempty" form:"callStack" query:"callStack" validate:"required"` // contains filtered or unexported fields }
func FormatWithCause ¶ added in v1.0.0
func (*Error) CopyAsInterface ¶
func (v *Error) CopyAsInterface() interface{}
func (*Error) MarshalBinary ¶
func (*Error) MarshalJSON ¶
func (*Error) PrintFullCallstack ¶
func (*Error) UnmarshalBinary ¶
func (*Error) UnmarshalJSON ¶
type Status ¶
type Status uint64
Status is a request status code.
const StatusBadRequest Status = 400
StatusBadRequest means the request was invalid.
const StatusBadSignerVersion Status = 411
StatusBadSignerVersion means the signer version does not match.
const StatusBadTimestamp Status = 412
StatusBadTimestamp means the timestamp is invalid.
const StatusBadUrlLength Status = 413
StatusBadUrlLength means the url length is too big.
const StatusConflict Status = 409
StatusConflict means the request failed due to a conflict.
const StatusDelivered Status = 201
StatusDelivered means the transaction has been delivered.
const StatusEncodingError Status = 502
StatusEncodingError means encoding or decoding failed.
const StatusFatalError Status = 503
StatusFatalError means something has gone seriously wrong.
const StatusIncompleteChain Status = 414
StatusIncompleteChain means the chain does not include the full history.
const StatusInsufficientBalance Status = 415
StatusInsufficientBalance means the account balance is insufficient to satisfy the request.
const StatusInsufficientCredits Status = 402
StatusInsufficientCredits means the signer does not have sufficient credits to execute the transaction.
const StatusInternalError Status = 500
StatusInternalError means an internal error occured.
const StatusNotAllowed Status = 405
StatusNotAllowed means the requested action could not be performed.
const StatusNotFound Status = 404
StatusNotFound means a record could not be found.
const StatusOK Status = 200
StatusOK means the request completed successfully.
const StatusPending Status = 202
StatusPending means the transaction is pending.
const StatusRemote Status = 203
StatusRemote means the transaction is a local reference to a remote.
const StatusUnauthenticated Status = 401
StatusUnauthenticated means the signature could not be validated.
StatusUnauthorized means the signer is not authorized to sign the transaction.
const StatusUnknownError Status = 501
StatusUnknownError means an unknown error occured.
const StatusWrongPartition Status = 301
StatusWrongPartition means the requested resource is assigned to a different network partition.
func StatusByName ¶
StatusByName returns the named Status.
func (Status) GetEnumValue ¶
GetEnumValue returns the value of the Status
func (Status) MarshalJSON ¶
MarshalJSON marshals the Status to JSON as a string.
func (*Status) SetEnumValue ¶
SetEnumValue sets the value. SetEnumValue returns false if the value is invalid.
func (*Status) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Status from JSON as a string.