Documentation ¶
Index ¶
- Variables
- type PagingRequest
- func (*PagingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PagingRequest) GetNopaging() bool
- func (x *PagingRequest) GetOrderBy() map[string]string
- func (x *PagingRequest) GetPageNum() int32
- func (x *PagingRequest) GetPageSize() int32
- func (x *PagingRequest) GetQuery() map[string]string
- func (*PagingRequest) ProtoMessage()
- func (x *PagingRequest) ProtoReflect() protoreflect.Message
- func (x *PagingRequest) Reset()
- func (x *PagingRequest) String() string
- func (m *PagingRequest) Validate() error
- func (m *PagingRequest) ValidateAll() error
- type PagingRequestMultiError
- type PagingRequestValidationError
- func (e PagingRequestValidationError) Cause() error
- func (e PagingRequestValidationError) Error() string
- func (e PagingRequestValidationError) ErrorName() string
- func (e PagingRequestValidationError) Field() string
- func (e PagingRequestValidationError) Key() bool
- func (e PagingRequestValidationError) Reason() string
- type PagingResponse
- func (*PagingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PagingResponse) GetItems() []*anypb.Any
- func (x *PagingResponse) GetTotal() int32
- func (*PagingResponse) ProtoMessage()
- func (x *PagingResponse) ProtoReflect() protoreflect.Message
- func (x *PagingResponse) Reset()
- func (x *PagingResponse) String() string
- func (m *PagingResponse) Validate() error
- func (m *PagingResponse) ValidateAll() error
- type PagingResponseMultiError
- type PagingResponseValidationError
- func (e PagingResponseValidationError) Cause() error
- func (e PagingResponseValidationError) Error() string
- func (e PagingResponseValidationError) ErrorName() string
- func (e PagingResponseValidationError) Field() string
- func (e PagingResponseValidationError) Key() bool
- func (e PagingResponseValidationError) Reason() string
- type SortOrder
Constants ¶
This section is empty.
Variables ¶
var ( SortOrder_name = map[int32]string{ 0: "UNSORTED", 1: "ASCENDING", 2: "DESCENDING", } SortOrder_value = map[string]int32{ "UNSORTED": 0, "ASCENDING": 1, "DESCENDING": 2, } )
Enum value maps for SortOrder.
var File_common_pagination_pagination_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PagingRequest ¶
type PagingRequest struct { // 当前页 PageNum *int32 `protobuf:"varint,1,opt,name=pageNum,proto3,oneof" json:"pageNum,omitempty"` // 每一页的行数 PageSize *int32 `protobuf:"varint,2,opt,name=pageSize,proto3,oneof" json:"pageSize,omitempty"` // 查询参数 Query map[string]string `` /* 151-byte string literal not displayed */ // 排序 OrderBy map[string]string `` /* 155-byte string literal not displayed */ // 是否不分页 Nopaging *bool `protobuf:"varint,5,opt,name=nopaging,proto3,oneof" json:"nopaging,omitempty"` // contains filtered or unexported fields }
分页通用请求
func (*PagingRequest) Descriptor
deprecated
func (*PagingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PagingRequest.ProtoReflect.Descriptor instead.
func (*PagingRequest) GetNopaging ¶
func (x *PagingRequest) GetNopaging() bool
func (*PagingRequest) GetOrderBy ¶
func (x *PagingRequest) GetOrderBy() map[string]string
func (*PagingRequest) GetPageNum ¶
func (x *PagingRequest) GetPageNum() int32
func (*PagingRequest) GetPageSize ¶
func (x *PagingRequest) GetPageSize() int32
func (*PagingRequest) GetQuery ¶
func (x *PagingRequest) GetQuery() map[string]string
func (*PagingRequest) ProtoMessage ¶
func (*PagingRequest) ProtoMessage()
func (*PagingRequest) ProtoReflect ¶
func (x *PagingRequest) ProtoReflect() protoreflect.Message
func (*PagingRequest) Reset ¶
func (x *PagingRequest) Reset()
func (*PagingRequest) String ¶
func (x *PagingRequest) String() string
func (*PagingRequest) Validate ¶
func (m *PagingRequest) Validate() error
Validate checks the field values on PagingRequest 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 (*PagingRequest) ValidateAll ¶
func (m *PagingRequest) ValidateAll() error
ValidateAll checks the field values on PagingRequest 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 PagingRequestMultiError, or nil if none found.
type PagingRequestMultiError ¶
type PagingRequestMultiError []error
PagingRequestMultiError is an error wrapping multiple validation errors returned by PagingRequest.ValidateAll() if the designated constraints aren't met.
func (PagingRequestMultiError) AllErrors ¶
func (m PagingRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PagingRequestMultiError) Error ¶
func (m PagingRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PagingRequestValidationError ¶
type PagingRequestValidationError struct {
// contains filtered or unexported fields
}
PagingRequestValidationError is the validation error returned by PagingRequest.Validate if the designated constraints aren't met.
func (PagingRequestValidationError) Cause ¶
func (e PagingRequestValidationError) Cause() error
Cause function returns cause value.
func (PagingRequestValidationError) Error ¶
func (e PagingRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PagingRequestValidationError) ErrorName ¶
func (e PagingRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PagingRequestValidationError) Field ¶
func (e PagingRequestValidationError) Field() string
Field function returns field value.
func (PagingRequestValidationError) Key ¶
func (e PagingRequestValidationError) Key() bool
Key function returns key value.
func (PagingRequestValidationError) Reason ¶
func (e PagingRequestValidationError) Reason() string
Reason function returns reason value.
type PagingResponse ¶
type PagingResponse struct { // 总数 Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 分页数据 Items []*anypb.Any `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
分页通用结果
func (*PagingResponse) Descriptor
deprecated
func (*PagingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PagingResponse.ProtoReflect.Descriptor instead.
func (*PagingResponse) GetItems ¶
func (x *PagingResponse) GetItems() []*anypb.Any
func (*PagingResponse) GetTotal ¶
func (x *PagingResponse) GetTotal() int32
func (*PagingResponse) ProtoMessage ¶
func (*PagingResponse) ProtoMessage()
func (*PagingResponse) ProtoReflect ¶
func (x *PagingResponse) ProtoReflect() protoreflect.Message
func (*PagingResponse) Reset ¶
func (x *PagingResponse) Reset()
func (*PagingResponse) String ¶
func (x *PagingResponse) String() string
func (*PagingResponse) Validate ¶
func (m *PagingResponse) Validate() error
Validate checks the field values on PagingResponse 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 (*PagingResponse) ValidateAll ¶
func (m *PagingResponse) ValidateAll() error
ValidateAll checks the field values on PagingResponse 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 PagingResponseMultiError, or nil if none found.
type PagingResponseMultiError ¶
type PagingResponseMultiError []error
PagingResponseMultiError is an error wrapping multiple validation errors returned by PagingResponse.ValidateAll() if the designated constraints aren't met.
func (PagingResponseMultiError) AllErrors ¶
func (m PagingResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PagingResponseMultiError) Error ¶
func (m PagingResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PagingResponseValidationError ¶
type PagingResponseValidationError struct {
// contains filtered or unexported fields
}
PagingResponseValidationError is the validation error returned by PagingResponse.Validate if the designated constraints aren't met.
func (PagingResponseValidationError) Cause ¶
func (e PagingResponseValidationError) Cause() error
Cause function returns cause value.
func (PagingResponseValidationError) Error ¶
func (e PagingResponseValidationError) Error() string
Error satisfies the builtin error interface
func (PagingResponseValidationError) ErrorName ¶
func (e PagingResponseValidationError) ErrorName() string
ErrorName returns error name.
func (PagingResponseValidationError) Field ¶
func (e PagingResponseValidationError) Field() string
Field function returns field value.
func (PagingResponseValidationError) Key ¶
func (e PagingResponseValidationError) Key() bool
Key function returns key value.
func (PagingResponseValidationError) Reason ¶
func (e PagingResponseValidationError) Reason() string
Reason function returns reason value.
type SortOrder ¶
type SortOrder int32
排序类型
func (SortOrder) Descriptor ¶
func (SortOrder) Descriptor() protoreflect.EnumDescriptor
func (SortOrder) EnumDescriptor
deprecated
func (SortOrder) Number ¶
func (x SortOrder) Number() protoreflect.EnumNumber
func (SortOrder) Type ¶
func (SortOrder) Type() protoreflect.EnumType