refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: member.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/social/group/proto/member.proto
|
||||
|
||||
package group
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -34,20 +35,20 @@ const (
|
||||
//
|
||||
// relation-关系管理:群组
|
||||
type MemberClient interface {
|
||||
//获取群组成员列表
|
||||
Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error)
|
||||
//申请加群
|
||||
DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//申请加群列表
|
||||
JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error)
|
||||
//申请加群处理
|
||||
JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//设置或取消管理员
|
||||
DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//踢人
|
||||
DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//退群
|
||||
DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取群组成员列表
|
||||
Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error)
|
||||
// 申请加群
|
||||
DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 申请加群列表
|
||||
JoinFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*JoinFetchReply, error)
|
||||
// 申请加群处理
|
||||
JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 设置或取消管理员
|
||||
DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 踢人
|
||||
DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
// 退群
|
||||
DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error)
|
||||
}
|
||||
|
||||
type memberClient struct {
|
||||
@@ -58,7 +59,7 @@ func NewMemberClient(cc grpc.ClientConnInterface) MemberClient {
|
||||
return &memberClient{cc}
|
||||
}
|
||||
|
||||
func (c *memberClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) {
|
||||
func (c *memberClient) Fetch(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*GroupMemberReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GroupMemberReply)
|
||||
err := c.cc.Invoke(ctx, Member_Fetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -68,9 +69,9 @@ func (c *memberClient) Fetch(ctx context.Context, in *IdentRequest, opts ...grpc
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoJoin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -78,7 +79,7 @@ func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...gr
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) JoinFetch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) {
|
||||
func (c *memberClient) JoinFetch(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*JoinFetchReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(JoinFetchReply)
|
||||
err := c.cc.Invoke(ctx, Member_JoinFetch_FullMethodName, in, out, cOpts...)
|
||||
@@ -88,9 +89,9 @@ func (c *memberClient) JoinFetch(ctx context.Context, in *Empty, opts ...grpc.Ca
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_JoinDoHandle_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -98,9 +99,9 @@ func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoSetManager_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -108,9 +109,9 @@ func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoKick_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -118,9 +119,9 @@ func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*protobuf.DataStatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusReply)
|
||||
out := new(protobuf.DataStatusReply)
|
||||
err := c.cc.Invoke(ctx, Member_DoQuit_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -129,58 +130,56 @@ func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...g
|
||||
}
|
||||
|
||||
// MemberServer is the server API for Member service.
|
||||
// All implementations must embed UnimplementedMemberServer
|
||||
// All implementations should embed UnimplementedMemberServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// relation-关系管理:群组
|
||||
type MemberServer interface {
|
||||
//获取群组成员列表
|
||||
Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error)
|
||||
//申请加群
|
||||
DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error)
|
||||
//申请加群列表
|
||||
JoinFetch(context.Context, *Empty) (*JoinFetchReply, error)
|
||||
//申请加群处理
|
||||
JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//设置或取消管理员
|
||||
DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//踢人
|
||||
DoKick(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
//退群
|
||||
DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedMemberServer()
|
||||
// 获取群组成员列表
|
||||
Fetch(context.Context, *protobuf.IdentRequest) (*GroupMemberReply, error)
|
||||
// 申请加群
|
||||
DoJoin(context.Context, *DoJoinRequest) (*protobuf.DataStatusReply, error)
|
||||
// 申请加群列表
|
||||
JoinFetch(context.Context, *protobuf.Empty) (*JoinFetchReply, error)
|
||||
// 申请加群处理
|
||||
JoinDoHandle(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error)
|
||||
// 设置或取消管理员
|
||||
DoSetManager(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error)
|
||||
// 踢人
|
||||
DoKick(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error)
|
||||
// 退群
|
||||
DoQuit(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedMemberServer must be embedded to have
|
||||
// UnimplementedMemberServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMemberServer struct{}
|
||||
|
||||
func (UnimplementedMemberServer) Fetch(context.Context, *IdentRequest) (*GroupMemberReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
|
||||
func (UnimplementedMemberServer) Fetch(context.Context, *protobuf.IdentRequest) (*GroupMemberReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoJoin not implemented")
|
||||
func (UnimplementedMemberServer) DoJoin(context.Context, *DoJoinRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoJoin not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) JoinFetch(context.Context, *Empty) (*JoinFetchReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method JoinFetch not implemented")
|
||||
func (UnimplementedMemberServer) JoinFetch(context.Context, *protobuf.Empty) (*JoinFetchReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method JoinFetch not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method JoinDoHandle not implemented")
|
||||
func (UnimplementedMemberServer) JoinDoHandle(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method JoinDoHandle not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoSetManager(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoSetManager not implemented")
|
||||
func (UnimplementedMemberServer) DoSetManager(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoSetManager not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoKick(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoKick not implemented")
|
||||
func (UnimplementedMemberServer) DoKick(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoKick not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) DoQuit(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DoQuit not implemented")
|
||||
func (UnimplementedMemberServer) DoQuit(context.Context, *GroupOPRequest) (*protobuf.DataStatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DoQuit not implemented")
|
||||
}
|
||||
func (UnimplementedMemberServer) mustEmbedUnimplementedMemberServer() {}
|
||||
func (UnimplementedMemberServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedMemberServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMemberServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MemberServer will
|
||||
@@ -190,7 +189,7 @@ type UnsafeMemberServer interface {
|
||||
}
|
||||
|
||||
func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMemberServer was
|
||||
// If the following call panics, it indicates UnimplementedMemberServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -201,7 +200,7 @@ func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) {
|
||||
}
|
||||
|
||||
func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentRequest)
|
||||
in := new(protobuf.IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -213,7 +212,7 @@ func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
FullMethod: Member_Fetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).Fetch(ctx, req.(*IdentRequest))
|
||||
return srv.(MemberServer).Fetch(ctx, req.(*protobuf.IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -237,7 +236,7 @@ func _Member_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
}
|
||||
|
||||
func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
in := new(protobuf.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -249,7 +248,7 @@ func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
FullMethod: Member_JoinFetch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MemberServer).JoinFetch(ctx, req.(*Empty))
|
||||
return srv.(MemberServer).JoinFetch(ctx, req.(*protobuf.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -363,5 +362,5 @@ var Member_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "member.proto",
|
||||
Metadata: "module/social/group/proto/member.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user