errtypes

package
v0.0.0-...-a79519d Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 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"}

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

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

	// ErrInvalidType represents the object's type is invalid.
	ErrInvalidType = errorType{codeInvalidType, "invalid type"}

	// 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"}

	// ErrUsingbyContainers represents that object is used by containers
	ErrUsingbyContainers = errorType{codeInUse, "using by containers"}
)

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 IsInvalidParam

func IsInvalidParam(err error) bool

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

func IsNotfound

func IsNotfound(err error) bool

IsNotfound checks the error is object Notfound or not.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout checks the error is time out 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