Documentation
¶
Index ¶
- Variables
- func ErrorErrorReasonAborted(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonCancelled(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonConflict(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonConstraintViolation(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonDatabaseConnectionFailed(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonDatabaseError(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonDuplicateKey(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonExternalServiceError(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonExternalServiceUnavailable(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonForbidden(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonGatewayTimeout(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonInternalServerError(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonInvalidParameter(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonInvalidState(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonMethodNotAllowed(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonMissingParameter(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonNotFound(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonOperationNotAllowed(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonRecordNotFound(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonRegistryNotFound(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonRequestTimeout(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonResourceExists(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonResourceInUse(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonServiceUnavailable(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonTooManyRequests(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonUnauthenticated(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonUnknownUnspecified(format string, args ...interface{}) *errors.Error
- func ErrorErrorReasonValidationError(format string, args ...interface{}) *errors.Error
- func IsErrorReasonAborted(err error) bool
- func IsErrorReasonCancelled(err error) bool
- func IsErrorReasonConflict(err error) bool
- func IsErrorReasonConstraintViolation(err error) bool
- func IsErrorReasonDatabaseConnectionFailed(err error) bool
- func IsErrorReasonDatabaseError(err error) bool
- func IsErrorReasonDuplicateKey(err error) bool
- func IsErrorReasonExternalServiceError(err error) bool
- func IsErrorReasonExternalServiceUnavailable(err error) bool
- func IsErrorReasonForbidden(err error) bool
- func IsErrorReasonGatewayTimeout(err error) bool
- func IsErrorReasonInternalServerError(err error) bool
- func IsErrorReasonInvalidParameter(err error) bool
- func IsErrorReasonInvalidState(err error) bool
- func IsErrorReasonMethodNotAllowed(err error) bool
- func IsErrorReasonMissingParameter(err error) bool
- func IsErrorReasonNotFound(err error) bool
- func IsErrorReasonOperationNotAllowed(err error) bool
- func IsErrorReasonRecordNotFound(err error) bool
- func IsErrorReasonRegistryNotFound(err error) bool
- func IsErrorReasonRequestTimeout(err error) bool
- func IsErrorReasonResourceExists(err error) bool
- func IsErrorReasonResourceInUse(err error) bool
- func IsErrorReasonServiceUnavailable(err error) bool
- func IsErrorReasonTooManyRequests(err error) bool
- func IsErrorReasonUnauthenticated(err error) bool
- func IsErrorReasonUnknownUnspecified(err error) bool
- func IsErrorReasonValidationError(err error) bool
- type ErrorCategory
- func (ErrorCategory) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorCategory) Enum() *ErrorCategory
- func (ErrorCategory) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorCategory) Number() protoreflect.EnumNumber
- func (x ErrorCategory) String() string
- func (ErrorCategory) Type() protoreflect.EnumType
- type ErrorMetadata
- func (*ErrorMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorMetadata) GetCategory() ErrorCategory
- func (x *ErrorMetadata) GetMetadata() map[string]string
- func (*ErrorMetadata) ProtoMessage()
- func (x *ErrorMetadata) ProtoReflect() protoreflect.Message
- func (x *ErrorMetadata) Reset()
- func (x *ErrorMetadata) String() string
- func (m *ErrorMetadata) Validate() error
- func (m *ErrorMetadata) ValidateAll() error
- type ErrorMetadataMultiError
- type ErrorMetadataValidationError
- func (e ErrorMetadataValidationError) Cause() error
- func (e ErrorMetadataValidationError) Error() string
- func (e ErrorMetadataValidationError) ErrorName() string
- func (e ErrorMetadataValidationError) Field() string
- func (e ErrorMetadataValidationError) Key() bool
- func (e ErrorMetadataValidationError) Reason() string
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type Pagination
- func (*Pagination) Descriptor() ([]byte, []int)deprecated
- func (x *Pagination) GetExtra() map[string]*anypb.Any
- func (x *Pagination) GetNextPageToken() string
- func (x *Pagination) GetPage() int32
- func (x *Pagination) GetPageSize() int32
- func (x *Pagination) GetTotalSize() int64
- func (*Pagination) ProtoMessage()
- func (x *Pagination) ProtoReflect() protoreflect.Message
- func (x *Pagination) Reset()
- func (x *Pagination) String() string
- func (m *Pagination) Validate() error
- func (m *Pagination) ValidateAll() error
- type PaginationMultiError
- type PaginationRequest
- func (*PaginationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationRequest) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *PaginationRequest) GetNoPaging() bool
- func (x *PaginationRequest) GetOnlyCount() bool
- func (x *PaginationRequest) GetOrderBy() string
- func (x *PaginationRequest) GetPage() int32
- func (x *PaginationRequest) GetPageSize() int32
- func (x *PaginationRequest) GetPageToken() string
- func (*PaginationRequest) ProtoMessage()
- func (x *PaginationRequest) ProtoReflect() protoreflect.Message
- func (x *PaginationRequest) Reset()
- func (x *PaginationRequest) String() string
- func (m *PaginationRequest) Validate() error
- func (m *PaginationRequest) ValidateAll() error
- type PaginationRequestMultiError
- type PaginationRequestValidationError
- func (e PaginationRequestValidationError) Cause() error
- func (e PaginationRequestValidationError) Error() string
- func (e PaginationRequestValidationError) ErrorName() string
- func (e PaginationRequestValidationError) Field() string
- func (e PaginationRequestValidationError) Key() bool
- func (e PaginationRequestValidationError) Reason() string
- type PaginationValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ErrorCategory_name = map[int32]string{ 0: "ERROR_CATEGORY_GENERAL_UNSPECIFIED", 1: "ERROR_CATEGORY_AUTHENTICATION", 2: "ERROR_CATEGORY_DATABASE", 3: "ERROR_CATEGORY_BUSINESS", 4: "ERROR_CATEGORY_EXTERNAL_SERVICE", } ErrorCategory_value = map[string]int32{ "ERROR_CATEGORY_GENERAL_UNSPECIFIED": 0, "ERROR_CATEGORY_AUTHENTICATION": 1, "ERROR_CATEGORY_DATABASE": 2, "ERROR_CATEGORY_BUSINESS": 3, "ERROR_CATEGORY_EXTERNAL_SERVICE": 4, } )
Enum value maps for ErrorCategory.
var ( ErrorReason_name = map[int32]string{ 0: "ERROR_REASON_UNKNOWN_UNSPECIFIED", 1: "ERROR_REASON_VALIDATION_ERROR", 2: "ERROR_REASON_NOT_FOUND", 3: "ERROR_REASON_INTERNAL_SERVER_ERROR", 4: "ERROR_REASON_METHOD_NOT_ALLOWED", 5: "ERROR_REASON_REQUEST_TIMEOUT", 6: "ERROR_REASON_CONFLICT", 7: "ERROR_REASON_TOO_MANY_REQUESTS", 8: "ERROR_REASON_SERVICE_UNAVAILABLE", 9: "ERROR_REASON_GATEWAY_TIMEOUT", 1000: "ERROR_REASON_UNAUTHENTICATED", 1001: "ERROR_REASON_FORBIDDEN", 2000: "ERROR_REASON_DATABASE_ERROR", 2001: "ERROR_REASON_RECORD_NOT_FOUND", 2002: "ERROR_REASON_CONSTRAINT_VIOLATION", 2003: "ERROR_REASON_DUPLICATE_KEY", 2004: "ERROR_REASON_DATABASE_CONNECTION_FAILED", 3000: "ERROR_REASON_INVALID_STATE", 3001: "ERROR_REASON_RESOURCE_EXISTS", 3002: "ERROR_REASON_RESOURCE_IN_USE", 3003: "ERROR_REASON_CANCELLED", 3004: "ERROR_REASON_ABORTED", 3005: "ERROR_REASON_MISSING_PARAMETER", 3006: "ERROR_REASON_INVALID_PARAMETER", 3007: "ERROR_REASON_OPERATION_NOT_ALLOWED", 4000: "ERROR_REASON_EXTERNAL_SERVICE_UNAVAILABLE", 4001: "ERROR_REASON_EXTERNAL_SERVICE_ERROR", 6000: "ERROR_REASON_REGISTRY_NOT_FOUND", } ErrorReason_value = map[string]int32{ "ERROR_REASON_UNKNOWN_UNSPECIFIED": 0, "ERROR_REASON_VALIDATION_ERROR": 1, "ERROR_REASON_NOT_FOUND": 2, "ERROR_REASON_INTERNAL_SERVER_ERROR": 3, "ERROR_REASON_METHOD_NOT_ALLOWED": 4, "ERROR_REASON_REQUEST_TIMEOUT": 5, "ERROR_REASON_CONFLICT": 6, "ERROR_REASON_TOO_MANY_REQUESTS": 7, "ERROR_REASON_SERVICE_UNAVAILABLE": 8, "ERROR_REASON_GATEWAY_TIMEOUT": 9, "ERROR_REASON_UNAUTHENTICATED": 1000, "ERROR_REASON_FORBIDDEN": 1001, "ERROR_REASON_DATABASE_ERROR": 2000, "ERROR_REASON_RECORD_NOT_FOUND": 2001, "ERROR_REASON_CONSTRAINT_VIOLATION": 2002, "ERROR_REASON_DUPLICATE_KEY": 2003, "ERROR_REASON_DATABASE_CONNECTION_FAILED": 2004, "ERROR_REASON_INVALID_STATE": 3000, "ERROR_REASON_RESOURCE_EXISTS": 3001, "ERROR_REASON_RESOURCE_IN_USE": 3002, "ERROR_REASON_CANCELLED": 3003, "ERROR_REASON_ABORTED": 3004, "ERROR_REASON_MISSING_PARAMETER": 3005, "ERROR_REASON_INVALID_PARAMETER": 3006, "ERROR_REASON_OPERATION_NOT_ALLOWED": 3007, "ERROR_REASON_EXTERNAL_SERVICE_UNAVAILABLE": 4000, "ERROR_REASON_EXTERNAL_SERVICE_ERROR": 4001, "ERROR_REASON_REGISTRY_NOT_FOUND": 6000, } )
Enum value maps for ErrorReason.
var File_config_common_v1_errors_proto protoreflect.FileDescriptor
var File_config_common_v1_pagination_proto protoreflect.FileDescriptor
Functions ¶
func ErrorErrorReasonAborted ¶ added in v0.2.13
func ErrorErrorReasonCancelled ¶ added in v0.2.13
func ErrorErrorReasonConflict ¶ added in v0.2.13
func ErrorErrorReasonConstraintViolation ¶ added in v0.2.13
func ErrorErrorReasonDatabaseConnectionFailed ¶ added in v0.2.13
func ErrorErrorReasonDatabaseError ¶ added in v0.2.13
--- Common Database Errors (2000-2999) ---
func ErrorErrorReasonDuplicateKey ¶ added in v0.2.13
func ErrorErrorReasonExternalServiceError ¶ added in v0.2.13
func ErrorErrorReasonExternalServiceUnavailable ¶ added in v0.2.13
--- Common External Service Errors (4000-4999) ---
func ErrorErrorReasonForbidden ¶ added in v0.2.13
func ErrorErrorReasonGatewayTimeout ¶ added in v0.2.13
func ErrorErrorReasonInternalServerError ¶ added in v0.2.13
func ErrorErrorReasonInvalidParameter ¶ added in v0.2.13
func ErrorErrorReasonInvalidState ¶ added in v0.2.13
--- Common Business Logic Errors (3000-3999) ---
func ErrorErrorReasonMethodNotAllowed ¶ added in v0.2.13
func ErrorErrorReasonMissingParameter ¶ added in v0.2.13
func ErrorErrorReasonNotFound ¶ added in v0.2.13
func ErrorErrorReasonOperationNotAllowed ¶ added in v0.2.13
func ErrorErrorReasonRecordNotFound ¶ added in v0.2.13
func ErrorErrorReasonRegistryNotFound ¶ added in v0.2.13
--- Common Registry Errors (6000-6999) ---
func ErrorErrorReasonRequestTimeout ¶ added in v0.2.13
func ErrorErrorReasonResourceExists ¶ added in v0.2.13
func ErrorErrorReasonResourceInUse ¶ added in v0.2.13
func ErrorErrorReasonServiceUnavailable ¶ added in v0.2.13
func ErrorErrorReasonTooManyRequests ¶ added in v0.2.13
func ErrorErrorReasonUnauthenticated ¶ added in v0.2.13
--- Common Authentication & Authorization Errors (1000-1999) ---
func ErrorErrorReasonUnknownUnspecified ¶ added in v0.2.13
--- General Framework Errors (0-999) ---
func ErrorErrorReasonValidationError ¶ added in v0.2.13
func IsErrorReasonAborted ¶ added in v0.2.13
func IsErrorReasonCancelled ¶ added in v0.2.13
func IsErrorReasonConflict ¶ added in v0.2.13
func IsErrorReasonConstraintViolation ¶ added in v0.2.13
func IsErrorReasonDatabaseConnectionFailed ¶ added in v0.2.13
func IsErrorReasonDatabaseError ¶ added in v0.2.13
--- Common Database Errors (2000-2999) ---
func IsErrorReasonDuplicateKey ¶ added in v0.2.13
func IsErrorReasonExternalServiceError ¶ added in v0.2.13
func IsErrorReasonExternalServiceUnavailable ¶ added in v0.2.13
--- Common External Service Errors (4000-4999) ---
func IsErrorReasonForbidden ¶ added in v0.2.13
func IsErrorReasonGatewayTimeout ¶ added in v0.2.13
func IsErrorReasonInternalServerError ¶ added in v0.2.13
func IsErrorReasonInvalidParameter ¶ added in v0.2.13
func IsErrorReasonInvalidState ¶ added in v0.2.13
--- Common Business Logic Errors (3000-3999) ---
func IsErrorReasonMethodNotAllowed ¶ added in v0.2.13
func IsErrorReasonMissingParameter ¶ added in v0.2.13
func IsErrorReasonNotFound ¶ added in v0.2.13
func IsErrorReasonOperationNotAllowed ¶ added in v0.2.13
func IsErrorReasonRecordNotFound ¶ added in v0.2.13
func IsErrorReasonRegistryNotFound ¶ added in v0.2.13
--- Common Registry Errors (6000-6999) ---
func IsErrorReasonRequestTimeout ¶ added in v0.2.13
func IsErrorReasonResourceExists ¶ added in v0.2.13
func IsErrorReasonResourceInUse ¶ added in v0.2.13
func IsErrorReasonServiceUnavailable ¶ added in v0.2.13
func IsErrorReasonTooManyRequests ¶ added in v0.2.13
func IsErrorReasonUnauthenticated ¶ added in v0.2.13
--- Common Authentication & Authorization Errors (1000-1999) ---
func IsErrorReasonUnknownUnspecified ¶ added in v0.2.13
--- General Framework Errors (0-999) ---
func IsErrorReasonValidationError ¶ added in v0.2.13
Types ¶
type ErrorCategory ¶
type ErrorCategory int32
ErrorCategory defines the category of an error. This helps in grouping related errors together for monitoring and client handling.
const ( // General errors not specific to any category. ErrorCategory_ERROR_CATEGORY_GENERAL_UNSPECIFIED ErrorCategory = 0 // Authentication and authorization related errors. ErrorCategory_ERROR_CATEGORY_AUTHENTICATION ErrorCategory = 1 // Database related errors. ErrorCategory_ERROR_CATEGORY_DATABASE ErrorCategory = 2 // Business logic related errors. ErrorCategory_ERROR_CATEGORY_BUSINESS ErrorCategory = 3 // External service related errors. ErrorCategory_ERROR_CATEGORY_EXTERNAL_SERVICE ErrorCategory = 4 )
func (ErrorCategory) Descriptor ¶
func (ErrorCategory) Descriptor() protoreflect.EnumDescriptor
func (ErrorCategory) Enum ¶
func (x ErrorCategory) Enum() *ErrorCategory
func (ErrorCategory) EnumDescriptor
deprecated
func (ErrorCategory) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorCategory.Descriptor instead.
func (ErrorCategory) Number ¶
func (x ErrorCategory) Number() protoreflect.EnumNumber
func (ErrorCategory) String ¶
func (x ErrorCategory) String() string
func (ErrorCategory) Type ¶
func (ErrorCategory) Type() protoreflect.EnumType
type ErrorMetadata ¶
type ErrorMetadata struct {
// The category of the error.
Category ErrorCategory `protobuf:"varint,1,opt,name=category,proto3,enum=runtime.api.config.common.v1.ErrorCategory" json:"category,omitempty"`
// Additional key-value pairs providing context about the error.
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
ErrorMetadata contains additional, structured context about an error. It can be used for logging and debugging purposes.
func (*ErrorMetadata) Descriptor
deprecated
func (*ErrorMetadata) Descriptor() ([]byte, []int)
Deprecated: Use ErrorMetadata.ProtoReflect.Descriptor instead.
func (*ErrorMetadata) GetCategory ¶
func (x *ErrorMetadata) GetCategory() ErrorCategory
func (*ErrorMetadata) GetMetadata ¶
func (x *ErrorMetadata) GetMetadata() map[string]string
func (*ErrorMetadata) ProtoMessage ¶
func (*ErrorMetadata) ProtoMessage()
func (*ErrorMetadata) ProtoReflect ¶
func (x *ErrorMetadata) ProtoReflect() protoreflect.Message
func (*ErrorMetadata) Reset ¶
func (x *ErrorMetadata) Reset()
func (*ErrorMetadata) String ¶
func (x *ErrorMetadata) String() string
func (*ErrorMetadata) Validate ¶
func (m *ErrorMetadata) Validate() error
Validate checks the field values on ErrorMetadata with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ErrorMetadata) ValidateAll ¶
func (m *ErrorMetadata) ValidateAll() error
ValidateAll checks the field values on ErrorMetadata with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ErrorMetadataMultiError, or nil if none found.
type ErrorMetadataMultiError ¶
type ErrorMetadataMultiError []error
ErrorMetadataMultiError is an error wrapping multiple validation errors returned by ErrorMetadata.ValidateAll() if the designated constraints aren't met.
func (ErrorMetadataMultiError) AllErrors ¶
func (m ErrorMetadataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ErrorMetadataMultiError) Error ¶
func (m ErrorMetadataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ErrorMetadataValidationError ¶
type ErrorMetadataValidationError struct {
// contains filtered or unexported fields
}
ErrorMetadataValidationError is the validation error returned by ErrorMetadata.Validate if the designated constraints aren't met.
func (ErrorMetadataValidationError) Cause ¶
func (e ErrorMetadataValidationError) Cause() error
Cause function returns cause value.
func (ErrorMetadataValidationError) Error ¶
func (e ErrorMetadataValidationError) Error() string
Error satisfies the builtin error interface
func (ErrorMetadataValidationError) ErrorName ¶
func (e ErrorMetadataValidationError) ErrorName() string
ErrorName returns error name.
func (ErrorMetadataValidationError) Field ¶
func (e ErrorMetadataValidationError) Field() string
Field function returns field value.
func (ErrorMetadataValidationError) Key ¶
func (e ErrorMetadataValidationError) Key() bool
Key function returns key value.
func (ErrorMetadataValidationError) Reason ¶
func (e ErrorMetadataValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶
type ErrorReason int32
ErrorReason defines the application's common error codes. These codes are mapped to HTTP status codes and are consistent across all services.
The enum values are structured to allow for future expansion by domain-specific errors. - 0-999: General framework errors - 1000-1999: Common Authentication & Authorization Errors - 2000-2999: Common Database Errors - 3000-3999: Common Business Logic Errors - 4000-4999: Common External Service Errors
Specific reasons for these errors should be defined within the specific domain's error file.
const ( // --- General Framework Errors (0-999) --- ErrorReason_ERROR_REASON_UNKNOWN_UNSPECIFIED ErrorReason = 0 ErrorReason_ERROR_REASON_VALIDATION_ERROR ErrorReason = 1 ErrorReason_ERROR_REASON_NOT_FOUND ErrorReason = 2 ErrorReason_ERROR_REASON_INTERNAL_SERVER_ERROR ErrorReason = 3 ErrorReason_ERROR_REASON_METHOD_NOT_ALLOWED ErrorReason = 4 ErrorReason_ERROR_REASON_REQUEST_TIMEOUT ErrorReason = 5 ErrorReason_ERROR_REASON_CONFLICT ErrorReason = 6 ErrorReason_ERROR_REASON_TOO_MANY_REQUESTS ErrorReason = 7 ErrorReason_ERROR_REASON_SERVICE_UNAVAILABLE ErrorReason = 8 ErrorReason_ERROR_REASON_GATEWAY_TIMEOUT ErrorReason = 9 // --- Common Authentication & Authorization Errors (1000-1999) --- ErrorReason_ERROR_REASON_UNAUTHENTICATED ErrorReason = 1000 ErrorReason_ERROR_REASON_FORBIDDEN ErrorReason = 1001 // --- Common Database Errors (2000-2999) --- ErrorReason_ERROR_REASON_DATABASE_ERROR ErrorReason = 2000 ErrorReason_ERROR_REASON_RECORD_NOT_FOUND ErrorReason = 2001 ErrorReason_ERROR_REASON_CONSTRAINT_VIOLATION ErrorReason = 2002 ErrorReason_ERROR_REASON_DUPLICATE_KEY ErrorReason = 2003 ErrorReason_ERROR_REASON_DATABASE_CONNECTION_FAILED ErrorReason = 2004 // --- Common Business Logic Errors (3000-3999) --- ErrorReason_ERROR_REASON_INVALID_STATE ErrorReason = 3000 ErrorReason_ERROR_REASON_RESOURCE_EXISTS ErrorReason = 3001 ErrorReason_ERROR_REASON_RESOURCE_IN_USE ErrorReason = 3002 ErrorReason_ERROR_REASON_CANCELLED ErrorReason = 3003 ErrorReason_ERROR_REASON_ABORTED ErrorReason = 3004 ErrorReason_ERROR_REASON_MISSING_PARAMETER ErrorReason = 3005 ErrorReason_ERROR_REASON_INVALID_PARAMETER ErrorReason = 3006 ErrorReason_ERROR_REASON_OPERATION_NOT_ALLOWED ErrorReason = 3007 // --- Common External Service Errors (4000-4999) --- ErrorReason_ERROR_REASON_EXTERNAL_SERVICE_UNAVAILABLE ErrorReason = 4000 ErrorReason_ERROR_REASON_EXTERNAL_SERVICE_ERROR ErrorReason = 4001 // --- Common Registry Errors (6000-6999) --- ErrorReason_ERROR_REASON_REGISTRY_NOT_FOUND ErrorReason = 6000 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type Pagination ¶
type Pagination struct {
// For offset-based pagination: the current page number (1-indexed).
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
// The number of items retrieved on the current page.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"`
// For offset-based pagination: the total number of items available across all pages.
// This is optional and may be expensive to calculate for large datasets.
TotalSize int64 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"`
// For cursor-based pagination: a token to retrieve the next page of results.
// If empty, there are no more results.
NextPageToken string `protobuf:"bytes,4,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"`
// Additional information about this response.
// content to be added without destroying the current data format
Extra map[string]*anypb.Any `` /* 137-byte string literal not displayed */
// contains filtered or unexported fields
}
Pagination provides a comprehensive structure for pagination responses, supporting both cursor-based (infinite scroll) and offset-based (numbered pages) pagination.
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetNextPageToken ¶
func (x *Pagination) GetNextPageToken() string
func (*Pagination) GetPage ¶
func (x *Pagination) GetPage() int32
func (*Pagination) GetPageSize ¶
func (x *Pagination) GetPageSize() int32
func (*Pagination) GetTotalSize ¶
func (x *Pagination) GetTotalSize() int64
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) String ¶
func (x *Pagination) String() string
func (*Pagination) Validate ¶
func (m *Pagination) Validate() error
Validate checks the field values on Pagination with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Pagination) ValidateAll ¶
func (m *Pagination) ValidateAll() error
ValidateAll checks the field values on Pagination with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaginationMultiError, or nil if none found.
type PaginationMultiError ¶
type PaginationMultiError []error
PaginationMultiError is an error wrapping multiple validation errors returned by Pagination.ValidateAll() if the designated constraints aren't met.
func (PaginationMultiError) AllErrors ¶
func (m PaginationMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaginationMultiError) Error ¶
func (m PaginationMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaginationRequest ¶
type PaginationRequest struct {
// For offset-based pagination: the page number to retrieve (1-indexed).
Page *int32 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"`
// The maximum number of items to return per page. The server may enforce a
// maximum limit to this value.
PageSize *int32 `protobuf:"varint,2,opt,name=page_size,proto3,oneof" json:"page_size,omitempty"`
// For cursor-based pagination: a token identifying a page of results the server
// should return. This is the `next_page_token` from a previous response.
PageToken string `protobuf:"bytes,3,opt,name=page_token,proto3" json:"page_token,omitempty"`
// If true, the server will only return the `total_size` in the response Pagination
// message, and the `items` list will be empty. This is useful for fetching
// only the total count of items.
OnlyCount bool `protobuf:"varint,4,opt,name=only_count,proto3" json:"only_count,omitempty"`
// The no_paging is used to disable pagination.
NoPaging *bool `protobuf:"varint,5,opt,name=no_paging,proto3,oneof" json:"no_paging,omitempty"`
// sort condition
OrderBy string `protobuf:"bytes,6,opt,name=order_by,proto3" json:"order_by,omitempty"`
// Field mask
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=field_mask,proto3" json:"field_mask,omitempty"`
// contains filtered or unexported fields
}
PaginationRequest provides a flexible structure for pagination requests, supporting both cursor-based (infinite scroll) and offset-based (numbered pages) pagination. The server should prioritize `page_token` if both `page_token` and `page` are provided.
func (*PaginationRequest) Descriptor
deprecated
func (*PaginationRequest) Descriptor() ([]byte, []int)
Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.
func (*PaginationRequest) GetFieldMask ¶
func (x *PaginationRequest) GetFieldMask() *fieldmaskpb.FieldMask
func (*PaginationRequest) GetNoPaging ¶
func (x *PaginationRequest) GetNoPaging() bool
func (*PaginationRequest) GetOnlyCount ¶
func (x *PaginationRequest) GetOnlyCount() bool
func (*PaginationRequest) GetOrderBy ¶
func (x *PaginationRequest) GetOrderBy() string
func (*PaginationRequest) GetPage ¶
func (x *PaginationRequest) GetPage() int32
func (*PaginationRequest) GetPageSize ¶
func (x *PaginationRequest) GetPageSize() int32
func (*PaginationRequest) GetPageToken ¶
func (x *PaginationRequest) GetPageToken() string
func (*PaginationRequest) ProtoMessage ¶
func (*PaginationRequest) ProtoMessage()
func (*PaginationRequest) ProtoReflect ¶
func (x *PaginationRequest) ProtoReflect() protoreflect.Message
func (*PaginationRequest) Reset ¶
func (x *PaginationRequest) Reset()
func (*PaginationRequest) String ¶
func (x *PaginationRequest) String() string
func (*PaginationRequest) Validate ¶
func (m *PaginationRequest) Validate() error
Validate checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PaginationRequest) ValidateAll ¶
func (m *PaginationRequest) ValidateAll() error
ValidateAll checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaginationRequestMultiError, or nil if none found.
type PaginationRequestMultiError ¶
type PaginationRequestMultiError []error
PaginationRequestMultiError is an error wrapping multiple validation errors returned by PaginationRequest.ValidateAll() if the designated constraints aren't met.
func (PaginationRequestMultiError) AllErrors ¶
func (m PaginationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaginationRequestMultiError) Error ¶
func (m PaginationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaginationRequestValidationError ¶
type PaginationRequestValidationError struct {
// contains filtered or unexported fields
}
PaginationRequestValidationError is the validation error returned by PaginationRequest.Validate if the designated constraints aren't met.
func (PaginationRequestValidationError) Cause ¶
func (e PaginationRequestValidationError) Cause() error
Cause function returns cause value.
func (PaginationRequestValidationError) Error ¶
func (e PaginationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationRequestValidationError) ErrorName ¶
func (e PaginationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationRequestValidationError) Field ¶
func (e PaginationRequestValidationError) Field() string
Field function returns field value.
func (PaginationRequestValidationError) Key ¶
func (e PaginationRequestValidationError) Key() bool
Key function returns key value.
func (PaginationRequestValidationError) Reason ¶
func (e PaginationRequestValidationError) Reason() string
Reason function returns reason value.
type PaginationValidationError ¶
type PaginationValidationError struct {
// contains filtered or unexported fields
}
PaginationValidationError is the validation error returned by Pagination.Validate if the designated constraints aren't met.
func (PaginationValidationError) Cause ¶
func (e PaginationValidationError) Cause() error
Cause function returns cause value.
func (PaginationValidationError) Error ¶
func (e PaginationValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationValidationError) ErrorName ¶
func (e PaginationValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationValidationError) Field ¶
func (e PaginationValidationError) Field() string
Field function returns field value.
func (PaginationValidationError) Key ¶
func (e PaginationValidationError) Key() bool
Key function returns key value.
func (PaginationValidationError) Reason ¶
func (e PaginationValidationError) Reason() string
Reason function returns reason value.