Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsStorageOSError ¶
Types ¶
type StorageOSError ¶
type StorageOSError interface {
// embedding error provides compatibility with standard error handling code
error
// Encoding/decoding methods to help errors traverse API boundaries
json.Marshaler
json.Unmarshaler
Err() error // Returns the underlying error that caused this event
String() string // A short string representing the error (for logging etc)
Help() string // A larger string that should provide informative debug instruction to users
Kind() StorageOSErrorKind // A type representing a set of known error conditions, helpful to switch on
Extra() map[string]string // A container for error specific information
}
func NewTypedStorageOSError ¶
func NewTypedStorageOSError(kind StorageOSErrorKind, err error, msg string, help string) StorageOSError
func NewUntypedStorageOSError ¶
func NewUntypedStorageOSError(err error, msg string, help string) StorageOSError
type StorageOSErrorKind ¶
type StorageOSErrorKind int
const ( UnknownError StorageOSErrorKind = iota APIUncontactable InvalidHostConfig )
Known error kinds
func ErrorKind ¶
func ErrorKind(err error) StorageOSErrorKind
func (*StorageOSErrorKind) MarshalJSON ¶
func (s *StorageOSErrorKind) MarshalJSON() ([]byte, error)
func (StorageOSErrorKind) String ¶
func (i StorageOSErrorKind) String() string
func (*StorageOSErrorKind) UnmarshalJSON ¶
func (s *StorageOSErrorKind) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.