errors

package
v0.0.0-...-1aaef2a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 1 more Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSFServiceNotFound         = "SFServiceNotFound"
	CodeSFPlanNotFound            = "SFPlanNotFound"
	CodeSFServiceInstanceNotFound = "SFServiceInstanceNotFound"
	CodeSFServiceBindingNotFound  = "SFServiceBindingNotFound"
	CodeSFClusterNotFound         = "SFClusterNotFound"
	CodeTemplateNotFound          = "TemplateNotFound"
	CodeSchedulerFailed           = "CodeSchedulerFailed"

	CodeOperationInProgress = "OperationInProgress"

	CodeRendererError = "RendererError"

	CodeClusterRegistryError = "ClusterRegistryError"
	CodeClusterIDNotSet      = "ClusterIDNotSet"

	CodeInputError        = "CodeInputError"
	CodeMarshalError      = "CodeMarshalError"
	CodeUnmarshalError    = "CodeUnmarshalError"
	CodeConvertError      = "CodeConvertError"
	CodePreconditionError = "CodePreconditionError"

	CodeUnknown = "Unknown"
)

Error codes

Variables

This section is empty.

Functions

func ClusterIDNotSet

func ClusterIDNotSet(err error) bool

ClusterIDNotSet checks whether error is of CodeClusterError type

func ClusterRegistryError

func ClusterRegistryError(err error) bool

ClusterRegistryError checks whether error is of CodeClusterError type

func ConvertError

func ConvertError(err error) bool

ConvertError checks whether error is of CodeConvertError type

func InputError

func InputError(err error) bool

InputError is true if the error indicates an InputError.

func MarshalError

func MarshalError(err error) bool

MarshalError checks whether error is of CodeMarshalError type

func NotFound

func NotFound(err error) bool

NotFound is true if the error indicates any not found error

func OperationInProgress

func OperationInProgress(err error) bool

OperationInProgress is true if the error indicates the requested service binding is not found.

func PreconditionError

func PreconditionError(err error) bool

PreconditionError is true if the error indicates an PreconditionError.

func RendererError

func RendererError(err error) bool

RendererError is true if the error indicates renderer error.

func SFClusterNotFound

func SFClusterNotFound(err error) bool

SFClusterNotFound is true if the error indicates the requested cluster object is not found.

func SFPlanNotFound

func SFPlanNotFound(err error) bool

SFPlanNotFound is true if the error indicates the requested service plan is not found.

func SFServiceBindingNotFound

func SFServiceBindingNotFound(err error) bool

SFServiceBindingNotFound is true if the error indicates the requested service binding is not found.

func SFServiceInstanceNotFound

func SFServiceInstanceNotFound(err error) bool

SFServiceInstanceNotFound is true if the error indicates the requested service instance is not found.

func SFServiceNotFound

func SFServiceNotFound(err error) bool

SFServiceNotFound is true if the error indicates the requested service is not found.

func SchedulerFailed

func SchedulerFailed(err error) bool

SchedulerFailed is true if the error indicates an SchedulerFailed.

func TemplateNotFound

func TemplateNotFound(err error) bool

TemplateNotFound is true if the error indicates TemplateNotFound error.

func UnmarshalError

func UnmarshalError(err error) bool

UnmarshalError checks whether error is of CodeUnmarshalError type

Types

type ErrorCodeType

type ErrorCodeType string

ErrorCodeType is the type for error codes

func ErrorCode

func ErrorCode(err error) ErrorCodeType

ErrorCode returns the HTTP status for a particular error.

type InteroperatorError

type InteroperatorError struct {
	Err     error
	Code    ErrorCodeType
	Message string
}

InteroperatorError generic error implementation used by interoperator

func NewClusterIDNotSet

func NewClusterIDNotSet(name string, err error) *InteroperatorError

NewClusterIDNotSet returns new error indicating clusterID is not set for the instance

func NewClusterRegistryError

func NewClusterRegistryError(message string, err error) *InteroperatorError

NewClusterRegistryError returns new error indicating incorrect arguments passed.

func NewConvertError

func NewConvertError(message string, err error) *InteroperatorError

NewConvertError returns new error indicating error converting between formats

func NewInputError

func NewInputError(fn, inputs string, err error) *InteroperatorError

NewInputError returns a new error which indicates error in args to a functions

func NewMarshalError

func NewMarshalError(message string, err error) *InteroperatorError

NewMarshalError returns new error indicating marshalling to specific format failed.

func NewOperationInProgress

func NewOperationInProgress(name string, err error) *InteroperatorError

NewOperationInProgress returns a new error which indicates that some operation is progress.

func NewPreconditionError

func NewPreconditionError(fn, message string, err error) *InteroperatorError

NewPreconditionError returns a new error which indicates precondition not met

func NewRendererError

func NewRendererError(rendererType, message string, err error) *InteroperatorError

NewRendererError returns a new error which indicates renderer error

func NewSFClusterNotFound

func NewSFClusterNotFound(name string, err error) *InteroperatorError

NewSFClusterNotFound returns a new error which indicates that the SfService is not found.

func NewSFPlanNotFound

func NewSFPlanNotFound(name string, err error) *InteroperatorError

NewSFPlanNotFound returns a new error which indicates that the SfService is not found.

func NewSFServiceBindingNotFound

func NewSFServiceBindingNotFound(name string, err error) *InteroperatorError

NewSFServiceBindingNotFound returns a new error which indicates that the SfService is not found.

func NewSFServiceInstanceNotFound

func NewSFServiceInstanceNotFound(name string, err error) *InteroperatorError

NewSFServiceInstanceNotFound returns a new error which indicates that the SfService is not found.

func NewSFServiceNotFound

func NewSFServiceNotFound(name string, err error) *InteroperatorError

NewSFServiceNotFound returns a new error which indicates that the SfService is not found.

func NewSchedulerFailed

func NewSchedulerFailed(schedulerType, message string, err error) *InteroperatorError

NewSchedulerFailed returns a new error which indicates that scheduler failed

func NewTemplateNotFound

func NewTemplateNotFound(name, planID string, err error) *InteroperatorError

NewTemplateNotFound returns a new error which indicates plan template not found

func NewUnmarshalError

func NewUnmarshalError(message string, err error) *InteroperatorError

NewUnmarshalError returns new error new error indicating unmarshalling from specific format failed.

func (*InteroperatorError) Error

func (e *InteroperatorError) Error() string

Error returns an error message describing 'e'.

Jump to

Keyboard shortcuts

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