Documentation
¶
Index ¶
- Variables
- type ErrorCode
- type ErrorResult
- func (*ErrorResult) Descriptor() ([]byte, []int)deprecated
- func (e ErrorResult) Error() string
- func (x *ErrorResult) GetErrorCode() ErrorCode
- func (x *ErrorResult) GetErrorMessage() string
- func (*ErrorResult) ProtoMessage()
- func (x *ErrorResult) ProtoReflect() protoreflect.Message
- func (x *ErrorResult) Reset()
- func (x *ErrorResult) String() string
Constants ¶
This section is empty.
Variables ¶
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.
var File_util_error_error_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ErrorCode ¶
type ErrorCode int32
func (ErrorCode) Descriptor ¶ added in v0.32.0
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
added in
v0.32.0
func (ErrorCode) Number ¶ added in v0.32.0
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶ added in v0.32.0
func (ErrorCode) Type() protoreflect.EnumType
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 CreateBadInputParameterError ¶
func CreateBadInputParameterError(parameter, value, explanation string) *ErrorResult
CreateBadInputParameterError is a helper method to create a consistent error result across plugins when an input parameter has an unexpected format.
func CreateMissingInputParameterError ¶
func CreateMissingInputParameterError(parameter string) *ErrorResult
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) *ErrorResult
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) *ErrorResult
ToErrorResult is a helper method to to create an ErrorResult from an error. If the error already is of type ErrorResult, the original is returned.
func (*ErrorResult) Descriptor
deprecated
added in
v0.32.0
func (*ErrorResult) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResult.ProtoReflect.Descriptor instead.
func (ErrorResult) Error ¶
func (e ErrorResult) Error() string
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