521 lines
16 KiB
Go
521 lines
16 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.8
|
|
// protoc (unknown)
|
|
// source: pages.proto
|
|
|
|
package cms
|
|
|
|
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)
|
|
)
|
|
|
|
// 根据KEY获取内容请求
|
|
type GetPagesByKeyRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` //<必传> 内容页的key
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetPagesByKeyRequest) Reset() {
|
|
*x = GetPagesByKeyRequest{}
|
|
mi := &file_pages_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetPagesByKeyRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetPagesByKeyRequest) ProtoMessage() {}
|
|
|
|
func (x *GetPagesByKeyRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pages_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 GetPagesByKeyRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetPagesByKeyRequest) Descriptor() ([]byte, []int) {
|
|
return file_pages_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *GetPagesByKeyRequest) GetKey() string {
|
|
if x != nil {
|
|
return x.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 文章
|
|
type PagesItem struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 文章唯一标识
|
|
CreatedAt string `protobuf:"bytes,2,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
|
|
UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,proto3" json:"updated_at,omitempty"` //更新时间
|
|
PostType int32 `protobuf:"varint,4,opt,name=post_type,proto3" json:"post_type,omitempty"` // 用户自定义文章类型
|
|
Rights string `protobuf:"bytes,5,opt,name=rights,proto3" json:"rights,omitempty"` //权限
|
|
Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` // <必传>,标题
|
|
Key string `protobuf:"bytes,7,opt,name=key,proto3" json:"key,omitempty"` // <必传>,文章key
|
|
Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` //简介
|
|
CoverPath string `protobuf:"bytes,9,opt,name=cover_path,proto3" json:"cover_path,omitempty"` //封面
|
|
Cms string `protobuf:"bytes,10,opt,name=Cms,proto3" json:"Cms,omitempty"` // <必传>,内容
|
|
HasAccessory bool `protobuf:"varint,11,opt,name=has_accessory,proto3" json:"has_accessory,omitempty"` //是否有附件,默认没有
|
|
AccessoryIdentityArray []string `protobuf:"bytes,12,rep,name=accessory_identity_array,proto3" json:"accessory_identity_array,omitempty"` //附件Identity 列表
|
|
AccessoryData []*AccessoryItem `protobuf:"bytes,13,rep,name=accessory_data,proto3" json:"accessory_data,omitempty"` //附件数据
|
|
TagsData []*TagsItem `protobuf:"bytes,14,rep,name=tags_data,proto3" json:"tags_data,omitempty"` // 标签数据
|
|
TagsIdentityArray []string `protobuf:"bytes,15,rep,name=tags_identity_array,proto3" json:"tags_identity_array,omitempty"` // 标签集Identity 列表
|
|
Hits int64 `protobuf:"varint,16,opt,name=hits,proto3" json:"hits,omitempty"` //点击量
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PagesItem) Reset() {
|
|
*x = PagesItem{}
|
|
mi := &file_pages_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PagesItem) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PagesItem) ProtoMessage() {}
|
|
|
|
func (x *PagesItem) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pages_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 PagesItem.ProtoReflect.Descriptor instead.
|
|
func (*PagesItem) Descriptor() ([]byte, []int) {
|
|
return file_pages_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *PagesItem) GetIdentity() string {
|
|
if x != nil {
|
|
return x.Identity
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetCreatedAt() string {
|
|
if x != nil {
|
|
return x.CreatedAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetUpdatedAt() string {
|
|
if x != nil {
|
|
return x.UpdatedAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetPostType() int32 {
|
|
if x != nil {
|
|
return x.PostType
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *PagesItem) GetRights() string {
|
|
if x != nil {
|
|
return x.Rights
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetKey() string {
|
|
if x != nil {
|
|
return x.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetCoverPath() string {
|
|
if x != nil {
|
|
return x.CoverPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetCms() string {
|
|
if x != nil {
|
|
return x.Cms
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesItem) GetHasAccessory() bool {
|
|
if x != nil {
|
|
return x.HasAccessory
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *PagesItem) GetAccessoryIdentityArray() []string {
|
|
if x != nil {
|
|
return x.AccessoryIdentityArray
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PagesItem) GetAccessoryData() []*AccessoryItem {
|
|
if x != nil {
|
|
return x.AccessoryData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PagesItem) GetTagsData() []*TagsItem {
|
|
if x != nil {
|
|
return x.TagsData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PagesItem) GetTagsIdentityArray() []string {
|
|
if x != nil {
|
|
return x.TagsIdentityArray
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PagesItem) GetHits() int64 {
|
|
if x != nil {
|
|
return x.Hits
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 文章列表请求
|
|
type PagesListRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 页码,默认第一页
|
|
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // 单页显示数量,默认10,最多50
|
|
Keyword string `protobuf:"bytes,3,opt,name=keyword,proto3" json:"keyword,omitempty"` // 根据文章名称模糊查找
|
|
Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` // 根据用户自定义文章类型过滤,可选,默认0,全部查找
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PagesListRequest) Reset() {
|
|
*x = PagesListRequest{}
|
|
mi := &file_pages_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PagesListRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PagesListRequest) ProtoMessage() {}
|
|
|
|
func (x *PagesListRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pages_proto_msgTypes[2]
|
|
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 PagesListRequest.ProtoReflect.Descriptor instead.
|
|
func (*PagesListRequest) Descriptor() ([]byte, []int) {
|
|
return file_pages_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *PagesListRequest) GetPage() int64 {
|
|
if x != nil {
|
|
return x.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *PagesListRequest) GetSize() int64 {
|
|
if x != nil {
|
|
return x.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *PagesListRequest) GetKeyword() string {
|
|
if x != nil {
|
|
return x.Keyword
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PagesListRequest) GetType() int32 {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 文章列表回复
|
|
type PagesListReply struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Data []*PagesItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // 数据
|
|
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // 总数量
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PagesListReply) Reset() {
|
|
*x = PagesListReply{}
|
|
mi := &file_pages_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PagesListReply) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PagesListReply) ProtoMessage() {}
|
|
|
|
func (x *PagesListReply) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pages_proto_msgTypes[3]
|
|
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 PagesListReply.ProtoReflect.Descriptor instead.
|
|
func (*PagesListReply) Descriptor() ([]byte, []int) {
|
|
return file_pages_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *PagesListReply) GetData() []*PagesItem {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PagesListReply) GetCount() int64 {
|
|
if x != nil {
|
|
return x.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 获取文章详情请求
|
|
type GetPagesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 必传唯一标识
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetPagesRequest) Reset() {
|
|
*x = GetPagesRequest{}
|
|
mi := &file_pages_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetPagesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetPagesRequest) ProtoMessage() {}
|
|
|
|
func (x *GetPagesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_pages_proto_msgTypes[4]
|
|
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 GetPagesRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetPagesRequest) Descriptor() ([]byte, []int) {
|
|
return file_pages_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *GetPagesRequest) GetIdentity() string {
|
|
if x != nil {
|
|
return x.Identity
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_pages_proto protoreflect.FileDescriptor
|
|
|
|
const file_pages_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\vpages.proto\x12\x03cms\x1a\fblocks.proto\"(\n" +
|
|
"\x14GetPagesByKeyRequest\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\"\xaa\x04\n" +
|
|
"\tPagesItem\x12\x1a\n" +
|
|
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1e\n" +
|
|
"\n" +
|
|
"created_at\x18\x02 \x01(\tR\n" +
|
|
"created_at\x12\x1e\n" +
|
|
"\n" +
|
|
"updated_at\x18\x03 \x01(\tR\n" +
|
|
"updated_at\x12\x1c\n" +
|
|
"\tpost_type\x18\x04 \x01(\x05R\tpost_type\x12\x16\n" +
|
|
"\x06rights\x18\x05 \x01(\tR\x06rights\x12\x14\n" +
|
|
"\x05title\x18\x06 \x01(\tR\x05title\x12\x10\n" +
|
|
"\x03key\x18\a \x01(\tR\x03key\x12 \n" +
|
|
"\vdescription\x18\b \x01(\tR\vdescription\x12\x1e\n" +
|
|
"\n" +
|
|
"cover_path\x18\t \x01(\tR\n" +
|
|
"cover_path\x12\x10\n" +
|
|
"\x03Cms\x18\n" +
|
|
" \x01(\tR\x03Cms\x12$\n" +
|
|
"\rhas_accessory\x18\v \x01(\bR\rhas_accessory\x12:\n" +
|
|
"\x18accessory_identity_array\x18\f \x03(\tR\x18accessory_identity_array\x12:\n" +
|
|
"\x0eaccessory_data\x18\r \x03(\v2\x12.cms.AccessoryItemR\x0eaccessory_data\x12+\n" +
|
|
"\ttags_data\x18\x0e \x03(\v2\r.cms.TagsItemR\ttags_data\x120\n" +
|
|
"\x13tags_identity_array\x18\x0f \x03(\tR\x13tags_identity_array\x12\x12\n" +
|
|
"\x04hits\x18\x10 \x01(\x03R\x04hits\"h\n" +
|
|
"\x10PagesListRequest\x12\x12\n" +
|
|
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x12\n" +
|
|
"\x04size\x18\x02 \x01(\x03R\x04size\x12\x18\n" +
|
|
"\akeyword\x18\x03 \x01(\tR\akeyword\x12\x12\n" +
|
|
"\x04type\x18\x04 \x01(\x05R\x04type\"J\n" +
|
|
"\x0ePagesListReply\x12\"\n" +
|
|
"\x04data\x18\x01 \x03(\v2\x0e.cms.PagesItemR\x04data\x12\x14\n" +
|
|
"\x05count\x18\x02 \x01(\x03R\x05count\"-\n" +
|
|
"\x0fGetPagesRequest\x12\x1a\n" +
|
|
"\bidentity\x18\x01 \x01(\tR\bidentity2\xbd\x02\n" +
|
|
"\x05Pages\x125\n" +
|
|
"\x05Fetch\x12\x15.cms.PagesListRequest\x1a\x13.cms.PagesListReply\"\x00\x127\n" +
|
|
"\rGetByIdentity\x12\x14.cms.GetPagesRequest\x1a\x0e.cms.PagesItem\"\x00\x127\n" +
|
|
"\bGetByKey\x12\x19.cms.GetPagesByKeyRequest\x1a\x0e.cms.PagesItem\"\x00\x12,\n" +
|
|
"\x06Create\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12,\n" +
|
|
"\x06Modify\x12\x0e.cms.PagesItem\x1a\x10.cms.StatusReply\"\x00\x12/\n" +
|
|
"\x06Delete\x12\x11.cms.IdentRequest\x1a\x10.cms.StatusReply\"\x00B\aZ\x05.;cmsb\x06proto3"
|
|
|
|
var (
|
|
file_pages_proto_rawDescOnce sync.Once
|
|
file_pages_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_pages_proto_rawDescGZIP() []byte {
|
|
file_pages_proto_rawDescOnce.Do(func() {
|
|
file_pages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc)))
|
|
})
|
|
return file_pages_proto_rawDescData
|
|
}
|
|
|
|
var file_pages_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_pages_proto_goTypes = []any{
|
|
(*GetPagesByKeyRequest)(nil), // 0: cms.GetPagesByKeyRequest
|
|
(*PagesItem)(nil), // 1: cms.PagesItem
|
|
(*PagesListRequest)(nil), // 2: cms.PagesListRequest
|
|
(*PagesListReply)(nil), // 3: cms.PagesListReply
|
|
(*GetPagesRequest)(nil), // 4: cms.GetPagesRequest
|
|
(*AccessoryItem)(nil), // 5: cms.AccessoryItem
|
|
(*TagsItem)(nil), // 6: cms.TagsItem
|
|
(*IdentRequest)(nil), // 7: cms.IdentRequest
|
|
(*StatusReply)(nil), // 8: cms.StatusReply
|
|
}
|
|
var file_pages_proto_depIdxs = []int32{
|
|
5, // 0: cms.PagesItem.accessory_data:type_name -> cms.AccessoryItem
|
|
6, // 1: cms.PagesItem.tags_data:type_name -> cms.TagsItem
|
|
1, // 2: cms.PagesListReply.data:type_name -> cms.PagesItem
|
|
2, // 3: cms.Pages.Fetch:input_type -> cms.PagesListRequest
|
|
4, // 4: cms.Pages.GetByIdentity:input_type -> cms.GetPagesRequest
|
|
0, // 5: cms.Pages.GetByKey:input_type -> cms.GetPagesByKeyRequest
|
|
1, // 6: cms.Pages.Create:input_type -> cms.PagesItem
|
|
1, // 7: cms.Pages.Modify:input_type -> cms.PagesItem
|
|
7, // 8: cms.Pages.Delete:input_type -> cms.IdentRequest
|
|
3, // 9: cms.Pages.Fetch:output_type -> cms.PagesListReply
|
|
1, // 10: cms.Pages.GetByIdentity:output_type -> cms.PagesItem
|
|
1, // 11: cms.Pages.GetByKey:output_type -> cms.PagesItem
|
|
8, // 12: cms.Pages.Create:output_type -> cms.StatusReply
|
|
8, // 13: cms.Pages.Modify:output_type -> cms.StatusReply
|
|
8, // 14: cms.Pages.Delete:output_type -> cms.StatusReply
|
|
9, // [9:15] is the sub-list for method output_type
|
|
3, // [3:9] is the sub-list for method input_type
|
|
3, // [3:3] is the sub-list for extension type_name
|
|
3, // [3:3] is the sub-list for extension extendee
|
|
0, // [0:3] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_pages_proto_init() }
|
|
func file_pages_proto_init() {
|
|
if File_pages_proto != nil {
|
|
return
|
|
}
|
|
file_blocks_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pages_proto_rawDesc), len(file_pages_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_pages_proto_goTypes,
|
|
DependencyIndexes: file_pages_proto_depIdxs,
|
|
MessageInfos: file_pages_proto_msgTypes,
|
|
}.Build()
|
|
File_pages_proto = out.File
|
|
file_pages_proto_goTypes = nil
|
|
file_pages_proto_depIdxs = nil
|
|
}
|