errtypes

package
v0.0.0-...-ba854f2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 57

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidParam represents the parameters are invalid.
	ErrInvalidParam = errorType{codeInvalidParam, "invalid param"}

	// ErrNotfound represents the object is not found, not exist.
	ErrNotfound = errorType{codeNotFound, "not found"}

	// ErrAlreadyExisted represents the object has already existed.
	ErrAlreadyExisted = errorType{codeAlreadyExisted, "already existed"}

	// ErrConflict represents the parameters are invalid.
	ErrConflict = errorType{codeConflict, "conflict"}

	// ErrTooMany reprensents the objects are too many.
	ErrTooMany = errorType{codeTooMany, "too many"}

	// ErrTimeout represents the operation is time out.
	ErrTimeout = errorType{codeTimeout, "time out"}

	// ErrLockfailed represents that failed to lock.
	ErrLockfailed = errorType{codeLockfailed, "lock failed"}

	// ErrNotImplemented represents that the function is not implemented.
	ErrNotImplemented = errorType{codeNotImplemented, "not implemented"}

	// ErrInUse represents that object is using.
	ErrInUse = errorType{codeInUse, "in use"}

	// ErrNotModified represents that the resource is not modified
	ErrNotModified = errorType{codeNotModified, "not modified"}

	// ErrPreCheckFailed represents that failed to pre check.
	ErrPreCheckFailed = errorType{codePreCheckFailed, "pre check failed"}

	// ErrInvalidAuthorization represents that authorization failed.
	ErrInvalidAuthorization = errorType{codeInvalidAuthorization, "authorization failed"}
)
View Source
var (
	// ErrVolumeInUse represents that volume in use.
	ErrVolumeInUse = errorType{codeInUse, "volume is in use"}

	// ErrVolumeNotFound represents that no such volume.
	ErrVolumeNotFound = errorType{codeNotFound, "no such volume"}

	// ErrVolumeExisted represents error is "volume exist"
	ErrVolumeExisted = errorType{codeVolumeExisted, "volume exist"}

	// ErrVolumeDriverNotFound represents error is "driver not found"
	ErrVolumeDriverNotFound = errorType{codeVolumeDriverNotFound, "driver not found"}

	// ErrVolumeMetaNotFound represents error is "local meta not found"
	ErrVolumeMetaNotFound = errorType{codeVolumeMetaNotFound, "local meta not found"}
)

Functions

func IsAlreadyExisted

func IsAlreadyExisted(err error) bool

IsAlreadyExisted checks the error is object AlreadyExisted or not.

func IsInUse

func IsInUse(err error) bool

IsInUse checks the error is using by others or not.

func IsInvalidAuthorization

func IsInvalidAuthorization(err error) bool

IsInvalidAuthorization checks the errors is authorization failure or not.

func IsInvalidParam

func IsInvalidParam(err error) bool

IsInvalidParam checks the error is the parameters are invalid or not.

func IsNotModified

func IsNotModified(err error) bool

IsNotModified checks the error is not modified error or not.

func IsNotfound

func IsNotfound(err error) bool

IsNotfound checks the error is object Notfound or not.

func IsPreCheckFailed

func IsPreCheckFailed(err error) bool

IsPreCheckFailed checks the error is failed to pre check or not.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout checks the error is time out or not.

func IsVolumeDriverNotFound

func IsVolumeDriverNotFound(err error) bool

IsVolumeDriverNotFound is used to check error is driverNotFound or not.

func IsVolumeExisted

func IsVolumeExisted(err error) bool

IsVolumeExisted is used to check error is volumeExisted or not.

func IsVolumeInUse

func IsVolumeInUse(err error) bool

IsVolumeInUse is used to check error is volume in use.

func IsVolumeMetaNotFound

func IsVolumeMetaNotFound(err error) bool

IsVolumeMetaNotFound is used to check error is localMetaNotFound or not.

func IsVolumeNotFound

func IsVolumeNotFound(err error) bool

IsVolumeNotFound is used to check error is volumeNotFound or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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