errors

package
v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(err error) bool

func IsNotExist

func IsNotExist(err error) bool

func IsNotRequired added in v0.7.0

func IsNotRequired(err error) bool

func IsUnderDeletion

func IsUnderDeletion(err error) bool

Types

type Reason

type Reason struct {
	Message      string
	StatusReason StatusReason
}

type Status

type Status interface {
	Status() Reason
}

type StatusError added in v0.12.0

type StatusError struct {
	Reason
}

func AlreadyExist

func AlreadyExist(s string) *StatusError

func NotExist

func NotExist(s string) *StatusError

func NotRequired added in v0.7.0

func NotRequired() *StatusError

func UnderDeletion

func UnderDeletion() *StatusError

func (*StatusError) Error added in v0.12.0

func (e *StatusError) Error() string

func (*StatusError) Status added in v0.12.0

func (e *StatusError) Status() Reason

type StatusReason

type StatusReason string
const (
	StatusReasonAlreadyExist  StatusReason = "already exist"
	StatusReasonNotExist      StatusReason = "resource not exist"
	StatusReasonUnderDeletion StatusReason = "under deletion"
	StatusReasonNotRequired   StatusReason = "not required"
	StatusReasonUnknown       StatusReason = "unknown"
)

func ReasonForError

func ReasonForError(err error) StatusReason

Jump to

Keyboard shortcuts

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