user_grpc.pb.go 11 KB

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