user_grpc.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package user
  3. import (
  4. context "context"
  5. base "git.ikuban.com/server/pw-protobuf/api/base"
  6. chat "git.ikuban.com/server/pw-protobuf/api/chat"
  7. partner "git.ikuban.com/server/pw-protobuf/api/partner"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. emptypb "google.golang.org/protobuf/types/known/emptypb"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // UserClient is the client API for User service.
  18. //
  19. // 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.
  20. type UserClient interface {
  21. UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  22. GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
  23. CheckUserPartnerIsRelationship(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error)
  24. CreateUserPartnerIsRelationship(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*chat.CreateUserPartnerIsRelationshipReply, error)
  25. GetPartnerCircleInfo(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*partner.PartnerCircleInfo, error)
  26. GetUserHomeInfo(ctx context.Context, in *base.UserIDParam, opts ...grpc.CallOption) (*UserHomeInfo, error)
  27. }
  28. type userClient struct {
  29. cc grpc.ClientConnInterface
  30. }
  31. func NewUserClient(cc grpc.ClientConnInterface) UserClient {
  32. return &userClient{cc}
  33. }
  34. func (c *userClient) UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  35. out := new(emptypb.Empty)
  36. err := c.cc.Invoke(ctx, "/api.user.User/UpdateUserInformation", in, out, opts...)
  37. if err != nil {
  38. return nil, err
  39. }
  40. return out, nil
  41. }
  42. func (c *userClient) GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error) {
  43. out := new(UserInfo)
  44. err := c.cc.Invoke(ctx, "/api.user.User/GetUserInfo", in, out, opts...)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return out, nil
  49. }
  50. func (c *userClient) CheckUserPartnerIsRelationship(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  51. out := new(chat.CheckUserPartnerIsRelationshipReply)
  52. err := c.cc.Invoke(ctx, "/api.user.User/CheckUserPartnerIsRelationship", in, out, opts...)
  53. if err != nil {
  54. return nil, err
  55. }
  56. return out, nil
  57. }
  58. func (c *userClient) CreateUserPartnerIsRelationship(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*chat.CreateUserPartnerIsRelationshipReply, error) {
  59. out := new(chat.CreateUserPartnerIsRelationshipReply)
  60. err := c.cc.Invoke(ctx, "/api.user.User/CreateUserPartnerIsRelationship", in, out, opts...)
  61. if err != nil {
  62. return nil, err
  63. }
  64. return out, nil
  65. }
  66. func (c *userClient) GetPartnerCircleInfo(ctx context.Context, in *base.PartnerIDParam, opts ...grpc.CallOption) (*partner.PartnerCircleInfo, error) {
  67. out := new(partner.PartnerCircleInfo)
  68. err := c.cc.Invoke(ctx, "/api.user.User/GetPartnerCircleInfo", in, out, opts...)
  69. if err != nil {
  70. return nil, err
  71. }
  72. return out, nil
  73. }
  74. func (c *userClient) GetUserHomeInfo(ctx context.Context, in *base.UserIDParam, opts ...grpc.CallOption) (*UserHomeInfo, error) {
  75. out := new(UserHomeInfo)
  76. err := c.cc.Invoke(ctx, "/api.user.User/GetUserHomeInfo", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. // UserServer is the server API for User service.
  83. // All implementations must embed UnimplementedUserServer
  84. // for forward compatibility
  85. type UserServer interface {
  86. UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error)
  87. GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
  88. CheckUserPartnerIsRelationship(context.Context, *base.PartnerIDParam) (*chat.CheckUserPartnerIsRelationshipReply, error)
  89. CreateUserPartnerIsRelationship(context.Context, *base.PartnerIDParam) (*chat.CreateUserPartnerIsRelationshipReply, error)
  90. GetPartnerCircleInfo(context.Context, *base.PartnerIDParam) (*partner.PartnerCircleInfo, error)
  91. GetUserHomeInfo(context.Context, *base.UserIDParam) (*UserHomeInfo, error)
  92. mustEmbedUnimplementedUserServer()
  93. }
  94. // UnimplementedUserServer must be embedded to have forward compatible implementations.
  95. type UnimplementedUserServer struct {
  96. }
  97. func (UnimplementedUserServer) UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error) {
  98. return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInformation not implemented")
  99. }
  100. func (UnimplementedUserServer) GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error) {
  101. return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
  102. }
  103. func (UnimplementedUserServer) CheckUserPartnerIsRelationship(context.Context, *base.PartnerIDParam) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  104. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  105. }
  106. func (UnimplementedUserServer) CreateUserPartnerIsRelationship(context.Context, *base.PartnerIDParam) (*chat.CreateUserPartnerIsRelationshipReply, error) {
  107. return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerIsRelationship not implemented")
  108. }
  109. func (UnimplementedUserServer) GetPartnerCircleInfo(context.Context, *base.PartnerIDParam) (*partner.PartnerCircleInfo, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method GetPartnerCircleInfo not implemented")
  111. }
  112. func (UnimplementedUserServer) GetUserHomeInfo(context.Context, *base.UserIDParam) (*UserHomeInfo, error) {
  113. return nil, status.Errorf(codes.Unimplemented, "method GetUserHomeInfo not implemented")
  114. }
  115. func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
  116. // UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
  117. // Use of this interface is not recommended, as added methods to UserServer will
  118. // result in compilation errors.
  119. type UnsafeUserServer interface {
  120. mustEmbedUnimplementedUserServer()
  121. }
  122. func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) {
  123. s.RegisterService(&User_ServiceDesc, srv)
  124. }
  125. func _User_UpdateUserInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  126. in := new(UpdateUserInformationRequest)
  127. if err := dec(in); err != nil {
  128. return nil, err
  129. }
  130. if interceptor == nil {
  131. return srv.(UserServer).UpdateUserInformation(ctx, in)
  132. }
  133. info := &grpc.UnaryServerInfo{
  134. Server: srv,
  135. FullMethod: "/api.user.User/UpdateUserInformation",
  136. }
  137. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  138. return srv.(UserServer).UpdateUserInformation(ctx, req.(*UpdateUserInformationRequest))
  139. }
  140. return interceptor(ctx, in, info, handler)
  141. }
  142. func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  143. in := new(emptypb.Empty)
  144. if err := dec(in); err != nil {
  145. return nil, err
  146. }
  147. if interceptor == nil {
  148. return srv.(UserServer).GetUserInfo(ctx, in)
  149. }
  150. info := &grpc.UnaryServerInfo{
  151. Server: srv,
  152. FullMethod: "/api.user.User/GetUserInfo",
  153. }
  154. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  155. return srv.(UserServer).GetUserInfo(ctx, req.(*emptypb.Empty))
  156. }
  157. return interceptor(ctx, in, info, handler)
  158. }
  159. func _User_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  160. in := new(base.PartnerIDParam)
  161. if err := dec(in); err != nil {
  162. return nil, err
  163. }
  164. if interceptor == nil {
  165. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, in)
  166. }
  167. info := &grpc.UnaryServerInfo{
  168. Server: srv,
  169. FullMethod: "/api.user.User/CheckUserPartnerIsRelationship",
  170. }
  171. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  172. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, req.(*base.PartnerIDParam))
  173. }
  174. return interceptor(ctx, in, info, handler)
  175. }
  176. func _User_CreateUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  177. in := new(base.PartnerIDParam)
  178. if err := dec(in); err != nil {
  179. return nil, err
  180. }
  181. if interceptor == nil {
  182. return srv.(UserServer).CreateUserPartnerIsRelationship(ctx, in)
  183. }
  184. info := &grpc.UnaryServerInfo{
  185. Server: srv,
  186. FullMethod: "/api.user.User/CreateUserPartnerIsRelationship",
  187. }
  188. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  189. return srv.(UserServer).CreateUserPartnerIsRelationship(ctx, req.(*base.PartnerIDParam))
  190. }
  191. return interceptor(ctx, in, info, handler)
  192. }
  193. func _User_GetPartnerCircleInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  194. in := new(base.PartnerIDParam)
  195. if err := dec(in); err != nil {
  196. return nil, err
  197. }
  198. if interceptor == nil {
  199. return srv.(UserServer).GetPartnerCircleInfo(ctx, in)
  200. }
  201. info := &grpc.UnaryServerInfo{
  202. Server: srv,
  203. FullMethod: "/api.user.User/GetPartnerCircleInfo",
  204. }
  205. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  206. return srv.(UserServer).GetPartnerCircleInfo(ctx, req.(*base.PartnerIDParam))
  207. }
  208. return interceptor(ctx, in, info, handler)
  209. }
  210. func _User_GetUserHomeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  211. in := new(base.UserIDParam)
  212. if err := dec(in); err != nil {
  213. return nil, err
  214. }
  215. if interceptor == nil {
  216. return srv.(UserServer).GetUserHomeInfo(ctx, in)
  217. }
  218. info := &grpc.UnaryServerInfo{
  219. Server: srv,
  220. FullMethod: "/api.user.User/GetUserHomeInfo",
  221. }
  222. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  223. return srv.(UserServer).GetUserHomeInfo(ctx, req.(*base.UserIDParam))
  224. }
  225. return interceptor(ctx, in, info, handler)
  226. }
  227. // User_ServiceDesc is the grpc.ServiceDesc for User service.
  228. // It's only intended for direct use with grpc.RegisterService,
  229. // and not to be introspected or modified (even as a copy)
  230. var User_ServiceDesc = grpc.ServiceDesc{
  231. ServiceName: "api.user.User",
  232. HandlerType: (*UserServer)(nil),
  233. Methods: []grpc.MethodDesc{
  234. {
  235. MethodName: "UpdateUserInformation",
  236. Handler: _User_UpdateUserInformation_Handler,
  237. },
  238. {
  239. MethodName: "GetUserInfo",
  240. Handler: _User_GetUserInfo_Handler,
  241. },
  242. {
  243. MethodName: "CheckUserPartnerIsRelationship",
  244. Handler: _User_CheckUserPartnerIsRelationship_Handler,
  245. },
  246. {
  247. MethodName: "CreateUserPartnerIsRelationship",
  248. Handler: _User_CreateUserPartnerIsRelationship_Handler,
  249. },
  250. {
  251. MethodName: "GetPartnerCircleInfo",
  252. Handler: _User_GetPartnerCircleInfo_Handler,
  253. },
  254. {
  255. MethodName: "GetUserHomeInfo",
  256. Handler: _User_GetUserHomeInfo_Handler,
  257. },
  258. },
  259. Streams: []grpc.StreamDesc{},
  260. Metadata: "user.proto",
  261. }