// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package chat import ( context "context" common "git.ikuban.com/server/pw-protobuf/api/common" 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ChatClient is the client API for Chat 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. type ChatClient interface { // 检查用户是否与接待员聊天 CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error) // 创建用户与接待员的聊天 CreateUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error) // 查询在线人的列表 FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error) Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error) } type chatClient struct { cc grpc.ClientConnInterface } func NewChatClient(cc grpc.ClientConnInterface) ChatClient { return &chatClient{cc} } func (c *chatClient) CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error) { out := new(CheckUserPartnerIsRelationshipReply) err := c.cc.Invoke(ctx, "/api.chat.Chat/CheckUserPartnerIsRelationship", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *chatClient) CreateUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error) { out := new(CreateUserPartnerIsRelationshipReply) err := c.cc.Invoke(ctx, "/api.chat.Chat/CreateUserPartnerIsRelationship", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *chatClient) FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error) { out := new(common.OnlinePersonListReply) err := c.cc.Invoke(ctx, "/api.chat.Chat/FindOnlinePersonList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *chatClient) Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error) { out := new(ReceiveReply) err := c.cc.Invoke(ctx, "/api.chat.Chat/Receive", in, out, opts...) if err != nil { return nil, err } return out, nil } // ChatServer is the server API for Chat service. // All implementations must embed UnimplementedChatServer // for forward compatibility type ChatServer interface { // 检查用户是否与接待员聊天 CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error) // 创建用户与接待员的聊天 CreateUserPartnerIsRelationship(context.Context, *common.UserAndPartnerParam) (*CreateUserPartnerIsRelationshipReply, error) // 查询在线人的列表 FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error) Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error) mustEmbedUnimplementedChatServer() } // UnimplementedChatServer must be embedded to have forward compatible implementations. type UnimplementedChatServer struct { } func (UnimplementedChatServer) CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented") } func (UnimplementedChatServer) CreateUserPartnerIsRelationship(context.Context, *common.UserAndPartnerParam) (*CreateUserPartnerIsRelationshipReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerIsRelationship not implemented") } func (UnimplementedChatServer) FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonList not implemented") } func (UnimplementedChatServer) Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Receive not implemented") } func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {} // UnsafeChatServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChatServer will // result in compilation errors. type UnsafeChatServer interface { mustEmbedUnimplementedChatServer() } func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer) { s.RegisterService(&Chat_ServiceDesc, srv) } func _Chat_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.UserAndPartnerIdParam) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.chat.Chat/CheckUserPartnerIsRelationship", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, req.(*common.UserAndPartnerIdParam)) } return interceptor(ctx, in, info, handler) } func _Chat_CreateUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.UserAndPartnerParam) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.chat.Chat/CreateUserPartnerIsRelationship", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, req.(*common.UserAndPartnerParam)) } return interceptor(ctx, in, info, handler) } func _Chat_FindOnlinePersonList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.ListPageAndPersonRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ChatServer).FindOnlinePersonList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.chat.Chat/FindOnlinePersonList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChatServer).FindOnlinePersonList(ctx, req.(*common.ListPageAndPersonRequest)) } return interceptor(ctx, in, info, handler) } func _Chat_Receive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ReceiveRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ChatServer).Receive(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.chat.Chat/Receive", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ChatServer).Receive(ctx, req.(*ReceiveRequest)) } return interceptor(ctx, in, info, handler) } // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Chat_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.chat.Chat", HandlerType: (*ChatServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckUserPartnerIsRelationship", Handler: _Chat_CheckUserPartnerIsRelationship_Handler, }, { MethodName: "CreateUserPartnerIsRelationship", Handler: _Chat_CreateUserPartnerIsRelationship_Handler, }, { MethodName: "FindOnlinePersonList", Handler: _Chat_FindOnlinePersonList_Handler, }, { MethodName: "Receive", Handler: _Chat_Receive_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "chat.proto", }