212 lines
6.7 KiB
Go
212 lines
6.7 KiB
Go
// nockchain/common/v1/pagination.proto
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.9
|
|
// protoc v3.20.3
|
|
// source: pagination.proto
|
|
|
|
package nockchain
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Generic pagination parameters for list-style RPCs.
|
|
// These types are intended to be reused across public APIs.
|
|
//
|
|
// Contract:
|
|
// - The server may return fewer items than requested (client_page_items_limit is a hint).
|
|
// - page_token is an opaque cursor produced by the server; clients must treat
|
|
// it as a black box. Servers may encode snapshot identity and last-key.
|
|
// - For consistent pagination, clients should include the returned page_token
|
|
// in the next request without modification.
|
|
// - Servers may enforce a maximum client_page_items_limit and/or byte budget regardless of
|
|
// client hints.
|
|
type PageRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Maximum number of items to return. The server may return fewer items
|
|
// than requested. Clients should not rely on receiving exactly this count.
|
|
ClientPageItemsLimit uint32 `protobuf:"varint,1,opt,name=client_page_items_limit,json=clientPageItemsLimit,proto3" json:"client_page_items_limit,omitempty"`
|
|
// Opaque cursor returned by a previous call. When set, the server resumes
|
|
// the listing from the position described by the token.
|
|
// An empty token indicates the first page.
|
|
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
|
// Optional soft limit on the uncompressed bytes to return in a single page.
|
|
// The server may ignore or cap this value according to policy. This refers
|
|
// to the gRPC payload size after protobuf encoding and decompression.
|
|
MaxBytes uint64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PageRequest) Reset() {
|
|
*x = PageRequest{}
|
|
mi := &file_pagination_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PageRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PageRequest) ProtoMessage() {}
|
|
|
|
func (x *PageRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pagination_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use PageRequest.ProtoReflect.Descriptor instead.
|
|
func (*PageRequest) Descriptor() ([]byte, []int) {
|
|
return file_pagination_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *PageRequest) GetClientPageItemsLimit() uint32 {
|
|
if x != nil {
|
|
return x.ClientPageItemsLimit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *PageRequest) GetPageToken() string {
|
|
if x != nil {
|
|
return x.PageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PageRequest) GetMaxBytes() uint64 {
|
|
if x != nil {
|
|
return x.MaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type PageResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// Opaque cursor for fetching the next page. Empty when there are no more
|
|
// results.
|
|
NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PageResponse) Reset() {
|
|
*x = PageResponse{}
|
|
mi := &file_pagination_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PageResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PageResponse) ProtoMessage() {}
|
|
|
|
func (x *PageResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pagination_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use PageResponse.ProtoReflect.Descriptor instead.
|
|
func (*PageResponse) Descriptor() ([]byte, []int) {
|
|
return file_pagination_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *PageResponse) GetNextPageToken() string {
|
|
if x != nil {
|
|
return x.NextPageToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_pagination_proto protoreflect.FileDescriptor
|
|
|
|
const file_pagination_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x10pagination.proto\x12\x13nockchain.public.v1\"\x80\x01\n" +
|
|
"\vPageRequest\x125\n" +
|
|
"\x17client_page_items_limit\x18\x01 \x01(\rR\x14clientPageItemsLimit\x12\x1d\n" +
|
|
"\n" +
|
|
"page_token\x18\x02 \x01(\tR\tpageToken\x12\x1b\n" +
|
|
"\tmax_bytes\x18\x03 \x01(\x04R\bmaxBytes\"6\n" +
|
|
"\fPageResponse\x12&\n" +
|
|
"\x0fnext_page_token\x18\x01 \x01(\tR\rnextPageTokenB\x0eZ\f./;nockchainb\x06proto3"
|
|
|
|
var (
|
|
file_pagination_proto_rawDescOnce sync.Once
|
|
file_pagination_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_pagination_proto_rawDescGZIP() []byte {
|
|
file_pagination_proto_rawDescOnce.Do(func() {
|
|
file_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pagination_proto_rawDesc), len(file_pagination_proto_rawDesc)))
|
|
})
|
|
return file_pagination_proto_rawDescData
|
|
}
|
|
|
|
var file_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_pagination_proto_goTypes = []any{
|
|
(*PageRequest)(nil), // 0: nockchain.public.v1.PageRequest
|
|
(*PageResponse)(nil), // 1: nockchain.public.v1.PageResponse
|
|
}
|
|
var file_pagination_proto_depIdxs = []int32{
|
|
0, // [0:0] is the sub-list for method output_type
|
|
0, // [0:0] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_pagination_proto_init() }
|
|
func file_pagination_proto_init() {
|
|
if File_pagination_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pagination_proto_rawDesc), len(file_pagination_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_pagination_proto_goTypes,
|
|
DependencyIndexes: file_pagination_proto_depIdxs,
|
|
MessageInfos: file_pagination_proto_msgTypes,
|
|
}.Build()
|
|
File_pagination_proto = out.File
|
|
file_pagination_proto_goTypes = nil
|
|
file_pagination_proto_depIdxs = nil
|
|
}
|