refactor: localize protobuf definitions
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
package relation
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -85,7 +84,7 @@ func (x *ApplyFetchReply) GetApplys() []*ApplyItem {
|
||||
type ApplyItem struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
|
||||
From *protobuf.RelationItem `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
||||
From *RelationItem `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
|
||||
Message *MessageItem `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` //时间
|
||||
Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // 状态
|
||||
@@ -130,7 +129,7 @@ func (x *ApplyItem) GetIdentity() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ApplyItem) GetFrom() *protobuf.RelationItem {
|
||||
func (x *ApplyItem) GetFrom() *RelationItem {
|
||||
if x != nil {
|
||||
return x.From
|
||||
}
|
||||
@@ -331,10 +330,10 @@ func (x *ApplyMessageRequest) GetBody() string {
|
||||
}
|
||||
|
||||
type PartFriendReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Friends []*protobuf.RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Friends []*RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -383,7 +382,7 @@ func (x *PartFriendReply) GetVersion() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PartFriendReply) GetFriends() []*protobuf.RelationItem {
|
||||
func (x *PartFriendReply) GetFriends() []*RelationItem {
|
||||
if x != nil {
|
||||
return x.Friends
|
||||
}
|
||||
@@ -391,11 +390,11 @@ func (x *PartFriendReply) GetFriends() []*protobuf.RelationItem {
|
||||
}
|
||||
|
||||
type FriendsReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Tags []*TagItem `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` //分组标签信息
|
||||
Friends []*protobuf.RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // 总记录数
|
||||
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` //版本号
|
||||
Tags []*TagItem `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` //分组标签信息
|
||||
Friends []*RelationItem `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"` //好友信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -451,7 +450,7 @@ func (x *FriendsReply) GetTags() []*TagItem {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *FriendsReply) GetFriends() []*protobuf.RelationItem {
|
||||
func (x *FriendsReply) GetFriends() []*RelationItem {
|
||||
if x != nil {
|
||||
return x.Friends
|
||||
}
|
||||
@@ -460,7 +459,7 @@ func (x *FriendsReply) GetFriends() []*protobuf.RelationItem {
|
||||
|
||||
type FriendApplyGetReply struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *protobuf.RelationItem `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 会员信息卡片
|
||||
Data *RelationItem `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 会员信息卡片
|
||||
Message []*MessageItem `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"` //聊天记录
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -496,7 +495,7 @@ func (*FriendApplyGetReply) Descriptor() ([]byte, []int) {
|
||||
return file_module_social_relation_proto_friend_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *FriendApplyGetReply) GetData() *protobuf.RelationItem {
|
||||
func (x *FriendApplyGetReply) GetData() *RelationItem {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@@ -858,7 +857,7 @@ var File_module_social_relation_proto_friend_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_social_relation_proto_friend_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
")module/social/relation/proto/friend.proto\x12\brelation\x1a\x15protobuf/blocks.proto\"n\n" +
|
||||
")module/social/relation/proto/friend.proto\x12\brelation\x1a(module/social/relation/proto/const.proto\"n\n" +
|
||||
"\x0fApplyFetchReply\x12\x14\n" +
|
||||
"\x05total\x18\x01 \x01(\x05R\x05total\x12\x18\n" +
|
||||
"\aversion\x18\x02 \x01(\x03R\aversion\x12+\n" +
|
||||
@@ -951,26 +950,26 @@ func file_module_social_relation_proto_friend_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_social_relation_proto_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_module_social_relation_proto_friend_proto_goTypes = []any{
|
||||
(*ApplyFetchReply)(nil), // 0: relation.ApplyFetchReply
|
||||
(*ApplyItem)(nil), // 1: relation.ApplyItem
|
||||
(*ApplyDoRequest)(nil), // 2: relation.ApplyDoRequest
|
||||
(*ApplyDoPassRequest)(nil), // 3: relation.ApplyDoPassRequest
|
||||
(*ApplyMessageRequest)(nil), // 4: relation.ApplyMessageRequest
|
||||
(*PartFriendReply)(nil), // 5: relation.PartFriendReply
|
||||
(*FriendsReply)(nil), // 6: relation.FriendsReply
|
||||
(*FriendApplyGetReply)(nil), // 7: relation.FriendApplyGetReply
|
||||
(*MessageItem)(nil), // 8: relation.MessageItem
|
||||
(*ModifyNicknameRequest)(nil), // 9: relation.ModifyNicknameRequest
|
||||
(*FriendTagsReply)(nil), // 10: relation.FriendTagsReply
|
||||
(*TagItem)(nil), // 11: relation.TagItem
|
||||
(*TagDoCreateRequest)(nil), // 12: relation.TagDoCreateRequest
|
||||
(*TagDoUpdateRequest)(nil), // 13: relation.TagDoUpdateRequest
|
||||
(*protobuf.RelationItem)(nil), // 14: blocks.RelationItem
|
||||
(*protobuf.SearchRequest)(nil), // 15: blocks.SearchRequest
|
||||
(*protobuf.VersionRequest)(nil), // 16: blocks.VersionRequest
|
||||
(*protobuf.IdentRequest)(nil), // 17: blocks.IdentRequest
|
||||
(*protobuf.Empty)(nil), // 18: blocks.Empty
|
||||
(*protobuf.DataStatusReply)(nil), // 19: blocks.DataStatusReply
|
||||
(*ApplyFetchReply)(nil), // 0: relation.ApplyFetchReply
|
||||
(*ApplyItem)(nil), // 1: relation.ApplyItem
|
||||
(*ApplyDoRequest)(nil), // 2: relation.ApplyDoRequest
|
||||
(*ApplyDoPassRequest)(nil), // 3: relation.ApplyDoPassRequest
|
||||
(*ApplyMessageRequest)(nil), // 4: relation.ApplyMessageRequest
|
||||
(*PartFriendReply)(nil), // 5: relation.PartFriendReply
|
||||
(*FriendsReply)(nil), // 6: relation.FriendsReply
|
||||
(*FriendApplyGetReply)(nil), // 7: relation.FriendApplyGetReply
|
||||
(*MessageItem)(nil), // 8: relation.MessageItem
|
||||
(*ModifyNicknameRequest)(nil), // 9: relation.ModifyNicknameRequest
|
||||
(*FriendTagsReply)(nil), // 10: relation.FriendTagsReply
|
||||
(*TagItem)(nil), // 11: relation.TagItem
|
||||
(*TagDoCreateRequest)(nil), // 12: relation.TagDoCreateRequest
|
||||
(*TagDoUpdateRequest)(nil), // 13: relation.TagDoUpdateRequest
|
||||
(*RelationItem)(nil), // 14: blocks.RelationItem
|
||||
(*SearchRequest)(nil), // 15: blocks.SearchRequest
|
||||
(*VersionRequest)(nil), // 16: blocks.VersionRequest
|
||||
(*IdentRequest)(nil), // 17: blocks.IdentRequest
|
||||
(*Empty)(nil), // 18: blocks.Empty
|
||||
(*DataStatusReply)(nil), // 19: blocks.DataStatusReply
|
||||
}
|
||||
var file_module_social_relation_proto_friend_proto_depIdxs = []int32{
|
||||
1, // 0: relation.ApplyFetchReply.applys:type_name -> relation.ApplyItem
|
||||
@@ -1028,6 +1027,7 @@ func file_module_social_relation_proto_friend_proto_init() {
|
||||
if File_module_social_relation_proto_friend_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_social_relation_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
Reference in New Issue
Block a user