chat_grpc.pb.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package chat
  3. import (
  4. context "context"
  5. base "git.ikuban.com/server/pw-protobuf/api/base"
  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. CheckUserPartnerIsRelationship(ctx context.Context, in *base.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error)
  19. CreateUserPartnerIsRelationship(ctx context.Context, in *base.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error)
  20. }
  21. type chatClient struct {
  22. cc grpc.ClientConnInterface
  23. }
  24. func NewChatClient(cc grpc.ClientConnInterface) ChatClient {
  25. return &chatClient{cc}
  26. }
  27. func (c *chatClient) CheckUserPartnerIsRelationship(ctx context.Context, in *base.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error) {
  28. out := new(CheckUserPartnerIsRelationshipReply)
  29. err := c.cc.Invoke(ctx, "/api.chat.Chat/CheckUserPartnerIsRelationship", in, out, opts...)
  30. if err != nil {
  31. return nil, err
  32. }
  33. return out, nil
  34. }
  35. func (c *chatClient) CreateUserPartnerIsRelationship(ctx context.Context, in *base.UserAndPartnerIdParam, opts ...grpc.CallOption) (*CreateUserPartnerIsRelationshipReply, error) {
  36. out := new(CreateUserPartnerIsRelationshipReply)
  37. err := c.cc.Invoke(ctx, "/api.chat.Chat/CreateUserPartnerIsRelationship", in, out, opts...)
  38. if err != nil {
  39. return nil, err
  40. }
  41. return out, nil
  42. }
  43. // ChatServer is the server API for Chat service.
  44. // All implementations must embed UnimplementedChatServer
  45. // for forward compatibility
  46. type ChatServer interface {
  47. CheckUserPartnerIsRelationship(context.Context, *base.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error)
  48. CreateUserPartnerIsRelationship(context.Context, *base.UserAndPartnerIdParam) (*CreateUserPartnerIsRelationshipReply, error)
  49. mustEmbedUnimplementedChatServer()
  50. }
  51. // UnimplementedChatServer must be embedded to have forward compatible implementations.
  52. type UnimplementedChatServer struct {
  53. }
  54. func (UnimplementedChatServer) CheckUserPartnerIsRelationship(context.Context, *base.UserAndPartnerIdParam) (*CheckUserPartnerIsRelationshipReply, error) {
  55. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  56. }
  57. func (UnimplementedChatServer) CreateUserPartnerIsRelationship(context.Context, *base.UserAndPartnerIdParam) (*CreateUserPartnerIsRelationshipReply, error) {
  58. return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerIsRelationship not implemented")
  59. }
  60. func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
  61. // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
  62. // Use of this interface is not recommended, as added methods to ChatServer will
  63. // result in compilation errors.
  64. type UnsafeChatServer interface {
  65. mustEmbedUnimplementedChatServer()
  66. }
  67. func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer) {
  68. s.RegisterService(&Chat_ServiceDesc, srv)
  69. }
  70. func _Chat_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  71. in := new(base.UserAndPartnerIdParam)
  72. if err := dec(in); err != nil {
  73. return nil, err
  74. }
  75. if interceptor == nil {
  76. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, in)
  77. }
  78. info := &grpc.UnaryServerInfo{
  79. Server: srv,
  80. FullMethod: "/api.chat.Chat/CheckUserPartnerIsRelationship",
  81. }
  82. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  83. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, req.(*base.UserAndPartnerIdParam))
  84. }
  85. return interceptor(ctx, in, info, handler)
  86. }
  87. func _Chat_CreateUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  88. in := new(base.UserAndPartnerIdParam)
  89. if err := dec(in); err != nil {
  90. return nil, err
  91. }
  92. if interceptor == nil {
  93. return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, in)
  94. }
  95. info := &grpc.UnaryServerInfo{
  96. Server: srv,
  97. FullMethod: "/api.chat.Chat/CreateUserPartnerIsRelationship",
  98. }
  99. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  100. return srv.(ChatServer).CreateUserPartnerIsRelationship(ctx, req.(*base.UserAndPartnerIdParam))
  101. }
  102. return interceptor(ctx, in, info, handler)
  103. }
  104. // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
  105. // It's only intended for direct use with grpc.RegisterService,
  106. // and not to be introspected or modified (even as a copy)
  107. var Chat_ServiceDesc = grpc.ServiceDesc{
  108. ServiceName: "api.chat.Chat",
  109. HandlerType: (*ChatServer)(nil),
  110. Methods: []grpc.MethodDesc{
  111. {
  112. MethodName: "CheckUserPartnerIsRelationship",
  113. Handler: _Chat_CheckUserPartnerIsRelationship_Handler,
  114. },
  115. {
  116. MethodName: "CreateUserPartnerIsRelationship",
  117. Handler: _Chat_CreateUserPartnerIsRelationship_Handler,
  118. },
  119. },
  120. Streams: []grpc.StreamDesc{},
  121. Metadata: "chat.proto",
  122. }