Documentation
¶
Overview ¶
Package errors provides custom error types for the godock client
Index ¶
- Variables
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsDaemonNotRunning(err error) bool
- func IsInvalidConfig(err error) bool
- func IsNotFound(err error) bool
- func IsTimeout(err error) bool
- func New(message string) error
- func Wrap(err error, message string) error
- type ConfigError
- type ContainerError
- type DaemonNotRunningError
- type ExecError
- type ImageError
- type NetworkError
- type ResourceExistsError
- type ResourceNotFoundError
- type ValidationError
- type VolumeError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when a resource is not found ErrNotFound = errors.New("resource not found") // ErrAlreadyExists is returned when attempting to create a resource that already exists ErrAlreadyExists = errors.New("resource already exists") // ErrInvalidConfig is returned when a configuration is invalid ErrInvalidConfig = errors.New("invalid configuration") // ErrDaemonNotRunning is returned when the Docker daemon is not running ErrDaemonNotRunning = errors.New("docker daemon is not running") // ErrTimeout is returned when an operation times out ErrTimeout = errors.New("operation timed out") // ErrCanceled is returned when an operation is canceled ErrCanceled = errors.New("operation canceled") )
Functions ¶
func IsAlreadyExists ¶
IsAlreadyExists returns true if the error is an already exists error
func IsCanceled ¶
IsCanceled returns true if the error is a canceled error
func IsDaemonNotRunning ¶
IsDaemonNotRunning returns true if the error is a daemon not running error
func IsInvalidConfig ¶
IsInvalidConfig returns true if the error is an invalid config error
func IsNotFound ¶
IsNotFound returns true if the error is a not found error
Types ¶
type ConfigError ¶
ConfigError represents an invalid configuration error
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
func (*ConfigError) Is ¶
func (e *ConfigError) Is(target error) bool
Is implements the errors.Is interface
type ContainerError ¶
ContainerError represents a container-specific error
func (*ContainerError) Error ¶
func (e *ContainerError) Error() string
type DaemonNotRunningError ¶
type DaemonNotRunningError struct {
Message string
}
DaemonNotRunningError represents an error when the Docker daemon is not running
func (*DaemonNotRunningError) Error ¶
func (e *DaemonNotRunningError) Error() string
func (*DaemonNotRunningError) Is ¶
func (e *DaemonNotRunningError) Is(target error) bool
Is implements the errors.Is interface
type ImageError ¶
ImageError represents an image-specific error
func (*ImageError) Error ¶
func (e *ImageError) Error() string
type NetworkError ¶
NetworkError represents a network-specific error
func (*NetworkError) Error ¶
func (e *NetworkError) Error() string
type ResourceExistsError ¶
ResourceExistsError represents an already exists error for a specific resource
func (*ResourceExistsError) Error ¶
func (e *ResourceExistsError) Error() string
func (*ResourceExistsError) Is ¶
func (e *ResourceExistsError) Is(target error) bool
Is implements the errors.Is interface
type ResourceNotFoundError ¶
ResourceNotFoundError represents a not found error for a specific resource
func (*ResourceNotFoundError) Error ¶
func (e *ResourceNotFoundError) Error() string
func (*ResourceNotFoundError) Is ¶
func (e *ResourceNotFoundError) Is(target error) bool
Is implements the errors.Is interface
type ValidationError ¶
ValidationError represents a validation error
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Is ¶
func (e *ValidationError) Is(target error) bool
Is implements the errors.Is interface
type VolumeError ¶
VolumeError represents a volume-specific error
func (*VolumeError) Error ¶
func (e *VolumeError) Error() string