wskderrors

package
v0.0.0-...-c4bc982 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// Error message compositional strings
	STR_UNKNOWN_VALUE         = "Unknown value"
	STR_COMMAND               = "Command"
	STR_ERROR_CODE            = "Error code"
	STR_FILE                  = "File"
	STR_PARAMETER             = "Parameter"
	STR_TYPE                  = "Type"
	STR_EXPECTED              = "Expected"
	STR_ACTUAL                = "Actual"
	STR_NEWLINE               = "\n"
	STR_ACTION                = "Action"
	STR_RUNTIME               = "Runtime"
	STR_SUPPORTED_RUNTIMES    = "Supported Runtimes"
	STR_HTTP_STATUS           = "HTTP Response Status"
	STR_HTTP_BODY             = "HTTP Response Body"
	STR_SUPPORTED_WEB_EXPORTS = "Supported Web Exports"
	STR_WEB_EXPORT            = "web-export"
	STR_API                   = "API"
	STR_API_METHOD            = "API gateway method"
	STR_API_SUPPORTED_METHODS = "API gateway supported methods"

	// Formatting
	STR_INDENT_1 = "==>"

	// Error Types
	ERROR_COMMAND_FAILED                  = "ERROR_COMMAND_FAILED"
	ERROR_WHISK_CLIENT_ERROR              = "ERROR_WHISK_CLIENT_ERROR"
	ERROR_WHISK_CLIENT_INVALID_CONFIG     = "ERROR_WHISK_CLIENT_INVALID_CONFIG"
	ERROR_FILE_READ_ERROR                 = "ERROR_FILE_READ_ERROR"
	ERROR_MANIFEST_FILE_NOT_FOUND         = "ERROR_MANIFEST_FILE_NOT_FOUND"
	ERROR_YAML_FILE_FORMAT_ERROR          = "ERROR_YAML_FILE_FORMAT_ERROR"
	ERROR_YAML_PARSER_ERROR               = "ERROR_YAML_PARSER_ERROR"
	ERROR_YAML_PARAMETER_TYPE_MISMATCH    = "ERROR_YAML_PARAMETER_TYPE_MISMATCH"
	ERROR_YAML_INVALID_PARAMETER_TYPE     = "ERROR_YAML_INVALID_PARAMETER_TYPE"
	ERROR_YAML_INVALID_RUNTIME            = "ERROR_YAML_INVALID_RUNTIME"
	ERROR_YAML_INVALID_WEB_EXPORT         = "ERROR_YAML_INVALID_WEB_EXPORT"
	ERROR_YAML_INVALID_API                = "ERROR_YAML_INVALID_API"
	ERROR_YAML_INVALID_API_GATEWAY_METHOD = "ERROR_YAML_INVALID_API_GATEWAY_METHOD"
	ERROR_RUNTIME_PARSER_FAILURE          = "ERROR_RUNTIME_PARSER_FAILURE"
	ERROR_ACTION_ANNOTATION               = "ERROR_ACTION_ANNOTATION"
)

Variables

This section is empty.

Functions

func AppendDetailToErrorMessage

func AppendDetailToErrorMessage(detail string, add string, location int) string

func IsCustomError

func IsCustomError(err error) bool

Types

type CommandError

type CommandError struct {
	WskDeployBaseErr
	Command string
}

* CommandError

func NewCommandError

func NewCommandError(cmd string, errorMessage string) *CommandError

type DeployError

type DeployError struct {
	WskDeployBaseErr
}

* Failed to Retrieve/Parse Runtime

func NewActionSecureKeyError

func NewActionSecureKeyError(errorMsg string) *DeployError

type ErrorManifestFileNotFound

type ErrorManifestFileNotFound struct {
	FileError
}

* ManifestFileNotFoundError

func NewErrorManifestFileNotFound

func NewErrorManifestFileNotFound(fpath string, errMessage interface{}) *ErrorManifestFileNotFound

type FileError

type FileError struct {
	WskDeployBaseErr
	ErrorFileName string
	ErrorFilePath string
}

* FileError

func (*FileError) Error

func (e *FileError) Error() string

func (*FileError) SetErrorFileName

func (e *FileError) SetErrorFileName(fname string)

func (*FileError) SetErrorFilePath

func (e *FileError) SetErrorFilePath(fpath string)

type FileReadError

type FileReadError struct {
	FileError
}

func NewFileReadError

func NewFileReadError(fpath string, errMessage interface{}) *FileReadError

type InvalidAPIGatewayMethodError

type InvalidAPIGatewayMethodError struct {
	FileError

	SupportedMethods []string
	// contains filtered or unexported fields
}

* Invalid API Gateway Method

func NewInvalidAPIGatewayMethodError

func NewInvalidAPIGatewayMethodError(fpath string, api string, method string, supportedMethods []string) *InvalidAPIGatewayMethodError

type InvalidParameterTypeError

type InvalidParameterTypeError struct {
	FileError
	Parameter  string
	ActualType string
}

* InvalidParameterType

type InvalidRuntimeError

type InvalidRuntimeError struct {
	FileError
	Runtime           string
	SupportedRuntimes []string
}

* InvalidRuntime

func NewInvalidRuntimeError

func NewInvalidRuntimeError(errMessage string, fpath string, action string, runtime string, supportedRuntimes []string) *InvalidRuntimeError

type InvalidWebActionAPIError

type InvalidWebActionAPIError struct {
	WskDeployBaseErr
}

* Invalid Web Action API

func NewInvalidWebActionError

func NewInvalidWebActionError(apiName string, actionName string, isSequence bool) *InvalidWebActionAPIError

type InvalidWebExportError

type InvalidWebExportError struct {
	FileError
	Webexport           string
	SupportedWebexports []string
}

* InvalidWebExport

func NewInvalidWebExportError

func NewInvalidWebExportError(fpath string, action string, webexport string, supportedWebexports []string) *InvalidWebExportError

type ParameterTypeMismatchError

type ParameterTypeMismatchError struct {
	FileError
	Parameter    string
	ExpectedType string
	ActualType   string
}

* ParameterTypeMismatchError

func NewInvalidParameterTypeError

func NewInvalidParameterTypeError(fpath string, param string, actualType string) *ParameterTypeMismatchError

func NewParameterTypeMismatchError

func NewParameterTypeMismatchError(fpath string, param string, expectedType string, actualType string) *ParameterTypeMismatchError

type RuntimeParserError

type RuntimeParserError struct {
	WskDeployBaseErr
}

* Failed to Retrieve/Parse Runtime

func NewRuntimeParserError

func NewRuntimeParserError(errorMsg string) *RuntimeParserError

type WhiskClientError

type WhiskClientError struct {
	WskDeployBaseErr
	ErrorCode int
}

* WhiskClientError

func NewWhiskClientError

func NewWhiskClientError(errorMessage string, code int, response *http.Response) *WhiskClientError

type WhiskClientInvalidConfigError

type WhiskClientInvalidConfigError struct {
	WskDeployBaseErr
}

* WhiskClientInvalidConfigError

func NewWhiskClientInvalidConfigError

func NewWhiskClientInvalidConfigError(errorMessage string) *WhiskClientInvalidConfigError

type WskDeployBaseErr

type WskDeployBaseErr struct {
	ErrorType     string
	FileName      string
	LineNum       int
	Message       string
	MessageFormat string
}

* BaseError

func NewWskDeployBaseError

func NewWskDeployBaseError(typ string, fn string, ln int, msg string) *WskDeployBaseErr

func (*WskDeployBaseErr) AppendDetail

func (e *WskDeployBaseErr) AppendDetail(detail string)

func (*WskDeployBaseErr) Error

func (e *WskDeployBaseErr) Error() string

func (*WskDeployBaseErr) GetMessage

func (e *WskDeployBaseErr) GetMessage() string

func (*WskDeployBaseErr) GetMessageFormat

func (e *WskDeployBaseErr) GetMessageFormat() string

func (*WskDeployBaseErr) SetCallerByStackFrameSkip

func (e *WskDeployBaseErr) SetCallerByStackFrameSkip(skip int)

func Caller(skip int) (pc uintptr, file string, line int, ok bool)

func (*WskDeployBaseErr) SetErrorType

func (e *WskDeployBaseErr) SetErrorType(errorType string)

func (*WskDeployBaseErr) SetFileName

func (e *WskDeployBaseErr) SetFileName(fileName string)

func (*WskDeployBaseErr) SetLineNum

func (e *WskDeployBaseErr) SetLineNum(lineNum int)

func (*WskDeployBaseErr) SetMessage

func (e *WskDeployBaseErr) SetMessage(message interface{})

func (*WskDeployBaseErr) SetMessageFormat

func (e *WskDeployBaseErr) SetMessageFormat(fmt string)

type YAMLFileFormatError

type YAMLFileFormatError struct {
	FileError
}

* YAMLFileFormatError

func NewYAMLFileFormatError

func NewYAMLFileFormatError(fpath string, errorMessage interface{}) *YAMLFileFormatError

type YAMLParserError

type YAMLParserError struct {
	FileError
	// contains filtered or unexported fields
}

* YAMLParserErr

func NewYAMLParserErr

func NewYAMLParserErr(fpath string, msg interface{}) *YAMLParserError

Jump to

Keyboard shortcuts

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