user_grpc.pb.go 12 KB

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