Documentation ¶
Index ¶
- Variables
- func NewContext(ctx context.Context, pageNum uint64, pageSize uint64, opts ...Option) (context.Context, error)
- func WithoutPage(ctx context.Context) context.Context
- type Option
- type Page
- func (p *Page) AsProto() *PageProto
- func (p *Page) Count() bool
- func (p *Page) CountColumn() string
- func (p *Page) EndTime() time.Time
- func (p *Page) Limit() uint64
- func (p *Page) Offset() uint64
- func (p *Page) OrderBy() string
- func (p *Page) PageNum() uint64
- func (p *Page) PageSize() uint64
- func (p *Page) Pages() uint64
- func (p *Page) SetTotal(total uint64)
- func (p *Page) StartTime() time.Time
- func (p *Page) Total() uint64
- type PageProto
- func (*PageProto) Descriptor() ([]byte, []int)deprecated
- func (x *PageProto) GetCount() bool
- func (x *PageProto) GetCountColumn() string
- func (x *PageProto) GetEndTime() *timestamppb.Timestamp
- func (x *PageProto) GetLimit() uint64
- func (x *PageProto) GetOffset() uint64
- func (x *PageProto) GetOrderBy() string
- func (x *PageProto) GetPageNum() uint64
- func (x *PageProto) GetPageSize() uint64
- func (x *PageProto) GetPages() uint64
- func (x *PageProto) GetStartTime() *timestamppb.Timestamp
- func (x *PageProto) GetTotal() uint64
- func (*PageProto) ProtoMessage()
- func (x *PageProto) ProtoReflect() protoreflect.Message
- func (x *PageProto) Reset()
- func (x *PageProto) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_page_proto protoreflect.FileDescriptor
Functions ¶
func NewContext ¶
Types ¶
type PageProto ¶
type PageProto struct { // pageNum 页码,从1开始 PageNum uint64 `protobuf:"varint,1,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"` // pageSize 页面大小 PageSize uint64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // offset 跳过的行数 Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` // limit 限制行数 Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // total 总行数 Total uint64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` // pages 总页数 Pages uint64 `protobuf:"varint,6,opt,name=pages,proto3" json:"pages,omitempty"` // count 包含count查询 Count bool `protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"` // countColumn 进行count查询的列名 CountColumn string `protobuf:"bytes,8,opt,name=count_column,json=countColumn,proto3" json:"count_column,omitempty"` // orderBy 排序, OrderBy string `protobuf:"bytes,9,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` // startTime 开始时间 StartTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // endTime 结束时间 EndTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // contains filtered or unexported fields }
func (*PageProto) Descriptor
deprecated
func (*PageProto) GetCountColumn ¶
func (*PageProto) GetEndTime ¶
func (x *PageProto) GetEndTime() *timestamppb.Timestamp
func (*PageProto) GetOrderBy ¶
func (*PageProto) GetPageNum ¶
func (*PageProto) GetPageSize ¶
func (*PageProto) GetStartTime ¶
func (x *PageProto) GetStartTime() *timestamppb.Timestamp
func (*PageProto) ProtoMessage ¶
func (*PageProto) ProtoMessage()
func (*PageProto) ProtoReflect ¶
func (x *PageProto) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.