refactor: localize protobuf definitions
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
package relation
|
||||
|
||||
import blocks "bsm/full/protobuf"
|
||||
|
||||
type Empty = blocks.Empty
|
||||
type FetchRequest = blocks.FetchRequest
|
||||
type IdentRequest = blocks.IdentRequest
|
||||
type VersionRequest = blocks.VersionRequest
|
||||
type SearchRequest = blocks.SearchRequest
|
||||
type StatusReply = blocks.DataStatusReply
|
||||
type RelationItem = blocks.RelationItem
|
||||
type FetchRelationItemReply = blocks.FetchRelationItemReply
|
||||
3368
module/social/relation/pb/const.pb.go
Normal file
3368
module/social/relation/pb/const.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
@@ -25,7 +24,7 @@ var File_module_social_relation_proto_follow_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_social_relation_proto_follow_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
")module/social/relation/proto/follow.proto\x12\brelation\x1a\x15protobuf/blocks.proto2\xf6\x01\n" +
|
||||
")module/social/relation/proto/follow.proto\x12\brelation\x1a(module/social/relation/proto/const.proto2\xf6\x01\n" +
|
||||
"\x06Follow\x128\n" +
|
||||
"\x05Doing\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x127\n" +
|
||||
"\x04Undo\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00\x128\n" +
|
||||
@@ -33,10 +32,10 @@ const file_module_social_relation_proto_follow_proto_rawDesc = "" +
|
||||
"\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x1e.blocks.FetchRelationItemReply\"\x00B-Z+bsm/full/module/social/relation/pb;relationb\x06proto3"
|
||||
|
||||
var file_module_social_relation_proto_follow_proto_goTypes = []any{
|
||||
(*protobuf.IdentRequest)(nil), // 0: blocks.IdentRequest
|
||||
(*protobuf.FetchRequest)(nil), // 1: blocks.FetchRequest
|
||||
(*protobuf.DataStatusReply)(nil), // 2: blocks.DataStatusReply
|
||||
(*protobuf.FetchRelationItemReply)(nil), // 3: blocks.FetchRelationItemReply
|
||||
(*IdentRequest)(nil), // 0: blocks.IdentRequest
|
||||
(*FetchRequest)(nil), // 1: blocks.FetchRequest
|
||||
(*DataStatusReply)(nil), // 2: blocks.DataStatusReply
|
||||
(*FetchRelationItemReply)(nil), // 3: blocks.FetchRelationItemReply
|
||||
}
|
||||
var file_module_social_relation_proto_follow_proto_depIdxs = []int32{
|
||||
0, // 0: relation.Follow.Doing:input_type -> blocks.IdentRequest
|
||||
@@ -59,6 +58,7 @@ func file_module_social_relation_proto_follow_proto_init() {
|
||||
if File_module_social_relation_proto_follow_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_social_relation_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package relation
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -65,7 +64,7 @@ func local_request_Follow_Doing_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -80,7 +79,7 @@ func request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Follow_Undo_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -107,7 +106,7 @@ func request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Follow_State_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -119,7 +118,7 @@ func local_request_Follow_State_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FollowClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -134,7 +133,7 @@ func request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Follow_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FollowServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package relation
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -33,13 +32,13 @@ const (
|
||||
// relation-关系管理:关注
|
||||
type FollowClient interface {
|
||||
// 执行关注
|
||||
Doing(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 撤销关注
|
||||
Undo(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 关注状态
|
||||
State(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 获取关注列表
|
||||
Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error)
|
||||
Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error)
|
||||
}
|
||||
|
||||
type followClient struct {
|
||||
@@ -50,9 +49,9 @@ func NewFollowClient(cc grpc.ClientConnInterface) FollowClient {
|
||||
return &followClient{cc}
|
||||
}
|
||||
|
||||
func (c *followClient) Doing(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *followClient) Doing(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Follow_Doing_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -60,9 +59,9 @@ func (c *followClient) Doing(ctx context.Context, in *protobuf.IdentRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *followClient) Undo(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *followClient) Undo(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Follow_Undo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -70,9 +69,9 @@ func (c *followClient) Undo(ctx context.Context, in *protobuf.IdentRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *followClient) State(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *followClient) State(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Follow_State_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -80,9 +79,9 @@ func (c *followClient) State(ctx context.Context, in *protobuf.IdentRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *followClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) {
|
||||
func (c *followClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.FetchRelationItemReply)
|
||||
out := new(FetchRelationItemReply)
|
||||
err := c.cc.Invoke(ctx, Follow_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -97,13 +96,13 @@ func (c *followClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opt
|
||||
// relation-关系管理:关注
|
||||
type FollowServer interface {
|
||||
// 执行关注
|
||||
Doing(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
Doing(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 撤销关注
|
||||
Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
Undo(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 关注状态
|
||||
State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
State(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 获取关注列表
|
||||
Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error)
|
||||
Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedFollowServer should be embedded to have
|
||||
@@ -113,16 +112,16 @@ type FollowServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedFollowServer struct{}
|
||||
|
||||
func (UnimplementedFollowServer) Doing(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFollowServer) Doing(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Doing not implemented")
|
||||
}
|
||||
func (UnimplementedFollowServer) Undo(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFollowServer) Undo(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Undo not implemented")
|
||||
}
|
||||
func (UnimplementedFollowServer) State(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFollowServer) State(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method State not implemented")
|
||||
}
|
||||
func (UnimplementedFollowServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) {
|
||||
func (UnimplementedFollowServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedFollowServer) testEmbeddedByValue() {}
|
||||
@@ -146,7 +145,7 @@ func RegisterFollowServer(s grpc.ServiceRegistrar, srv FollowServer) {
|
||||
}
|
||||
|
||||
func _Follow_Doing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -158,13 +157,13 @@ func _Follow_Doing_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Follow_Doing_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FollowServer).Doing(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FollowServer).Doing(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Follow_Undo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -176,13 +175,13 @@ func _Follow_Undo_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Follow_Undo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FollowServer).Undo(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FollowServer).Undo(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Follow_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -194,13 +193,13 @@ func _Follow_State_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Follow_State_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FollowServer).State(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FollowServer).State(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Follow_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.FetchRequest)
|
||||
in := new(FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -212,7 +211,7 @@ func _Follow_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Follow_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FollowServer).Fetch(ctx, req.(*protobuf.FetchRequest))
|
||||
return srv.(FollowServer).Fetch(ctx, req.(*FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package relation
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.SearchRequest
|
||||
protoReq SearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
|
||||
func local_request_Friend_Search_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.SearchRequest
|
||||
protoReq SearchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -65,7 +64,7 @@ func local_request_Friend_Search_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.VersionRequest
|
||||
protoReq VersionRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -80,7 +79,7 @@ func request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.VersionRequest
|
||||
protoReq VersionRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Friend_Fetch_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -107,7 +106,7 @@ func request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, clie
|
||||
|
||||
func local_request_Friend_Get_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -146,7 +145,7 @@ func local_request_Friend_ModifyNickname_0(ctx context.Context, marshaler runtim
|
||||
|
||||
func request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -161,7 +160,7 @@ func request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler
|
||||
|
||||
func local_request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -173,7 +172,7 @@ func local_request_Friend_DoPopular_0(ctx context.Context, marshaler runtime.Mar
|
||||
|
||||
func request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -188,7 +187,7 @@ func request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -200,7 +199,7 @@ func local_request_Friend_UndoPopular_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -215,7 +214,7 @@ func request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
|
||||
func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -227,7 +226,7 @@ func local_request_Friend_Delete_0(ctx context.Context, marshaler runtime.Marsha
|
||||
|
||||
func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.VersionRequest
|
||||
protoReq VersionRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -242,7 +241,7 @@ func request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func local_request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.VersionRequest
|
||||
protoReq VersionRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -254,7 +253,7 @@ func local_request_Friend_ApplyFetch_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -269,7 +268,7 @@ func request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Friend_ApplyGet_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -362,7 +361,7 @@ func local_request_Friend_ApplyDoPass_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
func request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -377,7 +376,7 @@ func request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marsh
|
||||
|
||||
func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -389,7 +388,7 @@ func local_request_Friend_ApplyDoReject_0(ctx context.Context, marshaler runtime
|
||||
|
||||
func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -404,7 +403,7 @@ func request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -416,7 +415,7 @@ func local_request_Friend_TagFetch_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, client FriendClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -431,7 +430,7 @@ func request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Mars
|
||||
|
||||
func local_request_Friend_TagMemberFetch_0(ctx context.Context, marshaler runtime.Marshaler, server FriendServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package relation
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -46,39 +45,39 @@ const (
|
||||
// relation-关系管理:好友
|
||||
type FriendClient interface {
|
||||
// 搜索
|
||||
Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error)
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error)
|
||||
// 获取好友列表
|
||||
Fetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error)
|
||||
Fetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error)
|
||||
// 获取用户信息卡片
|
||||
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error)
|
||||
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error)
|
||||
// 修改好友备注名称,如果要清除备注,直接nickname传空值
|
||||
ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 受你欢迎的,置顶
|
||||
DoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
DoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 取消受欢迎的,取消置顶
|
||||
UndoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
UndoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 删除好友
|
||||
Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 好友申请列表
|
||||
ApplyFetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error)
|
||||
ApplyFetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error)
|
||||
// 好友申请详情
|
||||
ApplyGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error)
|
||||
ApplyGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error)
|
||||
// 好友申请
|
||||
ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 好友申请Do:留言
|
||||
ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 好友申请Do:确认
|
||||
ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 好友申请Do:拒绝
|
||||
ApplyDoReject(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoReject(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 获取标签列表
|
||||
TagFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*FriendTagsReply, error)
|
||||
TagFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FriendTagsReply, error)
|
||||
// 获取标签成员
|
||||
TagMemberFetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error)
|
||||
TagMemberFetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error)
|
||||
// 创建标签
|
||||
TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 更新标签成员
|
||||
TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
}
|
||||
|
||||
type friendClient struct {
|
||||
@@ -89,7 +88,7 @@ func NewFriendClient(cc grpc.ClientConnInterface) FriendClient {
|
||||
return &friendClient{cc}
|
||||
}
|
||||
|
||||
func (c *friendClient) Search(ctx context.Context, in *protobuf.SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) {
|
||||
func (c *friendClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*PartFriendReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PartFriendReply)
|
||||
err := c.cc.Invoke(ctx, Friend_Search_FullMethodName, in, out, cOpts...)
|
||||
@@ -99,7 +98,7 @@ func (c *friendClient) Search(ctx context.Context, in *protobuf.SearchRequest, o
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) Fetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) {
|
||||
func (c *friendClient) Fetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*FriendsReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FriendsReply)
|
||||
err := c.cc.Invoke(ctx, Friend_Fetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -109,9 +108,9 @@ func (c *friendClient) Fetch(ctx context.Context, in *protobuf.VersionRequest, o
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) {
|
||||
func (c *friendClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.RelationItem)
|
||||
out := new(RelationItem)
|
||||
err := c.cc.Invoke(ctx, Friend_Get_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -119,9 +118,9 @@ func (c *friendClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ModifyNickname_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -129,9 +128,9 @@ func (c *friendClient) ModifyNickname(ctx context.Context, in *ModifyNicknameReq
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) DoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) DoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_DoPopular_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -139,9 +138,9 @@ func (c *friendClient) DoPopular(ctx context.Context, in *protobuf.IdentRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) UndoPopular(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) UndoPopular(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_UndoPopular_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -149,9 +148,9 @@ func (c *friendClient) UndoPopular(ctx context.Context, in *protobuf.IdentReques
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) Delete(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -159,7 +158,7 @@ func (c *friendClient) Delete(ctx context.Context, in *protobuf.IdentRequest, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyFetch(ctx context.Context, in *protobuf.VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) {
|
||||
func (c *friendClient) ApplyFetch(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*ApplyFetchReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ApplyFetchReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyFetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -169,7 +168,7 @@ func (c *friendClient) ApplyFetch(ctx context.Context, in *protobuf.VersionReque
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyGet(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) {
|
||||
func (c *friendClient) ApplyGet(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*FriendApplyGetReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FriendApplyGetReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyGet_FullMethodName, in, out, cOpts...)
|
||||
@@ -179,9 +178,9 @@ func (c *friendClient) ApplyGet(ctx context.Context, in *protobuf.IdentRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyDo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -189,9 +188,9 @@ func (c *friendClient) ApplyDo(ctx context.Context, in *ApplyDoRequest, opts ...
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyDoMessage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -199,9 +198,9 @@ func (c *friendClient) ApplyDoMessage(ctx context.Context, in *ApplyMessageReque
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyDoPass_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -209,9 +208,9 @@ func (c *friendClient) ApplyDoPass(ctx context.Context, in *ApplyDoPassRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) ApplyDoReject(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) ApplyDoReject(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_ApplyDoReject_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -219,7 +218,7 @@ func (c *friendClient) ApplyDoReject(ctx context.Context, in *protobuf.IdentRequ
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) TagFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) {
|
||||
func (c *friendClient) TagFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FriendTagsReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FriendTagsReply)
|
||||
err := c.cc.Invoke(ctx, Friend_TagFetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -229,7 +228,7 @@ func (c *friendClient) TagFetch(ctx context.Context, in *protobuf.Empty, opts ..
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) TagMemberFetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) {
|
||||
func (c *friendClient) TagMemberFetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PartFriendReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PartFriendReply)
|
||||
err := c.cc.Invoke(ctx, Friend_TagMemberFetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -239,9 +238,9 @@ func (c *friendClient) TagMemberFetch(ctx context.Context, in *protobuf.IdentReq
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_TagDoCreate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -249,9 +248,9 @@ func (c *friendClient) TagDoCreate(ctx context.Context, in *TagDoCreateRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Friend_TagDoUpdate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -266,39 +265,39 @@ func (c *friendClient) TagDoUpdate(ctx context.Context, in *TagDoUpdateRequest,
|
||||
// relation-关系管理:好友
|
||||
type FriendServer interface {
|
||||
// 搜索
|
||||
Search(context.Context, *protobuf.SearchRequest) (*PartFriendReply, error)
|
||||
Search(context.Context, *SearchRequest) (*PartFriendReply, error)
|
||||
// 获取好友列表
|
||||
Fetch(context.Context, *protobuf.VersionRequest) (*FriendsReply, error)
|
||||
Fetch(context.Context, *VersionRequest) (*FriendsReply, error)
|
||||
// 获取用户信息卡片
|
||||
Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error)
|
||||
Get(context.Context, *IdentRequest) (*RelationItem, error)
|
||||
// 修改好友备注名称,如果要清除备注,直接nickname传空值
|
||||
ModifyNickname(context.Context, *ModifyNicknameRequest) (*protobuf.DataStatusReply, error)
|
||||
ModifyNickname(context.Context, *ModifyNicknameRequest) (*DataStatusReply, error)
|
||||
// 受你欢迎的,置顶
|
||||
DoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
DoPopular(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 取消受欢迎的,取消置顶
|
||||
UndoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
UndoPopular(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 删除好友
|
||||
Delete(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
Delete(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 好友申请列表
|
||||
ApplyFetch(context.Context, *protobuf.VersionRequest) (*ApplyFetchReply, error)
|
||||
ApplyFetch(context.Context, *VersionRequest) (*ApplyFetchReply, error)
|
||||
// 好友申请详情
|
||||
ApplyGet(context.Context, *protobuf.IdentRequest) (*FriendApplyGetReply, error)
|
||||
ApplyGet(context.Context, *IdentRequest) (*FriendApplyGetReply, error)
|
||||
// 好友申请
|
||||
ApplyDo(context.Context, *ApplyDoRequest) (*protobuf.DataStatusReply, error)
|
||||
ApplyDo(context.Context, *ApplyDoRequest) (*DataStatusReply, error)
|
||||
// 好友申请Do:留言
|
||||
ApplyDoMessage(context.Context, *ApplyMessageRequest) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoMessage(context.Context, *ApplyMessageRequest) (*DataStatusReply, error)
|
||||
// 好友申请Do:确认
|
||||
ApplyDoPass(context.Context, *ApplyDoPassRequest) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoPass(context.Context, *ApplyDoPassRequest) (*DataStatusReply, error)
|
||||
// 好友申请Do:拒绝
|
||||
ApplyDoReject(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
ApplyDoReject(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 获取标签列表
|
||||
TagFetch(context.Context, *protobuf.Empty) (*FriendTagsReply, error)
|
||||
TagFetch(context.Context, *Empty) (*FriendTagsReply, error)
|
||||
// 获取标签成员
|
||||
TagMemberFetch(context.Context, *protobuf.IdentRequest) (*PartFriendReply, error)
|
||||
TagMemberFetch(context.Context, *IdentRequest) (*PartFriendReply, error)
|
||||
// 创建标签
|
||||
TagDoCreate(context.Context, *TagDoCreateRequest) (*protobuf.DataStatusReply, error)
|
||||
TagDoCreate(context.Context, *TagDoCreateRequest) (*DataStatusReply, error)
|
||||
// 更新标签成员
|
||||
TagDoUpdate(context.Context, *TagDoUpdateRequest) (*protobuf.DataStatusReply, error)
|
||||
TagDoUpdate(context.Context, *TagDoUpdateRequest) (*DataStatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedFriendServer should be embedded to have
|
||||
@@ -308,55 +307,55 @@ type FriendServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedFriendServer struct{}
|
||||
|
||||
func (UnimplementedFriendServer) Search(context.Context, *protobuf.SearchRequest) (*PartFriendReply, error) {
|
||||
func (UnimplementedFriendServer) Search(context.Context, *SearchRequest) (*PartFriendReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) Fetch(context.Context, *protobuf.VersionRequest) (*FriendsReply, error) {
|
||||
func (UnimplementedFriendServer) Fetch(context.Context, *VersionRequest) (*FriendsReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) {
|
||||
func (UnimplementedFriendServer) Get(context.Context, *IdentRequest) (*RelationItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ModifyNickname(context.Context, *ModifyNicknameRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) ModifyNickname(context.Context, *ModifyNicknameRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ModifyNickname not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) DoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) DoPopular(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoPopular not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) UndoPopular(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) UndoPopular(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UndoPopular not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) Delete(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) Delete(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyFetch(context.Context, *protobuf.VersionRequest) (*ApplyFetchReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyFetch(context.Context, *VersionRequest) (*ApplyFetchReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyFetch not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyGet(context.Context, *protobuf.IdentRequest) (*FriendApplyGetReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyGet(context.Context, *IdentRequest) (*FriendApplyGetReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyGet not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyDo(context.Context, *ApplyDoRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyDo(context.Context, *ApplyDoRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyDo not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyDoMessage(context.Context, *ApplyMessageRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyDoMessage(context.Context, *ApplyMessageRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyDoMessage not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyDoPass(context.Context, *ApplyDoPassRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyDoPass(context.Context, *ApplyDoPassRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyDoPass not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) ApplyDoReject(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) ApplyDoReject(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyDoReject not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) TagFetch(context.Context, *protobuf.Empty) (*FriendTagsReply, error) {
|
||||
func (UnimplementedFriendServer) TagFetch(context.Context, *Empty) (*FriendTagsReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagFetch not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) TagMemberFetch(context.Context, *protobuf.IdentRequest) (*PartFriendReply, error) {
|
||||
func (UnimplementedFriendServer) TagMemberFetch(context.Context, *IdentRequest) (*PartFriendReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagMemberFetch not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) TagDoCreate(context.Context, *TagDoCreateRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) TagDoCreate(context.Context, *TagDoCreateRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagDoCreate not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) TagDoUpdate(context.Context, *TagDoUpdateRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedFriendServer) TagDoUpdate(context.Context, *TagDoUpdateRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagDoUpdate not implemented")
|
||||
}
|
||||
func (UnimplementedFriendServer) testEmbeddedByValue() {}
|
||||
@@ -380,7 +379,7 @@ func RegisterFriendServer(s grpc.ServiceRegistrar, srv FriendServer) {
|
||||
}
|
||||
|
||||
func _Friend_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.SearchRequest)
|
||||
in := new(SearchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -392,13 +391,13 @@ func _Friend_Search_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
FullMethod: Friend_Search_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).Search(ctx, req.(*protobuf.SearchRequest))
|
||||
return srv.(FriendServer).Search(ctx, req.(*SearchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.VersionRequest)
|
||||
in := new(VersionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -410,13 +409,13 @@ func _Friend_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Friend_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).Fetch(ctx, req.(*protobuf.VersionRequest))
|
||||
return srv.(FriendServer).Fetch(ctx, req.(*VersionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -428,7 +427,7 @@ func _Friend_Get_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
FullMethod: Friend_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).Get(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).Get(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -452,7 +451,7 @@ func _Friend_ModifyNickname_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
|
||||
func _Friend_DoPopular_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -464,13 +463,13 @@ func _Friend_DoPopular_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Friend_DoPopular_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).DoPopular(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).DoPopular(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_UndoPopular_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -482,13 +481,13 @@ func _Friend_UndoPopular_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
FullMethod: Friend_UndoPopular_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).UndoPopular(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).UndoPopular(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -500,13 +499,13 @@ func _Friend_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
FullMethod: Friend_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).Delete(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).Delete(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_ApplyFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.VersionRequest)
|
||||
in := new(VersionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -518,13 +517,13 @@ func _Friend_ApplyFetch_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
FullMethod: Friend_ApplyFetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).ApplyFetch(ctx, req.(*protobuf.VersionRequest))
|
||||
return srv.(FriendServer).ApplyFetch(ctx, req.(*VersionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_ApplyGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -536,7 +535,7 @@ func _Friend_ApplyGet_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Friend_ApplyGet_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).ApplyGet(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).ApplyGet(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -596,7 +595,7 @@ func _Friend_ApplyDoPass_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
|
||||
func _Friend_ApplyDoReject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -608,13 +607,13 @@ func _Friend_ApplyDoReject_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
FullMethod: Friend_ApplyDoReject_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).ApplyDoReject(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).ApplyDoReject(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_TagFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.Empty)
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -626,13 +625,13 @@ func _Friend_TagFetch_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
FullMethod: Friend_TagFetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).TagFetch(ctx, req.(*protobuf.Empty))
|
||||
return srv.(FriendServer).TagFetch(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Friend_TagMemberFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -644,7 +643,7 @@ func _Friend_TagMemberFetch_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
FullMethod: Friend_TagMemberFetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FriendServer).TagMemberFetch(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(FriendServer).TagMemberFetch(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -25,7 +24,7 @@ var File_module_social_relation_proto_match_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_social_relation_proto_match_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"(module/social/relation/proto/match.proto\x12\brelation\x1a\x15protobuf/blocks.proto2\xf5\x01\n" +
|
||||
"(module/social/relation/proto/match.proto\x12\brelation\x1a(module/social/relation/proto/const.proto2\xf5\x01\n" +
|
||||
"\x05Match\x12?\n" +
|
||||
"\x05Fetch\x12\x14.blocks.FetchRequest\x1a\x1e.blocks.FetchRelationItemReply\"\x00\x123\n" +
|
||||
"\x03Get\x12\x14.blocks.IdentRequest\x1a\x14.blocks.RelationItem\"\x00\x129\n" +
|
||||
@@ -33,11 +32,11 @@ const file_module_social_relation_proto_match_proto_rawDesc = "" +
|
||||
"\bDoIgnore\x12\x14.blocks.IdentRequest\x1a\x17.blocks.DataStatusReply\"\x00B-Z+bsm/full/module/social/relation/pb;relationb\x06proto3"
|
||||
|
||||
var file_module_social_relation_proto_match_proto_goTypes = []any{
|
||||
(*protobuf.FetchRequest)(nil), // 0: blocks.FetchRequest
|
||||
(*protobuf.IdentRequest)(nil), // 1: blocks.IdentRequest
|
||||
(*protobuf.FetchRelationItemReply)(nil), // 2: blocks.FetchRelationItemReply
|
||||
(*protobuf.RelationItem)(nil), // 3: blocks.RelationItem
|
||||
(*protobuf.DataStatusReply)(nil), // 4: blocks.DataStatusReply
|
||||
(*FetchRequest)(nil), // 0: blocks.FetchRequest
|
||||
(*IdentRequest)(nil), // 1: blocks.IdentRequest
|
||||
(*FetchRelationItemReply)(nil), // 2: blocks.FetchRelationItemReply
|
||||
(*RelationItem)(nil), // 3: blocks.RelationItem
|
||||
(*DataStatusReply)(nil), // 4: blocks.DataStatusReply
|
||||
}
|
||||
var file_module_social_relation_proto_match_proto_depIdxs = []int32{
|
||||
0, // 0: relation.Match.Fetch:input_type -> blocks.FetchRequest
|
||||
@@ -60,6 +59,7 @@ func file_module_social_relation_proto_match_proto_init() {
|
||||
if File_module_social_relation_proto_match_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_social_relation_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package relation
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.FetchRequest
|
||||
protoReq FetchRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -65,7 +64,7 @@ func local_request_Match_Fetch_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -80,7 +79,7 @@ func request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, clien
|
||||
|
||||
func local_request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Match_Get_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -107,7 +106,7 @@ func request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, cl
|
||||
|
||||
func local_request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -119,7 +118,7 @@ func local_request_Match_DoJoin_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
func request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler, client MatchClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -134,7 +133,7 @@ func request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
|
||||
func local_request_Match_DoIgnore_0(ctx context.Context, marshaler runtime.Marshaler, server MatchServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package relation
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -33,13 +32,13 @@ const (
|
||||
// relation-关系管理:匹配
|
||||
type MatchClient interface {
|
||||
// 获取匹配列表
|
||||
Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error)
|
||||
Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error)
|
||||
// 获取匹配详情
|
||||
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error)
|
||||
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error)
|
||||
// 执行通过,加为好友
|
||||
DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
// 执行忽略
|
||||
DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error)
|
||||
}
|
||||
|
||||
type matchClient struct {
|
||||
@@ -50,9 +49,9 @@ func NewMatchClient(cc grpc.ClientConnInterface) MatchClient {
|
||||
return &matchClient{cc}
|
||||
}
|
||||
|
||||
func (c *matchClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*protobuf.FetchRelationItemReply, error) {
|
||||
func (c *matchClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchRelationItemReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.FetchRelationItemReply)
|
||||
out := new(FetchRelationItemReply)
|
||||
err := c.cc.Invoke(ctx, Match_Fetch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -60,9 +59,9 @@ func (c *matchClient) Fetch(ctx context.Context, in *protobuf.FetchRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *matchClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.RelationItem, error) {
|
||||
func (c *matchClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*RelationItem, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.RelationItem)
|
||||
out := new(RelationItem)
|
||||
err := c.cc.Invoke(ctx, Match_Get_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -70,9 +69,9 @@ func (c *matchClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *matchClient) DoJoin(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *matchClient) DoJoin(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Match_DoJoin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -80,9 +79,9 @@ func (c *matchClient) DoJoin(ctx context.Context, in *protobuf.IdentRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *matchClient) DoIgnore(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
func (c *matchClient) DoIgnore(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
out := new(DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Match_DoIgnore_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -97,13 +96,13 @@ func (c *matchClient) DoIgnore(ctx context.Context, in *protobuf.IdentRequest, o
|
||||
// relation-关系管理:匹配
|
||||
type MatchServer interface {
|
||||
// 获取匹配列表
|
||||
Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error)
|
||||
Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error)
|
||||
// 获取匹配详情
|
||||
Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error)
|
||||
Get(context.Context, *IdentRequest) (*RelationItem, error)
|
||||
// 执行通过,加为好友
|
||||
DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
DoJoin(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
// 执行忽略
|
||||
DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error)
|
||||
DoIgnore(context.Context, *IdentRequest) (*DataStatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedMatchServer should be embedded to have
|
||||
@@ -113,16 +112,16 @@ type MatchServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMatchServer struct{}
|
||||
|
||||
func (UnimplementedMatchServer) Fetch(context.Context, *protobuf.FetchRequest) (*protobuf.FetchRelationItemReply, error) {
|
||||
func (UnimplementedMatchServer) Fetch(context.Context, *FetchRequest) (*FetchRelationItemReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedMatchServer) Get(context.Context, *protobuf.IdentRequest) (*protobuf.RelationItem, error) {
|
||||
func (UnimplementedMatchServer) Get(context.Context, *IdentRequest) (*RelationItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedMatchServer) DoJoin(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedMatchServer) DoJoin(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented")
|
||||
}
|
||||
func (UnimplementedMatchServer) DoIgnore(context.Context, *protobuf.IdentRequest) (*protobuf.DataStatusReply, error) {
|
||||
func (UnimplementedMatchServer) DoIgnore(context.Context, *IdentRequest) (*DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoIgnore not implemented")
|
||||
}
|
||||
func (UnimplementedMatchServer) testEmbeddedByValue() {}
|
||||
@@ -146,7 +145,7 @@ func RegisterMatchServer(s grpc.ServiceRegistrar, srv MatchServer) {
|
||||
}
|
||||
|
||||
func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.FetchRequest)
|
||||
in := new(FetchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -158,13 +157,13 @@ func _Match_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Match_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MatchServer).Fetch(ctx, req.(*protobuf.FetchRequest))
|
||||
return srv.(MatchServer).Fetch(ctx, req.(*FetchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -176,13 +175,13 @@ func _Match_Get_Handler(srv interface{}, ctx context.Context, dec func(interface
|
||||
FullMethod: Match_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MatchServer).Get(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(MatchServer).Get(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -194,13 +193,13 @@ func _Match_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Match_DoJoin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MatchServer).DoJoin(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(MatchServer).DoJoin(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -212,7 +211,7 @@ func _Match_DoIgnore_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
FullMethod: Match_DoIgnore_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MatchServer).DoIgnore(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(MatchServer).DoIgnore(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user