card_grpc.pb.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package card
  3. import (
  4. context "context"
  5. grpc "google.golang.org/grpc"
  6. codes "google.golang.org/grpc/codes"
  7. status "google.golang.org/grpc/status"
  8. )
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the grpc package it is being compiled against.
  11. // Requires gRPC-Go v1.32.0 or later.
  12. const _ = grpc.SupportPackageIsVersion7
  13. // CardClient is the client API for Card service.
  14. //
  15. // 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.
  16. type CardClient interface {
  17. CreateAccountUser(ctx context.Context, in *CreateAccountUserRequest, opts ...grpc.CallOption) (*CreateAccountUserReply, error)
  18. LoginAccount(ctx context.Context, in *LoginAccountRequest, opts ...grpc.CallOption) (*LoginAccountReply, error)
  19. WxRegisterLogin(ctx context.Context, in *WxRegisterLoginRequest, opts ...grpc.CallOption) (*WxRegisterLoginReply, error)
  20. CreateCard(ctx context.Context, in *CreateCardRequest, opts ...grpc.CallOption) (*CreateCardReply, error)
  21. GetCardInfo(ctx context.Context, in *GetCardInfoRequest, opts ...grpc.CallOption) (*GetCardInfoReply, error)
  22. GetMyCards(ctx context.Context, in *GetMyCardsRequest, opts ...grpc.CallOption) (*GetMyCardsReply, error)
  23. DelCard(ctx context.Context, in *DelCardInfoRequest, opts ...grpc.CallOption) (*DelCardReply, error)
  24. SaveCard(ctx context.Context, in *SaveCardInfoRequest, opts ...grpc.CallOption) (*SaveCardReply, error)
  25. SearchCard(ctx context.Context, in *SearchCardRequest, opts ...grpc.CallOption) (*SearchCardReply, error)
  26. GetTemplates(ctx context.Context, in *GetTemplatesRequest, opts ...grpc.CallOption) (*GetTemplatesReply, error)
  27. CreateShareToken(ctx context.Context, in *CreateShareTokenRequest, opts ...grpc.CallOption) (*CreateShareTokenReply, error)
  28. AddCardByShareToken(ctx context.Context, in *AddCardByShareTokenRequest, opts ...grpc.CallOption) (*AddCardByShareTokenReply, error)
  29. OCRCard(ctx context.Context, in *OCRCardRequest, opts ...grpc.CallOption) (*OCRCardReply, error)
  30. OssUpload(ctx context.Context, in *OssUploadRequest, opts ...grpc.CallOption) (*OssUploadReplay, error)
  31. }
  32. type cardClient struct {
  33. cc grpc.ClientConnInterface
  34. }
  35. func NewCardClient(cc grpc.ClientConnInterface) CardClient {
  36. return &cardClient{cc}
  37. }
  38. func (c *cardClient) CreateAccountUser(ctx context.Context, in *CreateAccountUserRequest, opts ...grpc.CallOption) (*CreateAccountUserReply, error) {
  39. out := new(CreateAccountUserReply)
  40. err := c.cc.Invoke(ctx, "/card.Card/CreateAccountUser", in, out, opts...)
  41. if err != nil {
  42. return nil, err
  43. }
  44. return out, nil
  45. }
  46. func (c *cardClient) LoginAccount(ctx context.Context, in *LoginAccountRequest, opts ...grpc.CallOption) (*LoginAccountReply, error) {
  47. out := new(LoginAccountReply)
  48. err := c.cc.Invoke(ctx, "/card.Card/LoginAccount", in, out, opts...)
  49. if err != nil {
  50. return nil, err
  51. }
  52. return out, nil
  53. }
  54. func (c *cardClient) WxRegisterLogin(ctx context.Context, in *WxRegisterLoginRequest, opts ...grpc.CallOption) (*WxRegisterLoginReply, error) {
  55. out := new(WxRegisterLoginReply)
  56. err := c.cc.Invoke(ctx, "/card.Card/WxRegisterLogin", in, out, opts...)
  57. if err != nil {
  58. return nil, err
  59. }
  60. return out, nil
  61. }
  62. func (c *cardClient) CreateCard(ctx context.Context, in *CreateCardRequest, opts ...grpc.CallOption) (*CreateCardReply, error) {
  63. out := new(CreateCardReply)
  64. err := c.cc.Invoke(ctx, "/card.Card/CreateCard", in, out, opts...)
  65. if err != nil {
  66. return nil, err
  67. }
  68. return out, nil
  69. }
  70. func (c *cardClient) GetCardInfo(ctx context.Context, in *GetCardInfoRequest, opts ...grpc.CallOption) (*GetCardInfoReply, error) {
  71. out := new(GetCardInfoReply)
  72. err := c.cc.Invoke(ctx, "/card.Card/GetCardInfo", in, out, opts...)
  73. if err != nil {
  74. return nil, err
  75. }
  76. return out, nil
  77. }
  78. func (c *cardClient) GetMyCards(ctx context.Context, in *GetMyCardsRequest, opts ...grpc.CallOption) (*GetMyCardsReply, error) {
  79. out := new(GetMyCardsReply)
  80. err := c.cc.Invoke(ctx, "/card.Card/GetMyCards", in, out, opts...)
  81. if err != nil {
  82. return nil, err
  83. }
  84. return out, nil
  85. }
  86. func (c *cardClient) DelCard(ctx context.Context, in *DelCardInfoRequest, opts ...grpc.CallOption) (*DelCardReply, error) {
  87. out := new(DelCardReply)
  88. err := c.cc.Invoke(ctx, "/card.Card/DelCard", in, out, opts...)
  89. if err != nil {
  90. return nil, err
  91. }
  92. return out, nil
  93. }
  94. func (c *cardClient) SaveCard(ctx context.Context, in *SaveCardInfoRequest, opts ...grpc.CallOption) (*SaveCardReply, error) {
  95. out := new(SaveCardReply)
  96. err := c.cc.Invoke(ctx, "/card.Card/SaveCard", in, out, opts...)
  97. if err != nil {
  98. return nil, err
  99. }
  100. return out, nil
  101. }
  102. func (c *cardClient) SearchCard(ctx context.Context, in *SearchCardRequest, opts ...grpc.CallOption) (*SearchCardReply, error) {
  103. out := new(SearchCardReply)
  104. err := c.cc.Invoke(ctx, "/card.Card/SearchCard", in, out, opts...)
  105. if err != nil {
  106. return nil, err
  107. }
  108. return out, nil
  109. }
  110. func (c *cardClient) GetTemplates(ctx context.Context, in *GetTemplatesRequest, opts ...grpc.CallOption) (*GetTemplatesReply, error) {
  111. out := new(GetTemplatesReply)
  112. err := c.cc.Invoke(ctx, "/card.Card/GetTemplates", in, out, opts...)
  113. if err != nil {
  114. return nil, err
  115. }
  116. return out, nil
  117. }
  118. func (c *cardClient) CreateShareToken(ctx context.Context, in *CreateShareTokenRequest, opts ...grpc.CallOption) (*CreateShareTokenReply, error) {
  119. out := new(CreateShareTokenReply)
  120. err := c.cc.Invoke(ctx, "/card.Card/CreateShareToken", in, out, opts...)
  121. if err != nil {
  122. return nil, err
  123. }
  124. return out, nil
  125. }
  126. func (c *cardClient) AddCardByShareToken(ctx context.Context, in *AddCardByShareTokenRequest, opts ...grpc.CallOption) (*AddCardByShareTokenReply, error) {
  127. out := new(AddCardByShareTokenReply)
  128. err := c.cc.Invoke(ctx, "/card.Card/AddCardByShareToken", in, out, opts...)
  129. if err != nil {
  130. return nil, err
  131. }
  132. return out, nil
  133. }
  134. func (c *cardClient) OCRCard(ctx context.Context, in *OCRCardRequest, opts ...grpc.CallOption) (*OCRCardReply, error) {
  135. out := new(OCRCardReply)
  136. err := c.cc.Invoke(ctx, "/card.Card/OCRCard", in, out, opts...)
  137. if err != nil {
  138. return nil, err
  139. }
  140. return out, nil
  141. }
  142. func (c *cardClient) OssUpload(ctx context.Context, in *OssUploadRequest, opts ...grpc.CallOption) (*OssUploadReplay, error) {
  143. out := new(OssUploadReplay)
  144. err := c.cc.Invoke(ctx, "/card.Card/OssUpload", in, out, opts...)
  145. if err != nil {
  146. return nil, err
  147. }
  148. return out, nil
  149. }
  150. // CardServer is the server API for Card service.
  151. // All implementations must embed UnimplementedCardServer
  152. // for forward compatibility
  153. type CardServer interface {
  154. CreateAccountUser(context.Context, *CreateAccountUserRequest) (*CreateAccountUserReply, error)
  155. LoginAccount(context.Context, *LoginAccountRequest) (*LoginAccountReply, error)
  156. WxRegisterLogin(context.Context, *WxRegisterLoginRequest) (*WxRegisterLoginReply, error)
  157. CreateCard(context.Context, *CreateCardRequest) (*CreateCardReply, error)
  158. GetCardInfo(context.Context, *GetCardInfoRequest) (*GetCardInfoReply, error)
  159. GetMyCards(context.Context, *GetMyCardsRequest) (*GetMyCardsReply, error)
  160. DelCard(context.Context, *DelCardInfoRequest) (*DelCardReply, error)
  161. SaveCard(context.Context, *SaveCardInfoRequest) (*SaveCardReply, error)
  162. SearchCard(context.Context, *SearchCardRequest) (*SearchCardReply, error)
  163. GetTemplates(context.Context, *GetTemplatesRequest) (*GetTemplatesReply, error)
  164. CreateShareToken(context.Context, *CreateShareTokenRequest) (*CreateShareTokenReply, error)
  165. AddCardByShareToken(context.Context, *AddCardByShareTokenRequest) (*AddCardByShareTokenReply, error)
  166. OCRCard(context.Context, *OCRCardRequest) (*OCRCardReply, error)
  167. OssUpload(context.Context, *OssUploadRequest) (*OssUploadReplay, error)
  168. mustEmbedUnimplementedCardServer()
  169. }
  170. // UnimplementedCardServer must be embedded to have forward compatible implementations.
  171. type UnimplementedCardServer struct {
  172. }
  173. func (UnimplementedCardServer) CreateAccountUser(context.Context, *CreateAccountUserRequest) (*CreateAccountUserReply, error) {
  174. return nil, status.Errorf(codes.Unimplemented, "method CreateAccountUser not implemented")
  175. }
  176. func (UnimplementedCardServer) LoginAccount(context.Context, *LoginAccountRequest) (*LoginAccountReply, error) {
  177. return nil, status.Errorf(codes.Unimplemented, "method LoginAccount not implemented")
  178. }
  179. func (UnimplementedCardServer) WxRegisterLogin(context.Context, *WxRegisterLoginRequest) (*WxRegisterLoginReply, error) {
  180. return nil, status.Errorf(codes.Unimplemented, "method WxRegisterLogin not implemented")
  181. }
  182. func (UnimplementedCardServer) CreateCard(context.Context, *CreateCardRequest) (*CreateCardReply, error) {
  183. return nil, status.Errorf(codes.Unimplemented, "method CreateCard not implemented")
  184. }
  185. func (UnimplementedCardServer) GetCardInfo(context.Context, *GetCardInfoRequest) (*GetCardInfoReply, error) {
  186. return nil, status.Errorf(codes.Unimplemented, "method GetCardInfo not implemented")
  187. }
  188. func (UnimplementedCardServer) GetMyCards(context.Context, *GetMyCardsRequest) (*GetMyCardsReply, error) {
  189. return nil, status.Errorf(codes.Unimplemented, "method GetMyCards not implemented")
  190. }
  191. func (UnimplementedCardServer) DelCard(context.Context, *DelCardInfoRequest) (*DelCardReply, error) {
  192. return nil, status.Errorf(codes.Unimplemented, "method DelCard not implemented")
  193. }
  194. func (UnimplementedCardServer) SaveCard(context.Context, *SaveCardInfoRequest) (*SaveCardReply, error) {
  195. return nil, status.Errorf(codes.Unimplemented, "method SaveCard not implemented")
  196. }
  197. func (UnimplementedCardServer) SearchCard(context.Context, *SearchCardRequest) (*SearchCardReply, error) {
  198. return nil, status.Errorf(codes.Unimplemented, "method SearchCard not implemented")
  199. }
  200. func (UnimplementedCardServer) GetTemplates(context.Context, *GetTemplatesRequest) (*GetTemplatesReply, error) {
  201. return nil, status.Errorf(codes.Unimplemented, "method GetTemplates not implemented")
  202. }
  203. func (UnimplementedCardServer) CreateShareToken(context.Context, *CreateShareTokenRequest) (*CreateShareTokenReply, error) {
  204. return nil, status.Errorf(codes.Unimplemented, "method CreateShareToken not implemented")
  205. }
  206. func (UnimplementedCardServer) AddCardByShareToken(context.Context, *AddCardByShareTokenRequest) (*AddCardByShareTokenReply, error) {
  207. return nil, status.Errorf(codes.Unimplemented, "method AddCardByShareToken not implemented")
  208. }
  209. func (UnimplementedCardServer) OCRCard(context.Context, *OCRCardRequest) (*OCRCardReply, error) {
  210. return nil, status.Errorf(codes.Unimplemented, "method OCRCard not implemented")
  211. }
  212. func (UnimplementedCardServer) OssUpload(context.Context, *OssUploadRequest) (*OssUploadReplay, error) {
  213. return nil, status.Errorf(codes.Unimplemented, "method OssUpload not implemented")
  214. }
  215. func (UnimplementedCardServer) mustEmbedUnimplementedCardServer() {}
  216. // UnsafeCardServer may be embedded to opt out of forward compatibility for this service.
  217. // Use of this interface is not recommended, as added methods to CardServer will
  218. // result in compilation errors.
  219. type UnsafeCardServer interface {
  220. mustEmbedUnimplementedCardServer()
  221. }
  222. func RegisterCardServer(s grpc.ServiceRegistrar, srv CardServer) {
  223. s.RegisterService(&Card_ServiceDesc, srv)
  224. }
  225. func _Card_CreateAccountUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  226. in := new(CreateAccountUserRequest)
  227. if err := dec(in); err != nil {
  228. return nil, err
  229. }
  230. if interceptor == nil {
  231. return srv.(CardServer).CreateAccountUser(ctx, in)
  232. }
  233. info := &grpc.UnaryServerInfo{
  234. Server: srv,
  235. FullMethod: "/card.Card/CreateAccountUser",
  236. }
  237. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  238. return srv.(CardServer).CreateAccountUser(ctx, req.(*CreateAccountUserRequest))
  239. }
  240. return interceptor(ctx, in, info, handler)
  241. }
  242. func _Card_LoginAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  243. in := new(LoginAccountRequest)
  244. if err := dec(in); err != nil {
  245. return nil, err
  246. }
  247. if interceptor == nil {
  248. return srv.(CardServer).LoginAccount(ctx, in)
  249. }
  250. info := &grpc.UnaryServerInfo{
  251. Server: srv,
  252. FullMethod: "/card.Card/LoginAccount",
  253. }
  254. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  255. return srv.(CardServer).LoginAccount(ctx, req.(*LoginAccountRequest))
  256. }
  257. return interceptor(ctx, in, info, handler)
  258. }
  259. func _Card_WxRegisterLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  260. in := new(WxRegisterLoginRequest)
  261. if err := dec(in); err != nil {
  262. return nil, err
  263. }
  264. if interceptor == nil {
  265. return srv.(CardServer).WxRegisterLogin(ctx, in)
  266. }
  267. info := &grpc.UnaryServerInfo{
  268. Server: srv,
  269. FullMethod: "/card.Card/WxRegisterLogin",
  270. }
  271. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  272. return srv.(CardServer).WxRegisterLogin(ctx, req.(*WxRegisterLoginRequest))
  273. }
  274. return interceptor(ctx, in, info, handler)
  275. }
  276. func _Card_CreateCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  277. in := new(CreateCardRequest)
  278. if err := dec(in); err != nil {
  279. return nil, err
  280. }
  281. if interceptor == nil {
  282. return srv.(CardServer).CreateCard(ctx, in)
  283. }
  284. info := &grpc.UnaryServerInfo{
  285. Server: srv,
  286. FullMethod: "/card.Card/CreateCard",
  287. }
  288. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  289. return srv.(CardServer).CreateCard(ctx, req.(*CreateCardRequest))
  290. }
  291. return interceptor(ctx, in, info, handler)
  292. }
  293. func _Card_GetCardInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  294. in := new(GetCardInfoRequest)
  295. if err := dec(in); err != nil {
  296. return nil, err
  297. }
  298. if interceptor == nil {
  299. return srv.(CardServer).GetCardInfo(ctx, in)
  300. }
  301. info := &grpc.UnaryServerInfo{
  302. Server: srv,
  303. FullMethod: "/card.Card/GetCardInfo",
  304. }
  305. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  306. return srv.(CardServer).GetCardInfo(ctx, req.(*GetCardInfoRequest))
  307. }
  308. return interceptor(ctx, in, info, handler)
  309. }
  310. func _Card_GetMyCards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  311. in := new(GetMyCardsRequest)
  312. if err := dec(in); err != nil {
  313. return nil, err
  314. }
  315. if interceptor == nil {
  316. return srv.(CardServer).GetMyCards(ctx, in)
  317. }
  318. info := &grpc.UnaryServerInfo{
  319. Server: srv,
  320. FullMethod: "/card.Card/GetMyCards",
  321. }
  322. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  323. return srv.(CardServer).GetMyCards(ctx, req.(*GetMyCardsRequest))
  324. }
  325. return interceptor(ctx, in, info, handler)
  326. }
  327. func _Card_DelCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  328. in := new(DelCardInfoRequest)
  329. if err := dec(in); err != nil {
  330. return nil, err
  331. }
  332. if interceptor == nil {
  333. return srv.(CardServer).DelCard(ctx, in)
  334. }
  335. info := &grpc.UnaryServerInfo{
  336. Server: srv,
  337. FullMethod: "/card.Card/DelCard",
  338. }
  339. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  340. return srv.(CardServer).DelCard(ctx, req.(*DelCardInfoRequest))
  341. }
  342. return interceptor(ctx, in, info, handler)
  343. }
  344. func _Card_SaveCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  345. in := new(SaveCardInfoRequest)
  346. if err := dec(in); err != nil {
  347. return nil, err
  348. }
  349. if interceptor == nil {
  350. return srv.(CardServer).SaveCard(ctx, in)
  351. }
  352. info := &grpc.UnaryServerInfo{
  353. Server: srv,
  354. FullMethod: "/card.Card/SaveCard",
  355. }
  356. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  357. return srv.(CardServer).SaveCard(ctx, req.(*SaveCardInfoRequest))
  358. }
  359. return interceptor(ctx, in, info, handler)
  360. }
  361. func _Card_SearchCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  362. in := new(SearchCardRequest)
  363. if err := dec(in); err != nil {
  364. return nil, err
  365. }
  366. if interceptor == nil {
  367. return srv.(CardServer).SearchCard(ctx, in)
  368. }
  369. info := &grpc.UnaryServerInfo{
  370. Server: srv,
  371. FullMethod: "/card.Card/SearchCard",
  372. }
  373. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  374. return srv.(CardServer).SearchCard(ctx, req.(*SearchCardRequest))
  375. }
  376. return interceptor(ctx, in, info, handler)
  377. }
  378. func _Card_GetTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  379. in := new(GetTemplatesRequest)
  380. if err := dec(in); err != nil {
  381. return nil, err
  382. }
  383. if interceptor == nil {
  384. return srv.(CardServer).GetTemplates(ctx, in)
  385. }
  386. info := &grpc.UnaryServerInfo{
  387. Server: srv,
  388. FullMethod: "/card.Card/GetTemplates",
  389. }
  390. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  391. return srv.(CardServer).GetTemplates(ctx, req.(*GetTemplatesRequest))
  392. }
  393. return interceptor(ctx, in, info, handler)
  394. }
  395. func _Card_CreateShareToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  396. in := new(CreateShareTokenRequest)
  397. if err := dec(in); err != nil {
  398. return nil, err
  399. }
  400. if interceptor == nil {
  401. return srv.(CardServer).CreateShareToken(ctx, in)
  402. }
  403. info := &grpc.UnaryServerInfo{
  404. Server: srv,
  405. FullMethod: "/card.Card/CreateShareToken",
  406. }
  407. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  408. return srv.(CardServer).CreateShareToken(ctx, req.(*CreateShareTokenRequest))
  409. }
  410. return interceptor(ctx, in, info, handler)
  411. }
  412. func _Card_AddCardByShareToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  413. in := new(AddCardByShareTokenRequest)
  414. if err := dec(in); err != nil {
  415. return nil, err
  416. }
  417. if interceptor == nil {
  418. return srv.(CardServer).AddCardByShareToken(ctx, in)
  419. }
  420. info := &grpc.UnaryServerInfo{
  421. Server: srv,
  422. FullMethod: "/card.Card/AddCardByShareToken",
  423. }
  424. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  425. return srv.(CardServer).AddCardByShareToken(ctx, req.(*AddCardByShareTokenRequest))
  426. }
  427. return interceptor(ctx, in, info, handler)
  428. }
  429. func _Card_OCRCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  430. in := new(OCRCardRequest)
  431. if err := dec(in); err != nil {
  432. return nil, err
  433. }
  434. if interceptor == nil {
  435. return srv.(CardServer).OCRCard(ctx, in)
  436. }
  437. info := &grpc.UnaryServerInfo{
  438. Server: srv,
  439. FullMethod: "/card.Card/OCRCard",
  440. }
  441. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  442. return srv.(CardServer).OCRCard(ctx, req.(*OCRCardRequest))
  443. }
  444. return interceptor(ctx, in, info, handler)
  445. }
  446. func _Card_OssUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  447. in := new(OssUploadRequest)
  448. if err := dec(in); err != nil {
  449. return nil, err
  450. }
  451. if interceptor == nil {
  452. return srv.(CardServer).OssUpload(ctx, in)
  453. }
  454. info := &grpc.UnaryServerInfo{
  455. Server: srv,
  456. FullMethod: "/card.Card/OssUpload",
  457. }
  458. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  459. return srv.(CardServer).OssUpload(ctx, req.(*OssUploadRequest))
  460. }
  461. return interceptor(ctx, in, info, handler)
  462. }
  463. // Card_ServiceDesc is the grpc.ServiceDesc for Card service.
  464. // It's only intended for direct use with grpc.RegisterService,
  465. // and not to be introspected or modified (even as a copy)
  466. var Card_ServiceDesc = grpc.ServiceDesc{
  467. ServiceName: "card.Card",
  468. HandlerType: (*CardServer)(nil),
  469. Methods: []grpc.MethodDesc{
  470. {
  471. MethodName: "CreateAccountUser",
  472. Handler: _Card_CreateAccountUser_Handler,
  473. },
  474. {
  475. MethodName: "LoginAccount",
  476. Handler: _Card_LoginAccount_Handler,
  477. },
  478. {
  479. MethodName: "WxRegisterLogin",
  480. Handler: _Card_WxRegisterLogin_Handler,
  481. },
  482. {
  483. MethodName: "CreateCard",
  484. Handler: _Card_CreateCard_Handler,
  485. },
  486. {
  487. MethodName: "GetCardInfo",
  488. Handler: _Card_GetCardInfo_Handler,
  489. },
  490. {
  491. MethodName: "GetMyCards",
  492. Handler: _Card_GetMyCards_Handler,
  493. },
  494. {
  495. MethodName: "DelCard",
  496. Handler: _Card_DelCard_Handler,
  497. },
  498. {
  499. MethodName: "SaveCard",
  500. Handler: _Card_SaveCard_Handler,
  501. },
  502. {
  503. MethodName: "SearchCard",
  504. Handler: _Card_SearchCard_Handler,
  505. },
  506. {
  507. MethodName: "GetTemplates",
  508. Handler: _Card_GetTemplates_Handler,
  509. },
  510. {
  511. MethodName: "CreateShareToken",
  512. Handler: _Card_CreateShareToken_Handler,
  513. },
  514. {
  515. MethodName: "AddCardByShareToken",
  516. Handler: _Card_AddCardByShareToken_Handler,
  517. },
  518. {
  519. MethodName: "OCRCard",
  520. Handler: _Card_OCRCard_Handler,
  521. },
  522. {
  523. MethodName: "OssUpload",
  524. Handler: _Card_OssUpload_Handler,
  525. },
  526. },
  527. Streams: []grpc.StreamDesc{},
  528. Metadata: "card/card.proto",
  529. }