exampleservicev1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 ServiceErrorDecoder(payload []byte) error

func ServiceErrorEntityNotFoundEncoder

func ServiceErrorEntityNotFoundEncoder(
	errorInfoMetadata map[string]string,
	resourceInfoDetails *errdetails.ResourceInfo,
	debugInfoDetails *errdetails.DebugInfo,
) ([]byte, error)

func ServiceErrorUserNotEligibleForActionEncoder

func ServiceErrorUserNotEligibleForActionEncoder(
	errorInfoMetadata map[string]string,
	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) Enum

func (x ServiceError) Enum() *ServiceError

func (ServiceError) EnumDescriptor deprecated

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

Deprecated: Use ServiceError.Descriptor instead.

func (ServiceError) Number

func (ServiceError) String

func (x ServiceError) String() string

func (ServiceError) Type

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 (ServiceErrorEntityNotFound) DebugInfoDetails added in v0.2.0

func (e ServiceErrorEntityNotFound) DebugInfoDetails() *errdetails.DebugInfo

func (ServiceErrorEntityNotFound) Error

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 (ServiceErrorUserNotEligibleForAction) DebugInfoDetails added in v0.2.0

func (ServiceErrorUserNotEligibleForAction) Error

func (ServiceErrorUserNotEligibleForAction) ErrorInfoDetails added in v0.2.0

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 (ServiceErrorValidationError) DebugInfoDetails added in v0.2.0

func (e ServiceErrorValidationError) DebugInfoDetails() *errdetails.DebugInfo

func (ServiceErrorValidationError) Error added in v0.2.0

func (ServiceErrorValidationError) ErrorInfoDetails added in v0.2.0

func (e ServiceErrorValidationError) ErrorInfoDetails() *errdetails.ErrorInfo

Jump to

Keyboard shortcuts

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