paging

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Paging.ProtoReflect.Descriptor instead.

func (*Paging) GetPage

func (x *Paging) GetPage() int32

func (*Paging) GetPageSize

func (x *Paging) GetPageSize() int32

func (*Paging) GetTotalCount

func (x *Paging) GetTotalCount() int32

func (*Paging) GetTotalPage

func (x *Paging) GetTotalPage() int32

func (*Paging) ProtoMessage

func (*Paging) ProtoMessage()

func (*Paging) ProtoReflect

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

func (*Paging) Reset

func (x *Paging) Reset()

func (*Paging) String

func (x *Paging) String() string

func (*Paging) Validate

func (m *Paging) Validate() error

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

func (m *Paging) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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