errors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginError

type PluginError interface {
	// Error implements golang error interface
	Error() string

	// Type returns the type of CloudProviderError
	Type() PluginErrorType
}

func NewPluginError

func NewPluginError(errorType PluginErrorType, msg string, args ...interface{}) PluginError

NewPluginError returns new plugin error with a message constructed from format string

func ToPluginError

func ToPluginError(err error, errorType PluginErrorType) PluginError

type PluginErrorType

type PluginErrorType string

PluginErrorType describes a high-level category of a given error

const (
	// ApiCallError is an error related to communication with k8s API server
	ApiCallError PluginErrorType = "apiCallError"
	// InternalError is an error inside plugin
	InternalError PluginErrorType = "internalError"
	// ParameterError is an error related to bad parameters provided by a user
	ParameterError PluginErrorType = "parameterError"
	// NotImplementedError an error related to be not implemented by developers
	NotImplementedError PluginErrorType = "notImplementedError"
)

Jump to

Keyboard shortcuts

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