error

package
v0.65.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCode_name = map[int32]string{
		0: "NO_ERROR",
		1: "UNKNOWN_ERROR",
		2: "BAD_INPUT_PARAMETER_ERROR",
		3: "MISSING_INPUT_PARAMETER_ERROR",
		4: "SOURCE_CONNECTION_ERROR",
	}
	ErrorCode_value = map[string]int32{
		"NO_ERROR":                      0,
		"UNKNOWN_ERROR":                 1,
		"BAD_INPUT_PARAMETER_ERROR":     2,
		"MISSING_INPUT_PARAMETER_ERROR": 3,
		"SOURCE_CONNECTION_ERROR":       4,
	}
)

Enum value maps for ErrorCode.

View Source
var File_util_error_error_proto protoreflect.FileDescriptor

Functions

func CreateBadInputParameterError

func CreateBadInputParameterError(parameter, value, explanation string) error

CreateBadInputParameterError is a helper method to create a consistent error result across plugins when an input parameter has an unexpected format.

func CreateErrorFileError added in v0.37.0

func CreateErrorFileError(filename string, err error) error

func CreateMissingInputParameterError

func CreateMissingInputParameterError(parameter string) error

CreateMissingInputParameterError is a helper method to create a consistent error result across plugins when a mandatory parameter is missing.

func CreateSourceConnectionError

func CreateSourceConnectionError(url, message string) error

CreateSourceConnectionError is a helper method to create a consistent error result across plugins when there is a connection problem to the data source or identity store.

func ToErrorResult

func ToErrorResult(err error) error

ToErrorResult is a helper method to create an ErrorResult from an error. If the error already is of type ErrorResult, the original is returned.

Types

type BadInputParameterError

type BadInputParameterError struct {
	// contains filtered or unexported fields
}

func (*BadInputParameterError) Error added in v0.37.0

func (e *BadInputParameterError) Error() string

type CreateFileError added in v0.37.0

type CreateFileError struct {
	// contains filtered or unexported fields
}

func (*CreateFileError) Error added in v0.37.0

func (e *CreateFileError) Error() string

func (*CreateFileError) Unwrap added in v0.37.0

func (e *CreateFileError) Unwrap() error

type ErrorCode

type ErrorCode int32
const (
	ErrorCode_NO_ERROR                      ErrorCode = 0
	ErrorCode_UNKNOWN_ERROR                 ErrorCode = 1
	ErrorCode_BAD_INPUT_PARAMETER_ERROR     ErrorCode = 2
	ErrorCode_MISSING_INPUT_PARAMETER_ERROR ErrorCode = 3
	ErrorCode_SOURCE_CONNECTION_ERROR       ErrorCode = 4
)

func (ErrorCode) Descriptor added in v0.32.0

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor

func (ErrorCode) Enum added in v0.32.0

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor deprecated added in v0.32.0

func (ErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorCode.Descriptor instead.

func (ErrorCode) Number added in v0.32.0

func (x ErrorCode) Number() protoreflect.EnumNumber

func (ErrorCode) String added in v0.32.0

func (x ErrorCode) String() string

func (ErrorCode) Type added in v0.32.0

type ErrorResult

type ErrorResult struct {
	ErrorMessage string    `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	ErrorCode    ErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=util.error.ErrorCode" json:"error_code,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorResult) Descriptor deprecated added in v0.32.0

func (*ErrorResult) Descriptor() ([]byte, []int)

Deprecated: Use ErrorResult.ProtoReflect.Descriptor instead.

func (*ErrorResult) GetErrorCode added in v0.32.0

func (x *ErrorResult) GetErrorCode() ErrorCode

func (*ErrorResult) GetErrorMessage added in v0.32.0

func (x *ErrorResult) GetErrorMessage() string

func (*ErrorResult) ProtoMessage added in v0.32.0

func (*ErrorResult) ProtoMessage()

func (*ErrorResult) ProtoReflect added in v0.32.0

func (x *ErrorResult) ProtoReflect() protoreflect.Message

func (*ErrorResult) Reset added in v0.32.0

func (x *ErrorResult) Reset()

func (*ErrorResult) String added in v0.32.0

func (x *ErrorResult) String() string

type MissingInputParameterError

type MissingInputParameterError struct {
	// contains filtered or unexported fields
}

func (*MissingInputParameterError) Error added in v0.37.0

type SourceConnectionError

type SourceConnectionError struct {
	// contains filtered or unexported fields
}

func (*SourceConnectionError) Error added in v0.37.0

func (e *SourceConnectionError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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