Documentation ¶
Index ¶
- Variables
- type Paging
- func (*Paging) Descriptor() ([]byte, []int)deprecated
- func (x *Paging) GetPage() int32
- func (x *Paging) GetPageSize() int32
- func (x *Paging) GetTotalCount() int32
- func (x *Paging) GetTotalPage() int32
- func (*Paging) ProtoMessage()
- func (x *Paging) ProtoReflect() protoreflect.Message
- func (x *Paging) Reset()
- func (x *Paging) String() string
- func (m *Paging) Validate() error
- func (m *Paging) ValidateAll() error
- type PagingMultiError
- type PagingValidationError
Constants ¶
This section is empty.
Variables ¶
var File_common_paging_paging_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Paging ¶
type Paging struct { // 当前页数 Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 每页显示的记录条数 PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 总数 TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // 总页数 TotalPage int32 `protobuf:"varint,4,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"` // contains filtered or unexported fields }
Paging 分页
func (*Paging) Descriptor
deprecated
func (*Paging) GetPageSize ¶
func (*Paging) GetTotalCount ¶
func (*Paging) GetTotalPage ¶
func (*Paging) ProtoMessage ¶
func (*Paging) ProtoMessage()
func (*Paging) ProtoReflect ¶
func (x *Paging) ProtoReflect() protoreflect.Message
func (*Paging) Validate ¶
Validate checks the field values on Paging 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 (*Paging) ValidateAll ¶
ValidateAll checks the field values on Paging 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 PagingMultiError, or nil if none found.
type PagingMultiError ¶
type PagingMultiError []error
PagingMultiError is an error wrapping multiple validation errors returned by Paging.ValidateAll() if the designated constraints aren't met.
func (PagingMultiError) AllErrors ¶
func (m PagingMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PagingMultiError) Error ¶
func (m PagingMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PagingValidationError ¶
type PagingValidationError struct {
// contains filtered or unexported fields
}
PagingValidationError is the validation error returned by Paging.Validate if the designated constraints aren't met.
func (PagingValidationError) Cause ¶
func (e PagingValidationError) Cause() error
Cause function returns cause value.
func (PagingValidationError) Error ¶
func (e PagingValidationError) Error() string
Error satisfies the builtin error interface
func (PagingValidationError) ErrorName ¶
func (e PagingValidationError) ErrorName() string
ErrorName returns error name.
func (PagingValidationError) Field ¶
func (e PagingValidationError) Field() string
Field function returns field value.
func (PagingValidationError) Key ¶
func (e PagingValidationError) Key() bool
Key function returns key value.
func (PagingValidationError) Reason ¶
func (e PagingValidationError) Reason() string
Reason function returns reason value.