Documentation ¶
Index ¶
- Variables
- type Pagination
- func (*Pagination) Descriptor() ([]byte, []int)deprecated
- func (x *Pagination) GetPage() uint32
- func (x *Pagination) GetSize() uint32
- func (x *Pagination) GetSkipCount() bool
- func (x *Pagination) GetTotal() uint32
- func (x *Pagination) Offset() int
- func (*Pagination) ProtoMessage()
- func (x *Pagination) ProtoReflect() protoreflect.Message
- func (x *Pagination) Reset()
- func (x *Pagination) SetNextPage() (ok bool)
- func (x *Pagination) SetPage(page uint32) *Pagination
- func (x *Pagination) SetPageAndSize(page, size uint32) *Pagination
- func (x *Pagination) SetSize(size uint32) *Pagination
- func (x *Pagination) SetSkipCount() *Pagination
- func (x *Pagination) String() string
- type Scroll
- func (*Scroll) Descriptor() ([]byte, []int)deprecated
- func (x *Scroll) GetExpire() uint32
- func (x *Scroll) GetSize() uint32
- func (x *Scroll) GetToken() string
- func (*Scroll) ProtoMessage()
- func (x *Scroll) ProtoReflect() protoreflect.Message
- func (x *Scroll) Reset()
- func (x *Scroll) SetSize(size uint32) *Scroll
- func (x *Scroll) SetToken(token string) *Scroll
- func (x *Scroll) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_dbx_pagination_pagination_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Pagination struct { // @desc: current page Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // @desc: page size Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // @desc: total number of data Total uint32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` // @desc: When SkipCount is true, // even if CurrentPage is equal to 1, don't count the total. SkipCount bool `protobuf:"varint,4,opt,name=skip_count,json=skipCount,proto3" json:"skip_count,omitempty"` // contains filtered or unexported fields }
Classic pagination mode. Use "Page" and "Size" for pagination.
func NewDefaultPagination ¶
func NewDefaultPagination() *Pagination
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetPage ¶
func (x *Pagination) GetPage() uint32
func (*Pagination) GetSize ¶
func (x *Pagination) GetSize() uint32
func (*Pagination) GetSkipCount ¶
func (x *Pagination) GetSkipCount() bool
func (*Pagination) GetTotal ¶
func (x *Pagination) GetTotal() uint32
func (*Pagination) Offset ¶
func (x *Pagination) Offset() int
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) SetNextPage ¶
func (x *Pagination) SetNextPage() (ok bool)
SetNextPage If it is the last page, return false
func (*Pagination) SetPage ¶
func (x *Pagination) SetPage(page uint32) *Pagination
SetPage method set current page
func (*Pagination) SetPageAndSize ¶
func (x *Pagination) SetPageAndSize(page, size uint32) *Pagination
func (*Pagination) SetSize ¶
func (x *Pagination) SetSize(size uint32) *Pagination
func (*Pagination) SetSkipCount ¶
func (x *Pagination) SetSkipCount() *Pagination
func (*Pagination) String ¶
func (x *Pagination) String() string
type Scroll ¶
type Scroll struct { // @desc: page size Size uint32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` // @desc: next page token Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // @desc: token expire time Expire uint32 `protobuf:"varint,3,opt,name=expire,proto3" json:"expire,omitempty"` // contains filtered or unexported fields }
Scroll: mode. Do not count the total, Use "Size" and "NextToken" for pagination.
through the "NextToken" keep getting the next page until the data is finished.
func (*Scroll) Descriptor
deprecated
func (*Scroll) ProtoMessage ¶
func (*Scroll) ProtoMessage()
func (*Scroll) ProtoReflect ¶
func (x *Scroll) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.