page

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 设置默认分页大小
	DefaultPageSize = 20
	// 设置默认分页号
	DefaultPageNumber = 1
)

Variables

View Source
var File_pb_page_page_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PageRequest

type PageRequest struct {
	PageSize   uint64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageNumber uint64 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	Offset     int64  `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

定义分页查询信息

func NewDefaultPageRequest added in v1.0.3

func NewDefaultPageRequest() *PageRequest

PageRequest默认构造函数

func NewPageRequest added in v1.0.3

func NewPageRequest(pagesize uint, pagenumber uint) *PageRequest

PageRequest构造函数

func (*PageRequest) ComputeOffset added in v1.0.2

func (p *PageRequest) ComputeOffset() int64

计算PageRequest中Offset的值

func (*PageRequest) Descriptor deprecated

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

Deprecated: Use PageRequest.ProtoReflect.Descriptor instead.

func (*PageRequest) GetOffset

func (x *PageRequest) GetOffset() int64

func (*PageRequest) GetPageNumber

func (x *PageRequest) GetPageNumber() uint64

func (*PageRequest) GetPageSize

func (x *PageRequest) GetPageSize() uint64

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

Jump to

Keyboard shortcuts

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