Documentation
¶
Index ¶
- func As(err error, target interface{}) bool
- func Is(err, target error) bool
- func Unwrap(err error) error
- type Error
- type Status
- func (s Status) Error() string
- func (v Status) GetEnumValue() uint64
- func (s Status) Is(target error) bool
- func (s Status) IsKnownError() bool
- func (v Status) MarshalJSON() ([]byte, error)
- func (v *Status) SetEnumValue(id uint64) bool
- func (s Status) Skip(n int) errors.Factory[Status]
- func (v Status) String() string
- func (v *Status) UnmarshalJSON(data []byte) error
- func (s Status) With(v ...interface{}) *errors.ErrorBase[Status]
- func (s Status) WithCauseAndFormat(cause error, format string, args ...interface{}) *errors.ErrorBase[Status]
- func (s Status) WithFormat(format string, args ...interface{}) *errors.ErrorBase[Status]
- func (s Status) Wrap(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Status ¶
type Status uint64
Status is a request status code.
const BadPassword Status = 403
BadPassword is returned when an incorrect decryption password.
const BadRequest Status = 400
BadRequest is returned when the request was invalid.
const Conflict Status = 409
Conflict is returned when the request failed due to a conflict.
const EncodingError Status = 502
EncodingError is returned when encoding or decoding failed.
const InternalError Status = 500
InternalError is returned when an internal error occurred.
const NoPassword Status = 401
NoPassword is returned when an encryption password is required.
const NotFound Status = 404
NotFound is returned when a record could not be found.
const NotSupported Status = 405
NotSupported is returned when a feature is used in a way that is not supported.
const OK Status = 200
OK is returned when the request completed successfully.
const OnePassNotSupported Status = 411
OnePassNotSupported is returned when 1Password integration isn't supported.
const UnknownError Status = 501
UnknownError is returned when an unknown error occurred.
const UnknownRpcError Status = 503
UnknownRpcError is returned when an unknown error occurred.
const VaultUnspecified Status = 412
VaultUnspecified is returned when a request requires a vault but none was specified.
func StatusByName ¶
StatusByName returns the named Status.
func (Status) GetEnumValue ¶
GetEnumValue returns the value of the Status
func (Status) IsKnownError ¶
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.