chat_grpc.pb.go 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package chat
  3. import (
  4. context "context"
  5. common "git.ikuban.com/server/pw-protobuf/api/common"
  6. grpc "google.golang.org/grpc"
  7. codes "google.golang.org/grpc/codes"
  8. status "google.golang.org/grpc/status"
  9. )
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the grpc package it is being compiled against.
  12. // Requires gRPC-Go v1.32.0 or later.
  13. const _ = grpc.SupportPackageIsVersion7
  14. // ChatClient is the client API for Chat service.
  15. //
  16. // 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.
  17. type ChatClient interface {
  18. // 检查用户是否与接待员聊天
  19. CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error)
  20. // 创建用户与接待员的聊天
  21. CreateUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error)
  22. // 查询在线人的列表
  23. FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error)
  24. }
  25. type chatClient struct {
  26. cc grpc.ClientConnInterface
  27. }
  28. func NewChatClient(cc grpc.ClientConnInterface) ChatClient {
  29. return &chatClient{cc}
  30. }
  31. func (c *chatClient) CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error) {
  32. out := new(CheckUserPartnerIsRelationshipReply)
  33. err := c.cc.Invoke(ctx, "/api.chat.Chat/CheckUserPartnerIsRelationship", in, out, opts...)
  34. if err != nil {
  35. return nil, err
  36. }
  37. return out, nil
  38. }
  39. func (c *chatClient) CreateUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error) {
  40. out := new(CreateUserPartnerIsRelationshipReply)
  41. err := c.cc.Invoke(ctx, "/api.chat.Chat/CreateUserPartnerIsRelationship", in, out, opts...)
  42. if err != nil {
  43. return nil, err
  44. }
  45. return out, nil
  46. }
  47. func (c *chatClient) FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error) {
  48. out := new(common.OnlinePersonListReply)
  49. err := c.cc.Invoke(ctx, "/api.chat.Chat/FindOnlinePersonList", in, out, opts...)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return out, nil
  54. }
  55. // ChatServer is the server API for Chat service.
  56. // All implementations must embed UnimplementedChatServer
  57. // for forward compatibility
  58. type ChatServer interface {
  59. // 检查用户是否与接待员聊天
  60. CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error)
  61. // 创建用户与接待员的聊天
  62. CreateUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CreateUserPartnerIsRelationshipReply, error)
  63. // 查询在线人的列表
  64. FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error)
  65. mustEmbedUnimplementedChatServer()
  66. }
  67. // UnimplementedChatServer must be embedded to have forward compatible implementations.
  68. type UnimplementedChatServer struct {
  69. }
  70. func (UnimplementedChatServer) CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error) {
  71. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  72. }
  73. func (UnimplementedChatServer) CreateUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdParam) (*CreateUserPartnerIsRelationshipReply, error) {
  74. return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerIsRelationship not implemented")
  75. }
  76. func (UnimplementedChatServer) FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error) {
  77. return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonList not implemented")
  78. }
  79. func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
  80. // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
  81. // Use of this interface is not recommended, as added methods to ChatServer will
  82. // result in compilation errors.
  83. type UnsafeChatServer interface {
  84. mustEmbedUnimplementedChatServer()
  85. }
  86. func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer) {
  87. s.RegisterService(&Chat_ServiceDesc, srv)
  88. }
  89. func _Chat_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  90. in := new(common.UserAndPartnerIdParam)
  91. if err := dec(in); err != nil {
  92. return nil, err
  93. }
  94. if interceptor == nil {
  95. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, in)
  96. }
  97. info := &grpc.UnaryServerInfo{
  98. Server: srv,
  99. FullMethod: "/api.chat.Chat/CheckUserPartnerIsRelationship",
  100. }
  101. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  102. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, req.(*common.UserAndPartnerIdParam))
  103. }
  104. return interceptor(ctx, in, info, handler)
  105. }
  106. func _Chat_CreateUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  107. in := new(common.UserAndPartnerIdParam)
  108. if err := dec(in); err != nil {
  109. return nil, err
  110. }
  111. if interceptor == nil {
  112. return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, in)
  113. }
  114. info := &grpc.UnaryServerInfo{
  115. Server: srv,
  116. FullMethod: "/api.chat.Chat/CreateUserPartnerIsRelationship",
  117. }
  118. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  119. return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, req.(*common.UserAndPartnerIdParam))
  120. }
  121. return interceptor(ctx, in, info, handler)
  122. }
  123. func _Chat_FindOnlinePersonList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  124. in := new(common.ListPageAndPersonRequest)
  125. if err := dec(in); err != nil {
  126. return nil, err
  127. }
  128. if interceptor == nil {
  129. return srv.(ChatServer).FindOnlinePersonList(ctx, in)
  130. }
  131. info := &grpc.UnaryServerInfo{
  132. Server: srv,
  133. FullMethod: "/api.chat.Chat/FindOnlinePersonList",
  134. }
  135. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  136. return srv.(ChatServer).FindOnlinePersonList(ctx, req.(*common.ListPageAndPersonRequest))
  137. }
  138. return interceptor(ctx, in, info, handler)
  139. }
  140. // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
  141. // It's only intended for direct use with grpc.RegisterService,
  142. // and not to be introspected or modified (even as a copy)
  143. var Chat_ServiceDesc = grpc.ServiceDesc{
  144. ServiceName: "api.chat.Chat",
  145. HandlerType: (*ChatServer)(nil),
  146. Methods: []grpc.MethodDesc{
  147. {
  148. MethodName: "CheckUserPartnerIsRelationship",
  149. Handler: _Chat_CheckUserPartnerIsRelationship_Handler,
  150. },
  151. {
  152. MethodName: "CreateUserPartnerIsRelationship",
  153. Handler: _Chat_CreateUserPartnerIsRelationship_Handler,
  154. },
  155. {
  156. MethodName: "FindOnlinePersonList",
  157. Handler: _Chat_FindOnlinePersonList_Handler,
  158. },
  159. },
  160. Streams: []grpc.StreamDesc{},
  161. Metadata: "chat.proto",
  162. }