274 lines
10 KiB
Go
274 lines
10 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
// versions:
|
||
// protoc-gen-go v1.36.6
|
||
// protoc (unknown)
|
||
// source: pagination/v1/pagination.proto
|
||
|
||
package v1
|
||
|
||
import (
|
||
_ "github.com/google/gnostic/openapiv3"
|
||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
|
||
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)
|
||
)
|
||
|
||
// 分页通用请求
|
||
type PagingRequest struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// 当前页码
|
||
Page *int32 `protobuf:"varint,1,opt,name=page,proto3,oneof" json:"page,omitempty"`
|
||
// 每一页的行数
|
||
PageSize *int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"`
|
||
// AND过滤参数,其语法为json格式的字符串,如:{"key1":"val1","key2":"val2"},具体请参见:https://github.com/tx7do/go-utils/tree/main/entgo/query/README.md
|
||
Query *string `protobuf:"bytes,3,opt,name=query,proto3,oneof" json:"query,omitempty"`
|
||
// OR过滤参数,语法同AND过滤参数。
|
||
OrQuery *string `protobuf:"bytes,4,opt,name=or_query,json=or,proto3,oneof" json:"or_query,omitempty"`
|
||
// 排序条件,其语法为JSON字符串,例如:{"val1", "-val2"}。字段名前加'-'为降序,否则为升序。
|
||
OrderBy []string `protobuf:"bytes,5,rep,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
|
||
// 是否不分页,如果为true,则page和pageSize参数无效。
|
||
NoPaging *bool `protobuf:"varint,6,opt,name=no_paging,json=noPaging,proto3,oneof" json:"no_paging,omitempty"`
|
||
// 字段掩码,其作用为SELECT中的字段,其语法为使用逗号分隔字段名,例如:id,realName,userName。如果为空则选中所有字段,即SELECT *。
|
||
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=field_mask,json=fieldMask,proto3,oneof" json:"field_mask,omitempty"`
|
||
TenantId *uint32 `protobuf:"varint,8,opt,name=tenant_id,json=tenantId,proto3,oneof" json:"tenant_id,omitempty"` // 租户ID
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *PagingRequest) Reset() {
|
||
*x = PagingRequest{}
|
||
mi := &file_pagination_v1_pagination_proto_msgTypes[0]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *PagingRequest) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*PagingRequest) ProtoMessage() {}
|
||
|
||
func (x *PagingRequest) ProtoReflect() protoreflect.Message {
|
||
mi := &file_pagination_v1_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 PagingRequest.ProtoReflect.Descriptor instead.
|
||
func (*PagingRequest) Descriptor() ([]byte, []int) {
|
||
return file_pagination_v1_pagination_proto_rawDescGZIP(), []int{0}
|
||
}
|
||
|
||
func (x *PagingRequest) GetPage() int32 {
|
||
if x != nil && x.Page != nil {
|
||
return *x.Page
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *PagingRequest) GetPageSize() int32 {
|
||
if x != nil && x.PageSize != nil {
|
||
return *x.PageSize
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *PagingRequest) GetQuery() string {
|
||
if x != nil && x.Query != nil {
|
||
return *x.Query
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *PagingRequest) GetOrQuery() string {
|
||
if x != nil && x.OrQuery != nil {
|
||
return *x.OrQuery
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *PagingRequest) GetOrderBy() []string {
|
||
if x != nil {
|
||
return x.OrderBy
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *PagingRequest) GetNoPaging() bool {
|
||
if x != nil && x.NoPaging != nil {
|
||
return *x.NoPaging
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *PagingRequest) GetFieldMask() *fieldmaskpb.FieldMask {
|
||
if x != nil {
|
||
return x.FieldMask
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *PagingRequest) GetTenantId() uint32 {
|
||
if x != nil && x.TenantId != nil {
|
||
return *x.TenantId
|
||
}
|
||
return 0
|
||
}
|
||
|
||
// 分页通用结果
|
||
type PagingResponse struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// 总数
|
||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||
// 分页数据
|
||
Items [][]byte `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *PagingResponse) Reset() {
|
||
*x = PagingResponse{}
|
||
mi := &file_pagination_v1_pagination_proto_msgTypes[1]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *PagingResponse) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*PagingResponse) ProtoMessage() {}
|
||
|
||
func (x *PagingResponse) ProtoReflect() protoreflect.Message {
|
||
mi := &file_pagination_v1_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 PagingResponse.ProtoReflect.Descriptor instead.
|
||
func (*PagingResponse) Descriptor() ([]byte, []int) {
|
||
return file_pagination_v1_pagination_proto_rawDescGZIP(), []int{1}
|
||
}
|
||
|
||
func (x *PagingResponse) GetTotal() int32 {
|
||
if x != nil {
|
||
return x.Total
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *PagingResponse) GetItems() [][]byte {
|
||
if x != nil {
|
||
return x.Items
|
||
}
|
||
return nil
|
||
}
|
||
|
||
var File_pagination_v1_pagination_proto protoreflect.FileDescriptor
|
||
|
||
const file_pagination_v1_pagination_proto_rawDesc = "" +
|
||
"\n" +
|
||
"\x1epagination/v1/pagination.proto\x12\n" +
|
||
"pagination\x1a google/protobuf/field_mask.proto\x1a$gnostic/openapi/v3/annotations.proto\"\x95\t\n" +
|
||
"\rPagingRequest\x127\n" +
|
||
"\x04page\x18\x01 \x01(\x05B\x1e\xbaG\x1b\x8a\x02\t\t\x00\x00\x00\x00\x00\x00\xf0?\x92\x02\f当前页码H\x00R\x04page\x88\x01\x01\x12F\n" +
|
||
"\tpage_size\x18\x02 \x01(\x05B$\xbaG!\x8a\x02\t\t\x00\x00\x00\x00\x00\x00$@\x92\x02\x12每一页的行数H\x01R\bpageSize\x88\x01\x01\x12\xf5\x01\n" +
|
||
"\x05query\x18\x03 \x01(\tB\xd9\x01\xbaG\xd5\x01:\x1f\x12\x1d{\"key1\":\"val1\",\"key2\":\"val2\"}\x92\x02\xb0\x01AND过滤参数,其语法为json格式的字符串,如:{\"key1\":\"val1\",\"key2\":\"val2\"},具体请参见:https://github.com/tx7do/go-utils/tree/main/entgo/query/README.mdH\x02R\x05query\x88\x01\x01\x12P\n" +
|
||
"\bor_query\x18\x04 \x01(\tB5\xbaG2:\x1f\x12\x1d{\"key1\":\"val1\",\"key2\":\"val2\"}\x92\x02\x0eOR过滤参数H\x03R\x02or\x88\x01\x01\x12\xb0\x01\n" +
|
||
"\border_by\x18\x05 \x03(\tB\x94\x01\xbaG\x90\x01:\x13\x12\x11{\"val1\", \"-val2\"}\x92\x02x排序条件,其语法为JSON字符串,例如:{\"val1\", \"-val2\"}。字段名前加'-'为降序,否则为升序。R\aorderBy\x12k\n" +
|
||
"\tno_paging\x18\x06 \x01(\bBI\xbaGF\x92\x02C是否不分页,如果为true,则page和pageSize参数无效。H\x04R\bnoPaging\x88\x01\x01\x12\x8d\x02\n" +
|
||
"\n" +
|
||
"field_mask\x18\a \x01(\v2\x1a.google.protobuf.FieldMaskB\xcc\x01\xbaG\xc8\x01:\x16\x12\x14id,realName,userName\x92\x02\xac\x01字段掩码,其作用为SELECT中的字段,其语法为使用逗号分隔字段名,例如:id,realName,userName。如果为空则选中所有字段,即SELECT *。H\x05R\tfieldMask\x88\x01\x01\x120\n" +
|
||
"\ttenant_id\x18\b \x01(\rB\x0e\xbaG\v\x92\x02\b租户IDH\x06R\btenantId\x88\x01\x01B\a\n" +
|
||
"\x05_pageB\f\n" +
|
||
"\n" +
|
||
"_page_sizeB\b\n" +
|
||
"\x06_queryB\v\n" +
|
||
"\t_or_queryB\f\n" +
|
||
"\n" +
|
||
"_no_pagingB\r\n" +
|
||
"\v_field_maskB\f\n" +
|
||
"\n" +
|
||
"_tenant_id\"<\n" +
|
||
"\x0ePagingResponse\x12\x14\n" +
|
||
"\x05total\x18\x01 \x01(\x05R\x05total\x12\x14\n" +
|
||
"\x05items\x18\x02 \x03(\fR\x05itemsB\xa5\x01\n" +
|
||
"\x0ecom.paginationB\x0fPaginationProtoP\x01Z:github.com/tx7do/kratos-bootstrap/api/gen/go/pagination/v1\xa2\x02\x03PXX\xaa\x02\n" +
|
||
"Pagination\xca\x02\n" +
|
||
"Pagination\xe2\x02\x16Pagination\\GPBMetadata\xea\x02\n" +
|
||
"Paginationb\x06proto3"
|
||
|
||
var (
|
||
file_pagination_v1_pagination_proto_rawDescOnce sync.Once
|
||
file_pagination_v1_pagination_proto_rawDescData []byte
|
||
)
|
||
|
||
func file_pagination_v1_pagination_proto_rawDescGZIP() []byte {
|
||
file_pagination_v1_pagination_proto_rawDescOnce.Do(func() {
|
||
file_pagination_v1_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pagination_v1_pagination_proto_rawDesc), len(file_pagination_v1_pagination_proto_rawDesc)))
|
||
})
|
||
return file_pagination_v1_pagination_proto_rawDescData
|
||
}
|
||
|
||
var file_pagination_v1_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||
var file_pagination_v1_pagination_proto_goTypes = []any{
|
||
(*PagingRequest)(nil), // 0: pagination.PagingRequest
|
||
(*PagingResponse)(nil), // 1: pagination.PagingResponse
|
||
(*fieldmaskpb.FieldMask)(nil), // 2: google.protobuf.FieldMask
|
||
}
|
||
var file_pagination_v1_pagination_proto_depIdxs = []int32{
|
||
2, // 0: pagination.PagingRequest.field_mask:type_name -> google.protobuf.FieldMask
|
||
1, // [1:1] is the sub-list for method output_type
|
||
1, // [1:1] is the sub-list for method input_type
|
||
1, // [1:1] is the sub-list for extension type_name
|
||
1, // [1:1] is the sub-list for extension extendee
|
||
0, // [0:1] is the sub-list for field type_name
|
||
}
|
||
|
||
func init() { file_pagination_v1_pagination_proto_init() }
|
||
func file_pagination_v1_pagination_proto_init() {
|
||
if File_pagination_v1_pagination_proto != nil {
|
||
return
|
||
}
|
||
file_pagination_v1_pagination_proto_msgTypes[0].OneofWrappers = []any{}
|
||
type x struct{}
|
||
out := protoimpl.TypeBuilder{
|
||
File: protoimpl.DescBuilder{
|
||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pagination_v1_pagination_proto_rawDesc), len(file_pagination_v1_pagination_proto_rawDesc)),
|
||
NumEnums: 0,
|
||
NumMessages: 2,
|
||
NumExtensions: 0,
|
||
NumServices: 0,
|
||
},
|
||
GoTypes: file_pagination_v1_pagination_proto_goTypes,
|
||
DependencyIndexes: file_pagination_v1_pagination_proto_depIdxs,
|
||
MessageInfos: file_pagination_v1_pagination_proto_msgTypes,
|
||
}.Build()
|
||
File_pagination_v1_pagination_proto = out.File
|
||
file_pagination_v1_pagination_proto_goTypes = nil
|
||
file_pagination_v1_pagination_proto_depIdxs = nil
|
||
}
|