refactor: centralize protobuf and remove go-zero

This commit is contained in:
2026-08-09 15:10:19 +08:00
parent 5cc5fd92ed
commit 4bbed3156c
357 changed files with 14208 additions and 19903 deletions

View File

@@ -1,12 +1,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.8
// protoc (unknown)
// source: post.proto
// protoc-gen-go v1.36.11
// protoc v7.35.0
// source: module/social/feed/proto/post.proto
package feed
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -32,7 +33,7 @@ type CommentListReply struct {
func (x *CommentListReply) Reset() {
*x = CommentListReply{}
mi := &file_post_proto_msgTypes[0]
mi := &file_module_social_feed_proto_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -44,7 +45,7 @@ func (x *CommentListReply) String() string {
func (*CommentListReply) ProtoMessage() {}
func (x *CommentListReply) ProtoReflect() protoreflect.Message {
mi := &file_post_proto_msgTypes[0]
mi := &file_module_social_feed_proto_post_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -57,7 +58,7 @@ func (x *CommentListReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use CommentListReply.ProtoReflect.Descriptor instead.
func (*CommentListReply) Descriptor() ([]byte, []int) {
return file_post_proto_rawDescGZIP(), []int{0}
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{0}
}
func (x *CommentListReply) GetList() []*CommentItem {
@@ -87,7 +88,7 @@ type CommentItem struct {
func (x *CommentItem) Reset() {
*x = CommentItem{}
mi := &file_post_proto_msgTypes[1]
mi := &file_module_social_feed_proto_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -99,7 +100,7 @@ func (x *CommentItem) String() string {
func (*CommentItem) ProtoMessage() {}
func (x *CommentItem) ProtoReflect() protoreflect.Message {
mi := &file_post_proto_msgTypes[1]
mi := &file_module_social_feed_proto_post_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -112,7 +113,7 @@ func (x *CommentItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use CommentItem.ProtoReflect.Descriptor instead.
func (*CommentItem) Descriptor() ([]byte, []int) {
return file_post_proto_rawDescGZIP(), []int{1}
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{1}
}
func (x *CommentItem) GetIdentity() string {
@@ -161,7 +162,7 @@ type PostActionRequest struct {
func (x *PostActionRequest) Reset() {
*x = PostActionRequest{}
mi := &file_post_proto_msgTypes[2]
mi := &file_module_social_feed_proto_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -173,7 +174,7 @@ func (x *PostActionRequest) String() string {
func (*PostActionRequest) ProtoMessage() {}
func (x *PostActionRequest) ProtoReflect() protoreflect.Message {
mi := &file_post_proto_msgTypes[2]
mi := &file_module_social_feed_proto_post_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -186,7 +187,7 @@ func (x *PostActionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use PostActionRequest.ProtoReflect.Descriptor instead.
func (*PostActionRequest) Descriptor() ([]byte, []int) {
return file_post_proto_rawDescGZIP(), []int{2}
return file_module_social_feed_proto_post_proto_rawDescGZIP(), []int{2}
}
func (x *PostActionRequest) GetActionOp() string {
@@ -210,12 +211,11 @@ func (x *PostActionRequest) GetIdentity() string {
return ""
}
var File_post_proto protoreflect.FileDescriptor
var File_module_social_feed_proto_post_proto protoreflect.FileDescriptor
const file_post_proto_rawDesc = "" +
const file_module_social_feed_proto_post_proto_rawDesc = "" +
"\n" +
"\x16" +
"social/feed/post.proto\x12\x04feed\x1a\x11feed/blocks.proto\"O\n" +
"#module/social/feed/proto/post.proto\x12\x04feed\x1a\x15protobuf/blocks.proto\"O\n" +
"\x10CommentListReply\x12%\n" +
"\x04list\x18\x01 \x03(\v2\x11.feed.CommentItemR\x04list\x12\x14\n" +
"\x05total\x18\x02 \x01(\x03R\x05total\"\xc1\x01\n" +
@@ -230,60 +230,60 @@ const file_post_proto_rawDesc = "" +
"\taction_op\x18\x01 \x01(\tR\bactionOp\x12\x1f\n" +
"\vaction_type\x18\x02 \x01(\tR\n" +
"actionType\x12\x1a\n" +
"\bidentity\x18\x03 \x01(\tR\bidentity2\xb0\x03\n" +
"\x04Post\x122\n" +
"\x05Fetch\x12\x12.feed.FetchRequest\x1a\x13.feed.PostListReply\"\x00\x12-\n" +
"\x06Create\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x12-\n" +
"\x06Change\x12\x0e.feed.PostItem\x1a\x11.feed.StatusReply\"\x00\x121\n" +
"\x06Remove\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x12;\n" +
"\vCommentList\x12\x12.feed.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x124\n" +
"\bidentity\x18\x03 \x01(\tR\bidentity2\xee\x03\n" +
"\x04Post\x12:\n" +
"\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x19.blocks.FeedPostListReply\"\x00\x129\n" +
"\x06Create\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" +
"\x06Change\x12\x14.blocks.FeedPostItem\x1a\x17.blocks.DataStatusReply\"\x00\x129\n" +
"\x06Remove\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12=\n" +
"\vCommentList\x12\x14.blocks.FetchRequest\x1a\x16.feed.CommentListReply\"\x00\x12:\n" +
"\n" +
"AddComment\x12\x11.feed.CommentItem\x1a\x11.feed.StatusReply\"\x00\x128\n" +
"\rDeleteComment\x12\x12.feed.IdentRequest\x1a\x11.feed.StatusReply\"\x00\x126\n" +
"\x06Action\x12\x17.feed.PostActionRequest\x1a\x11.feed.StatusReply\"\x00B\bZ\x06.;feedb\x06proto3"
"AddComment\x12\x11.feed.CommentItem\x1a\x17.blocks.DataStatusReply\"\x00\x12@\n" +
"\rDeleteComment\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x12<\n" +
"\x06Action\x12\x17.feed.PostActionRequest\x1a\x17.blocks.DataStatusReply\"\x00B%Z#bsm/full/module/social/feed/pb;feedb\x06proto3"
var (
file_post_proto_rawDescOnce sync.Once
file_post_proto_rawDescData []byte
file_module_social_feed_proto_post_proto_rawDescOnce sync.Once
file_module_social_feed_proto_post_proto_rawDescData []byte
)
func file_post_proto_rawDescGZIP() []byte {
file_post_proto_rawDescOnce.Do(func() {
file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)))
func file_module_social_feed_proto_post_proto_rawDescGZIP() []byte {
file_module_social_feed_proto_post_proto_rawDescOnce.Do(func() {
file_module_social_feed_proto_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc)))
})
return file_post_proto_rawDescData
return file_module_social_feed_proto_post_proto_rawDescData
}
var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_post_proto_goTypes = []any{
(*CommentListReply)(nil), // 0: feed.CommentListReply
(*CommentItem)(nil), // 1: feed.CommentItem
(*PostActionRequest)(nil), // 2: feed.PostActionRequest
(*FetchRequest)(nil), // 3: feed.FetchRequest
(*PostItem)(nil), // 4: feed.PostItem
(*IdentRequest)(nil), // 5: feed.IdentRequest
(*PostListReply)(nil), // 6: feed.PostListReply
(*StatusReply)(nil), // 7: feed.StatusReply
var file_module_social_feed_proto_post_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_module_social_feed_proto_post_proto_goTypes = []any{
(*CommentListReply)(nil), // 0: feed.CommentListReply
(*CommentItem)(nil), // 1: feed.CommentItem
(*PostActionRequest)(nil), // 2: feed.PostActionRequest
(*protobuf.FetchRequest)(nil), // 3: blocks.FetchRequest
(*protobuf.FeedPostItem)(nil), // 4: blocks.FeedPostItem
(*protobuf.IdentRequest)(nil), // 5: blocks.IdentRequest
(*protobuf.FeedPostListReply)(nil), // 6: blocks.FeedPostListReply
(*protobuf.DataStatusReply)(nil), // 7: blocks.DataStatusReply
}
var file_post_proto_depIdxs = []int32{
var file_module_social_feed_proto_post_proto_depIdxs = []int32{
1, // 0: feed.CommentListReply.list:type_name -> feed.CommentItem
1, // 1: feed.CommentItem.sub_comment:type_name -> feed.CommentItem
3, // 2: feed.Post.Fetch:input_type -> feed.FetchRequest
4, // 3: feed.Post.Create:input_type -> feed.PostItem
4, // 4: feed.Post.Change:input_type -> feed.PostItem
5, // 5: feed.Post.Remove:input_type -> feed.IdentRequest
3, // 6: feed.Post.CommentList:input_type -> feed.FetchRequest
3, // 2: feed.Post.Fetch:input_type -> blocks.FetchRequest
4, // 3: feed.Post.Create:input_type -> blocks.FeedPostItem
4, // 4: feed.Post.Change:input_type -> blocks.FeedPostItem
5, // 5: feed.Post.Remove:input_type -> blocks.IdentRequest
3, // 6: feed.Post.CommentList:input_type -> blocks.FetchRequest
1, // 7: feed.Post.AddComment:input_type -> feed.CommentItem
5, // 8: feed.Post.DeleteComment:input_type -> feed.IdentRequest
5, // 8: feed.Post.DeleteComment:input_type -> blocks.IdentRequest
2, // 9: feed.Post.Action:input_type -> feed.PostActionRequest
6, // 10: feed.Post.Fetch:output_type -> feed.PostListReply
7, // 11: feed.Post.Create:output_type -> feed.StatusReply
7, // 12: feed.Post.Change:output_type -> feed.StatusReply
7, // 13: feed.Post.Remove:output_type -> feed.StatusReply
6, // 10: feed.Post.Fetch:output_type -> blocks.FeedPostListReply
7, // 11: feed.Post.Create:output_type -> blocks.DataStatusReply
7, // 12: feed.Post.Change:output_type -> blocks.DataStatusReply
7, // 13: feed.Post.Remove:output_type -> blocks.DataStatusReply
0, // 14: feed.Post.CommentList:output_type -> feed.CommentListReply
7, // 15: feed.Post.AddComment:output_type -> feed.StatusReply
7, // 16: feed.Post.DeleteComment:output_type -> feed.StatusReply
7, // 17: feed.Post.Action:output_type -> feed.StatusReply
7, // 15: feed.Post.AddComment:output_type -> blocks.DataStatusReply
7, // 16: feed.Post.DeleteComment:output_type -> blocks.DataStatusReply
7, // 17: feed.Post.Action:output_type -> blocks.DataStatusReply
10, // [10:18] is the sub-list for method output_type
2, // [2:10] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -291,27 +291,26 @@ var file_post_proto_depIdxs = []int32{
0, // [0:2] is the sub-list for field type_name
}
func init() { file_post_proto_init() }
func file_post_proto_init() {
if File_post_proto != nil {
func init() { file_module_social_feed_proto_post_proto_init() }
func file_module_social_feed_proto_post_proto_init() {
if File_module_social_feed_proto_post_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_post_proto_rawDesc), len(file_post_proto_rawDesc)),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_social_feed_proto_post_proto_rawDesc), len(file_module_social_feed_proto_post_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_post_proto_goTypes,
DependencyIndexes: file_post_proto_depIdxs,
MessageInfos: file_post_proto_msgTypes,
GoTypes: file_module_social_feed_proto_post_proto_goTypes,
DependencyIndexes: file_module_social_feed_proto_post_proto_depIdxs,
MessageInfos: file_module_social_feed_proto_post_proto_msgTypes,
}.Build()
File_post_proto = out.File
file_post_proto_goTypes = nil
file_post_proto_depIdxs = nil
File_module_social_feed_proto_post_proto = out.File
file_module_social_feed_proto_post_proto_goTypes = nil
file_module_social_feed_proto_post_proto_depIdxs = nil
}