Documentation ¶
Index ¶
- Variables
- type PageRequest
- func (*PageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PageRequest) GetCurrent() int32
- func (x *PageRequest) GetNoPaging() bool
- func (x *PageRequest) GetOnlyCount() bool
- func (x *PageRequest) GetOrderBy() string
- func (x *PageRequest) GetPageSize() int32
- func (x *PageRequest) GetPageToken() string
- func (x *PageRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (*PageRequest) ProtoMessage()
- func (x *PageRequest) ProtoReflect() protoreflect.Message
- func (x *PageRequest) Reset()
- func (x *PageRequest) String() string
- func (m *PageRequest) Validate() error
- func (m *PageRequest) ValidateAll() error
- type PageRequestMultiError
- type PageRequestValidationError
- func (e PageRequestValidationError) Cause() error
- func (e PageRequestValidationError) Error() string
- func (e PageRequestValidationError) ErrorName() string
- func (e PageRequestValidationError) Field() string
- func (e PageRequestValidationError) Key() bool
- func (e PageRequestValidationError) Reason() string
- type PageResponse
- func (*PageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PageResponse) GetCurrent() int32
- func (x *PageResponse) GetData() *anypb.Any
- func (x *PageResponse) GetExtra() *anypb.Any
- func (x *PageResponse) GetNextPageToken() string
- func (x *PageResponse) GetPageSize() int32
- func (x *PageResponse) GetTotalSize() int32
- func (*PageResponse) ProtoMessage()
- func (x *PageResponse) ProtoReflect() protoreflect.Message
- func (x *PageResponse) Reset()
- func (x *PageResponse) String() string
- func (m *PageResponse) Validate() error
- func (m *PageResponse) ValidateAll() error
- type PageResponseMultiError
- type PageResponseValidationError
- func (e PageResponseValidationError) Cause() error
- func (e PageResponseValidationError) Error() string
- func (e PageResponseValidationError) ErrorName() string
- func (e PageResponseValidationError) Field() string
- func (e PageResponseValidationError) Key() bool
- func (e PageResponseValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_pagination_v1_pagination_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PageRequest ¶
type PageRequest struct { // current page number Current *int32 `protobuf:"varint,1,opt,name=current,proto3,oneof" json:"current,omitempty"` // The page_token is the query parameter for set the page token. PageToken string `protobuf:"bytes,2,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of lines per page PageSize *int32 `protobuf:"varint,3,opt,name=page_size,proto3,oneof" json:"page_size,omitempty"` // The only_count is the query parameter for set only to query the total number 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 UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=update_mask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
PageRequest common request
func (*PageRequest) Descriptor
deprecated
func (*PageRequest) Descriptor() ([]byte, []int)
Deprecated: Use PageRequest.ProtoReflect.Descriptor instead.
func (*PageRequest) GetCurrent ¶
func (x *PageRequest) GetCurrent() int32
func (*PageRequest) GetNoPaging ¶
func (x *PageRequest) GetNoPaging() bool
func (*PageRequest) GetOnlyCount ¶
func (x *PageRequest) GetOnlyCount() bool
func (*PageRequest) GetOrderBy ¶
func (x *PageRequest) GetOrderBy() string
func (*PageRequest) GetPageSize ¶
func (x *PageRequest) GetPageSize() int32
func (*PageRequest) GetPageToken ¶
func (x *PageRequest) GetPageToken() string
func (*PageRequest) GetUpdateMask ¶ added in v0.0.2
func (x *PageRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*PageRequest) ProtoMessage ¶
func (*PageRequest) ProtoMessage()
func (*PageRequest) ProtoReflect ¶
func (x *PageRequest) ProtoReflect() protoreflect.Message
func (*PageRequest) Reset ¶
func (x *PageRequest) Reset()
func (*PageRequest) String ¶
func (x *PageRequest) String() string
func (*PageRequest) Validate ¶
func (m *PageRequest) Validate() error
Validate checks the field values on PageRequest 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 (*PageRequest) ValidateAll ¶
func (m *PageRequest) ValidateAll() error
ValidateAll checks the field values on PageRequest 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 PageRequestMultiError, or nil if none found.
type PageRequestMultiError ¶
type PageRequestMultiError []error
PageRequestMultiError is an error wrapping multiple validation errors returned by PageRequest.ValidateAll() if the designated constraints aren't met.
func (PageRequestMultiError) AllErrors ¶
func (m PageRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageRequestMultiError) Error ¶
func (m PageRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageRequestValidationError ¶
type PageRequestValidationError struct {
// contains filtered or unexported fields
}
PageRequestValidationError is the validation error returned by PageRequest.Validate if the designated constraints aren't met.
func (PageRequestValidationError) Cause ¶
func (e PageRequestValidationError) Cause() error
Cause function returns cause value.
func (PageRequestValidationError) Error ¶
func (e PageRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PageRequestValidationError) ErrorName ¶
func (e PageRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PageRequestValidationError) Field ¶
func (e PageRequestValidationError) Field() string
Field function returns field value.
func (PageRequestValidationError) Key ¶
func (e PageRequestValidationError) Key() bool
Key function returns key value.
func (PageRequestValidationError) Reason ¶
func (e PageRequestValidationError) Reason() string
Reason function returns reason value.
type PageResponse ¶
type PageResponse struct { // The total number of items in the list. TotalSize int32 `protobuf:"varint,1,opt,name=total_size,proto3" json:"total_size,omitempty"` // The paging data Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // The current page number. Current *int32 `protobuf:"varint,3,opt,name=current,proto3,oneof" json:"current,omitempty"` // The maximum number of items to return. PageSize *int32 `protobuf:"varint,4,opt,name=page_size,proto3,oneof" json:"page_size,omitempty"` // Token to retrieve the next page of results, or empty if there are no // more results in the list. NextPageToken string `protobuf:"bytes,5,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 *anypb.Any `protobuf:"bytes,6,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
PageResponse general result
func (*PageResponse) Descriptor
deprecated
func (*PageResponse) Descriptor() ([]byte, []int)
Deprecated: Use PageResponse.ProtoReflect.Descriptor instead.
func (*PageResponse) GetCurrent ¶
func (x *PageResponse) GetCurrent() int32
func (*PageResponse) GetData ¶
func (x *PageResponse) GetData() *anypb.Any
func (*PageResponse) GetExtra ¶
func (x *PageResponse) GetExtra() *anypb.Any
func (*PageResponse) GetNextPageToken ¶
func (x *PageResponse) GetNextPageToken() string
func (*PageResponse) GetPageSize ¶
func (x *PageResponse) GetPageSize() int32
func (*PageResponse) GetTotalSize ¶ added in v0.0.3
func (x *PageResponse) GetTotalSize() int32
func (*PageResponse) ProtoMessage ¶
func (*PageResponse) ProtoMessage()
func (*PageResponse) ProtoReflect ¶
func (x *PageResponse) ProtoReflect() protoreflect.Message
func (*PageResponse) Reset ¶
func (x *PageResponse) Reset()
func (*PageResponse) String ¶
func (x *PageResponse) String() string
func (*PageResponse) Validate ¶
func (m *PageResponse) Validate() error
Validate checks the field values on PageResponse 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 (*PageResponse) ValidateAll ¶
func (m *PageResponse) ValidateAll() error
ValidateAll checks the field values on PageResponse 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 PageResponseMultiError, or nil if none found.
type PageResponseMultiError ¶
type PageResponseMultiError []error
PageResponseMultiError is an error wrapping multiple validation errors returned by PageResponse.ValidateAll() if the designated constraints aren't met.
func (PageResponseMultiError) AllErrors ¶
func (m PageResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageResponseMultiError) Error ¶
func (m PageResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageResponseValidationError ¶
type PageResponseValidationError struct {
// contains filtered or unexported fields
}
PageResponseValidationError is the validation error returned by PageResponse.Validate if the designated constraints aren't met.
func (PageResponseValidationError) Cause ¶
func (e PageResponseValidationError) Cause() error
Cause function returns cause value.
func (PageResponseValidationError) Error ¶
func (e PageResponseValidationError) Error() string
Error satisfies the builtin error interface
func (PageResponseValidationError) ErrorName ¶
func (e PageResponseValidationError) ErrorName() string
ErrorName returns error name.
func (PageResponseValidationError) Field ¶
func (e PageResponseValidationError) Field() string
Field function returns field value.
func (PageResponseValidationError) Key ¶
func (e PageResponseValidationError) Key() bool
Key function returns key value.
func (PageResponseValidationError) Reason ¶
func (e PageResponseValidationError) Reason() string
Reason function returns reason value.