Documentation ¶
Index ¶
- Constants
- Variables
- func ServiceErrorDecoder(payload []byte) error
- func ServiceErrorEntityNotFoundEncoder(errorInfoMetadata map[string]string, ...) ([]byte, error)
- func ServiceErrorUserNotEligibleForActionEncoder(errorInfoMetadata map[string]string, debugInfoDetails *errdetails.DebugInfo) ([]byte, error)
- func ServiceErrorValidationErrorEncoder(errorInfoMetadata map[string]string, badRequestDetails *errdetails.BadRequest, ...) ([]byte, error)
- type ServiceError
- func (ServiceError) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceError) Enum() *ServiceError
- func (ServiceError) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceError) Number() protoreflect.EnumNumber
- func (x ServiceError) String() string
- func (ServiceError) Type() protoreflect.EnumType
- type ServiceErrorEntityNotFound
- func (e ServiceErrorEntityNotFound) Code() code.Code
- func (e ServiceErrorEntityNotFound) DebugInfoDetails() *errdetails.DebugInfo
- func (e ServiceErrorEntityNotFound) Error() string
- func (e ServiceErrorEntityNotFound) ErrorInfoDetails() *errdetails.ErrorInfo
- func (e ServiceErrorEntityNotFound) ResourceInfoDetails() *errdetails.ResourceInfo
- type ServiceErrorUserNotEligibleForAction
- type ServiceErrorValidationError
- func (e ServiceErrorValidationError) BadRequestDetails() *errdetails.BadRequest
- func (e ServiceErrorValidationError) Code() code.Code
- func (e ServiceErrorValidationError) DebugInfoDetails() *errdetails.DebugInfo
- func (e ServiceErrorValidationError) Error() string
- func (e ServiceErrorValidationError) ErrorInfoDetails() *errdetails.ErrorInfo
Constants ¶
View Source
const ( ServiceErrorEntityNotFoundCode = 5 ServiceErrorEntityNotFoundDomain = "service.entity" ServiceErrorEntityNotFoundReason = "SERVICE_ERROR_ENTITY_NOT_FOUND" ServiceErrorUserNotEligibleForActionCode = 7 ServiceErrorUserNotEligibleForActionDomain = "service.entity" ServiceErrorUserNotEligibleForActionReason = "SERVICE_ERROR_USER_NOT_ELIGIBLE_FOR_ACTION" ServiceErrorValidationErrorCode = 3 ServiceErrorValidationErrorDomain = "service.entity" ServiceErrorValidationErrorReason = "SERVICE_ERROR_VALIDATION_ERROR" )
Variables ¶
View Source
var ( ServiceError_name = map[int32]string{ 0: "SERVICE_ERROR_UNSPECIFIED", 1: "SERVICE_ERROR_ENTITY_NOT_FOUND", 2: "SERVICE_ERROR_USER_NOT_ELIGIBLE_FOR_ACTION", 3: "SERVICE_ERROR_VALIDATION_ERROR", } ServiceError_value = map[string]int32{ "SERVICE_ERROR_UNSPECIFIED": 0, "SERVICE_ERROR_ENTITY_NOT_FOUND": 1, "SERVICE_ERROR_USER_NOT_ELIGIBLE_FOR_ACTION": 2, "SERVICE_ERROR_VALIDATION_ERROR": 3, } )
Enum value maps for ServiceError.
View Source
var File_example_service_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func ServiceErrorDecoder ¶ added in v0.2.0
func ServiceErrorEntityNotFoundEncoder ¶
func ServiceErrorEntityNotFoundEncoder( errorInfoMetadata map[string]string, resourceInfoDetails *errdetails.ResourceInfo, debugInfoDetails *errdetails.DebugInfo, ) ([]byte, error)
func ServiceErrorValidationErrorEncoder ¶ added in v0.2.0
func ServiceErrorValidationErrorEncoder( errorInfoMetadata map[string]string, badRequestDetails *errdetails.BadRequest, debugInfoDetails *errdetails.DebugInfo, ) ([]byte, error)
Types ¶
type ServiceError ¶
type ServiceError int32
const ( // The default value is reserved for the proto compiler. ServiceError_SERVICE_ERROR_UNSPECIFIED ServiceError = 0 // The entity was not found. ServiceError_SERVICE_ERROR_ENTITY_NOT_FOUND ServiceError = 1 // The user is not eligible for the action. ServiceError_SERVICE_ERROR_USER_NOT_ELIGIBLE_FOR_ACTION ServiceError = 2 // The validation of the request failed. ServiceError_SERVICE_ERROR_VALIDATION_ERROR ServiceError = 3 )
func (ServiceError) Descriptor ¶
func (ServiceError) Descriptor() protoreflect.EnumDescriptor
func (ServiceError) Enum ¶
func (x ServiceError) Enum() *ServiceError
func (ServiceError) EnumDescriptor
deprecated
func (ServiceError) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceError.Descriptor instead.
func (ServiceError) Number ¶
func (x ServiceError) Number() protoreflect.EnumNumber
func (ServiceError) String ¶
func (x ServiceError) String() string
func (ServiceError) Type ¶
func (ServiceError) Type() protoreflect.EnumType
type ServiceErrorEntityNotFound ¶
type ServiceErrorEntityNotFound struct {
// contains filtered or unexported fields
}
func NewServiceErrorEntityNotFound ¶
func NewServiceErrorEntityNotFound( code code.Code, errorInfoDetails *errdetails.ErrorInfo, resourceInfoDetails *errdetails.ResourceInfo, debugInfoDetails *errdetails.DebugInfo, ) ServiceErrorEntityNotFound
func (ServiceErrorEntityNotFound) Code ¶
func (e ServiceErrorEntityNotFound) Code() code.Code
func (ServiceErrorEntityNotFound) DebugInfoDetails ¶ added in v0.2.0
func (e ServiceErrorEntityNotFound) DebugInfoDetails() *errdetails.DebugInfo
func (ServiceErrorEntityNotFound) Error ¶
func (e ServiceErrorEntityNotFound) Error() string
func (ServiceErrorEntityNotFound) ErrorInfoDetails ¶ added in v0.2.0
func (e ServiceErrorEntityNotFound) ErrorInfoDetails() *errdetails.ErrorInfo
func (ServiceErrorEntityNotFound) ResourceInfoDetails ¶ added in v0.2.0
func (e ServiceErrorEntityNotFound) ResourceInfoDetails() *errdetails.ResourceInfo
type ServiceErrorUserNotEligibleForAction ¶
type ServiceErrorUserNotEligibleForAction struct {
// contains filtered or unexported fields
}
func NewServiceErrorUserNotEligibleForAction ¶
func NewServiceErrorUserNotEligibleForAction( code code.Code, errorInfoDetails *errdetails.ErrorInfo, debugInfoDetails *errdetails.DebugInfo, ) ServiceErrorUserNotEligibleForAction
func (ServiceErrorUserNotEligibleForAction) Code ¶
func (e ServiceErrorUserNotEligibleForAction) Code() code.Code
func (ServiceErrorUserNotEligibleForAction) DebugInfoDetails ¶ added in v0.2.0
func (e ServiceErrorUserNotEligibleForAction) DebugInfoDetails() *errdetails.DebugInfo
func (ServiceErrorUserNotEligibleForAction) Error ¶
func (e ServiceErrorUserNotEligibleForAction) Error() string
func (ServiceErrorUserNotEligibleForAction) ErrorInfoDetails ¶ added in v0.2.0
func (e ServiceErrorUserNotEligibleForAction) ErrorInfoDetails() *errdetails.ErrorInfo
type ServiceErrorValidationError ¶ added in v0.2.0
type ServiceErrorValidationError struct {
// contains filtered or unexported fields
}
func NewServiceErrorValidationError ¶ added in v0.2.0
func NewServiceErrorValidationError( code code.Code, errorInfoDetails *errdetails.ErrorInfo, badRequestDetails *errdetails.BadRequest, debugInfoDetails *errdetails.DebugInfo, ) ServiceErrorValidationError
func (ServiceErrorValidationError) BadRequestDetails ¶ added in v0.2.0
func (e ServiceErrorValidationError) BadRequestDetails() *errdetails.BadRequest
func (ServiceErrorValidationError) Code ¶ added in v0.2.0
func (e ServiceErrorValidationError) Code() code.Code
func (ServiceErrorValidationError) DebugInfoDetails ¶ added in v0.2.0
func (e ServiceErrorValidationError) DebugInfoDetails() *errdetails.DebugInfo
func (ServiceErrorValidationError) Error ¶ added in v0.2.0
func (e ServiceErrorValidationError) Error() string
func (ServiceErrorValidationError) ErrorInfoDetails ¶ added in v0.2.0
func (e ServiceErrorValidationError) ErrorInfoDetails() *errdetails.ErrorInfo
Click to show internal directories.
Click to hide internal directories.