Documentation
¶
Overview ¶
Created by guoxin in 2024/1/7 11:47
Index ¶
- Variables
- type Page
- func (*Page) Descriptor() ([]byte, []int)deprecated
- func (x *Page) GetPage() int32
- func (x *Page) GetSize() int32
- func (x *Page) GetTotal() int64
- func (p *Page) Limit() int
- func (p *Page) Offset() int
- func (*Page) ProtoMessage()
- func (x *Page) ProtoReflect() protoreflect.Message
- func (x *Page) Reset()
- func (x *Page) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_page_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
// 页数
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty,optional"`
// 每页数据的条数
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty,optional"`
// 总条数
Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty,optional"`
// contains filtered or unexported fields
}
分页对象,在请求和响应中使用该对象 eg:
{
"code": 200,
"msg": "ok",
"data": {
"page": {
"page": 1,
"size": 20,
"total": 1000
},
"list": [
data1...,
data2...,
dataN...
]
}
}
}
func (*Page) ProtoReflect ¶
func (x *Page) ProtoReflect() protoreflect.Message
Source Files
¶
- page.pb.go
- tools.go
Click to show internal directories.
Click to hide internal directories.