v1

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_common_v1_error_proto protoreflect.FileDescriptor
View Source
var File_common_v1_pagination_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {

	// A machine-readable error code (e.g. "USER_NOT_FOUND")
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// A human-readable error message describing the issue
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Additional context or validation errors
	Details map[string]string `` /* 141-byte string literal not displayed */
	// contains filtered or unexported fields
}

ErrorResponse describes a standard error payload that can be returned across all e-commerce microservices.

func (*ErrorResponse) Descriptor deprecated

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

Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.

func (*ErrorResponse) GetCode

func (x *ErrorResponse) GetCode() string

func (*ErrorResponse) GetDetails

func (x *ErrorResponse) GetDetails() map[string]string

func (*ErrorResponse) GetMessage

func (x *ErrorResponse) GetMessage() string

func (*ErrorResponse) ProtoMessage

func (*ErrorResponse) ProtoMessage()

func (*ErrorResponse) ProtoReflect

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

func (*ErrorResponse) Reset

func (x *ErrorResponse) Reset()

func (*ErrorResponse) String

func (x *ErrorResponse) String() string

func (*ErrorResponse) Validate

func (m *ErrorResponse) Validate() error

Validate checks the field values on ErrorResponse 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 (*ErrorResponse) ValidateAll

func (m *ErrorResponse) ValidateAll() error

ValidateAll checks the field values on ErrorResponse 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 ErrorResponseMultiError, or nil if none found.

type ErrorResponseMultiError

type ErrorResponseMultiError []error

ErrorResponseMultiError is an error wrapping multiple validation errors returned by ErrorResponse.ValidateAll() if the designated constraints aren't met.

func (ErrorResponseMultiError) AllErrors

func (m ErrorResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ErrorResponseMultiError) Error

func (m ErrorResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ErrorResponseValidationError

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

ErrorResponseValidationError is the validation error returned by ErrorResponse.Validate if the designated constraints aren't met.

func (ErrorResponseValidationError) Cause

Cause function returns cause value.

func (ErrorResponseValidationError) Error

Error satisfies the builtin error interface

func (ErrorResponseValidationError) ErrorName

func (e ErrorResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ErrorResponseValidationError) Field

Field function returns field value.

func (ErrorResponseValidationError) Key

Key function returns key value.

func (ErrorResponseValidationError) Reason

Reason function returns reason value.

type PaginationRequest

type PaginationRequest struct {
	PageSize  int32  `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

PaginationRequest is a common struct to be used across list requests.

func (*PaginationRequest) Descriptor deprecated

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

Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.

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

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

Cause function returns cause value.

func (PaginationRequestValidationError) Error

Error satisfies the builtin error interface

func (PaginationRequestValidationError) ErrorName

ErrorName returns error name.

func (PaginationRequestValidationError) Field

Field function returns field value.

func (PaginationRequestValidationError) Key

Key function returns key value.

func (PaginationRequestValidationError) Reason

Reason function returns reason value.

type PaginationResponse

type PaginationResponse struct {
	NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	TotalSize     int32  `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
	// contains filtered or unexported fields
}

PaginationResponse is a common struct to be used in list responses.

func (*PaginationResponse) Descriptor deprecated

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

Deprecated: Use PaginationResponse.ProtoReflect.Descriptor instead.

func (*PaginationResponse) GetNextPageToken

func (x *PaginationResponse) GetNextPageToken() string

func (*PaginationResponse) GetTotalSize

func (x *PaginationResponse) GetTotalSize() int32

func (*PaginationResponse) ProtoMessage

func (*PaginationResponse) ProtoMessage()

func (*PaginationResponse) ProtoReflect

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

func (*PaginationResponse) Reset

func (x *PaginationResponse) Reset()

func (*PaginationResponse) String

func (x *PaginationResponse) String() string

func (*PaginationResponse) Validate

func (m *PaginationResponse) Validate() error

Validate checks the field values on PaginationResponse 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 (*PaginationResponse) ValidateAll

func (m *PaginationResponse) ValidateAll() error

ValidateAll checks the field values on PaginationResponse 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 PaginationResponseMultiError, or nil if none found.

type PaginationResponseMultiError

type PaginationResponseMultiError []error

PaginationResponseMultiError is an error wrapping multiple validation errors returned by PaginationResponse.ValidateAll() if the designated constraints aren't met.

func (PaginationResponseMultiError) AllErrors

func (m PaginationResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaginationResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PaginationResponseValidationError

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

PaginationResponseValidationError is the validation error returned by PaginationResponse.Validate if the designated constraints aren't met.

func (PaginationResponseValidationError) Cause

Cause function returns cause value.

func (PaginationResponseValidationError) Error

Error satisfies the builtin error interface

func (PaginationResponseValidationError) ErrorName

ErrorName returns error name.

func (PaginationResponseValidationError) Field

Field function returns field value.

func (PaginationResponseValidationError) Key

Key function returns key value.

func (PaginationResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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