368 lines
13 KiB
Go
368 lines
13 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc (unknown)
|
|
// source: member.proto
|
|
|
|
package group
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Member_Fetch_FullMethodName = "/group.Member/Fetch"
|
|
Member_DoJoin_FullMethodName = "/group.Member/DoJoin"
|
|
Member_JoinFetch_FullMethodName = "/group.Member/JoinFetch"
|
|
Member_JoinDoHandle_FullMethodName = "/group.Member/JoinDoHandle"
|
|
Member_DoSetManager_FullMethodName = "/group.Member/DoSetManager"
|
|
Member_DoKick_FullMethodName = "/group.Member/DoKick"
|
|
Member_DoQuit_FullMethodName = "/group.Member/DoQuit"
|
|
)
|
|
|
|
// MemberClient is the client API for Member service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// 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)
|
|
}
|
|
|
|
type memberClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMemberClient(cc grpc.ClientConnInterface) MemberClient {
|
|
return &memberClient{cc}
|
|
}
|
|
|
|
func (c *memberClient) Fetch(ctx context.Context, in *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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) DoJoin(ctx context.Context, in *DoJoinRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Member_DoJoin_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) JoinFetch(ctx context.Context, in *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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) JoinDoHandle(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Member_JoinDoHandle_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) DoSetManager(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Member_DoSetManager_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) DoKick(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Member_DoKick_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *memberClient) DoQuit(ctx context.Context, in *GroupOPRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Member_DoQuit_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MemberServer is the server API for Member service.
|
|
// All implementations must 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()
|
|
}
|
|
|
|
// UnimplementedMemberServer must 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) DoJoin(context.Context, *DoJoinRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(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) JoinDoHandle(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(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) DoKick(context.Context, *GroupOPRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(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) mustEmbedUnimplementedMemberServer() {}
|
|
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
|
|
// result in compilation errors.
|
|
type UnsafeMemberServer interface {
|
|
mustEmbedUnimplementedMemberServer()
|
|
}
|
|
|
|
func RegisterMemberServer(s grpc.ServiceRegistrar, srv MemberServer) {
|
|
// If the following call pancis, 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.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Member_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Member_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).Fetch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_Fetch_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).Fetch(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_DoJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DoJoinRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).DoJoin(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_DoJoin_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).DoJoin(ctx, req.(*DoJoinRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_JoinFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).JoinFetch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_JoinFetch_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).JoinFetch(ctx, req.(*Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_JoinDoHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupOPRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).JoinDoHandle(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_JoinDoHandle_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).JoinDoHandle(ctx, req.(*GroupOPRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_DoSetManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupOPRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).DoSetManager(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_DoSetManager_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).DoSetManager(ctx, req.(*GroupOPRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_DoKick_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupOPRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).DoKick(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_DoKick_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).DoKick(ctx, req.(*GroupOPRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Member_DoQuit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GroupOPRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MemberServer).DoQuit(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Member_DoQuit_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MemberServer).DoQuit(ctx, req.(*GroupOPRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Member_ServiceDesc is the grpc.ServiceDesc for Member service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Member_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "group.Member",
|
|
HandlerType: (*MemberServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Fetch",
|
|
Handler: _Member_Fetch_Handler,
|
|
},
|
|
{
|
|
MethodName: "DoJoin",
|
|
Handler: _Member_DoJoin_Handler,
|
|
},
|
|
{
|
|
MethodName: "JoinFetch",
|
|
Handler: _Member_JoinFetch_Handler,
|
|
},
|
|
{
|
|
MethodName: "JoinDoHandle",
|
|
Handler: _Member_JoinDoHandle_Handler,
|
|
},
|
|
{
|
|
MethodName: "DoSetManager",
|
|
Handler: _Member_DoSetManager_Handler,
|
|
},
|
|
{
|
|
MethodName: "DoKick",
|
|
Handler: _Member_DoKick_Handler,
|
|
},
|
|
{
|
|
MethodName: "DoQuit",
|
|
Handler: _Member_DoQuit_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "member.proto",
|
|
}
|