memo_service_grpc.pb.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.5.1
  4. // - protoc (unknown)
  5. // source: api/v1/memo_service.proto
  6. package apiv1
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. emptypb "google.golang.org/protobuf/types/known/emptypb"
  13. )
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the grpc package it is being compiled against.
  16. // Requires gRPC-Go v1.64.0 or later.
  17. const _ = grpc.SupportPackageIsVersion9
  18. const (
  19. MemoService_CreateMemo_FullMethodName = "/memos.api.v1.MemoService/CreateMemo"
  20. MemoService_ListMemos_FullMethodName = "/memos.api.v1.MemoService/ListMemos"
  21. MemoService_GetMemo_FullMethodName = "/memos.api.v1.MemoService/GetMemo"
  22. MemoService_UpdateMemo_FullMethodName = "/memos.api.v1.MemoService/UpdateMemo"
  23. MemoService_DeleteMemo_FullMethodName = "/memos.api.v1.MemoService/DeleteMemo"
  24. MemoService_RenameMemoTag_FullMethodName = "/memos.api.v1.MemoService/RenameMemoTag"
  25. MemoService_DeleteMemoTag_FullMethodName = "/memos.api.v1.MemoService/DeleteMemoTag"
  26. MemoService_SetMemoResources_FullMethodName = "/memos.api.v1.MemoService/SetMemoResources"
  27. MemoService_ListMemoResources_FullMethodName = "/memos.api.v1.MemoService/ListMemoResources"
  28. MemoService_SetMemoRelations_FullMethodName = "/memos.api.v1.MemoService/SetMemoRelations"
  29. MemoService_ListMemoRelations_FullMethodName = "/memos.api.v1.MemoService/ListMemoRelations"
  30. MemoService_CreateMemoComment_FullMethodName = "/memos.api.v1.MemoService/CreateMemoComment"
  31. MemoService_ListMemoComments_FullMethodName = "/memos.api.v1.MemoService/ListMemoComments"
  32. MemoService_ListMemoReactions_FullMethodName = "/memos.api.v1.MemoService/ListMemoReactions"
  33. MemoService_UpsertMemoReaction_FullMethodName = "/memos.api.v1.MemoService/UpsertMemoReaction"
  34. MemoService_DeleteMemoReaction_FullMethodName = "/memos.api.v1.MemoService/DeleteMemoReaction"
  35. )
  36. // MemoServiceClient is the client API for MemoService service.
  37. //
  38. // 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.
  39. type MemoServiceClient interface {
  40. // CreateMemo creates a memo.
  41. CreateMemo(ctx context.Context, in *CreateMemoRequest, opts ...grpc.CallOption) (*Memo, error)
  42. // ListMemos lists memos with pagination and filter.
  43. ListMemos(ctx context.Context, in *ListMemosRequest, opts ...grpc.CallOption) (*ListMemosResponse, error)
  44. // GetMemo gets a memo.
  45. GetMemo(ctx context.Context, in *GetMemoRequest, opts ...grpc.CallOption) (*Memo, error)
  46. // UpdateMemo updates a memo.
  47. UpdateMemo(ctx context.Context, in *UpdateMemoRequest, opts ...grpc.CallOption) (*Memo, error)
  48. // DeleteMemo deletes a memo.
  49. DeleteMemo(ctx context.Context, in *DeleteMemoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  50. // RenameMemoTag renames a tag for a memo.
  51. RenameMemoTag(ctx context.Context, in *RenameMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  52. // DeleteMemoTag deletes a tag for a memo.
  53. DeleteMemoTag(ctx context.Context, in *DeleteMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  54. // SetMemoResources sets resources for a memo.
  55. SetMemoResources(ctx context.Context, in *SetMemoResourcesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  56. // ListMemoResources lists resources for a memo.
  57. ListMemoResources(ctx context.Context, in *ListMemoResourcesRequest, opts ...grpc.CallOption) (*ListMemoResourcesResponse, error)
  58. // SetMemoRelations sets relations for a memo.
  59. SetMemoRelations(ctx context.Context, in *SetMemoRelationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  60. // ListMemoRelations lists relations for a memo.
  61. ListMemoRelations(ctx context.Context, in *ListMemoRelationsRequest, opts ...grpc.CallOption) (*ListMemoRelationsResponse, error)
  62. // CreateMemoComment creates a comment for a memo.
  63. CreateMemoComment(ctx context.Context, in *CreateMemoCommentRequest, opts ...grpc.CallOption) (*Memo, error)
  64. // ListMemoComments lists comments for a memo.
  65. ListMemoComments(ctx context.Context, in *ListMemoCommentsRequest, opts ...grpc.CallOption) (*ListMemoCommentsResponse, error)
  66. // ListMemoReactions lists reactions for a memo.
  67. ListMemoReactions(ctx context.Context, in *ListMemoReactionsRequest, opts ...grpc.CallOption) (*ListMemoReactionsResponse, error)
  68. // UpsertMemoReaction upserts a reaction for a memo.
  69. UpsertMemoReaction(ctx context.Context, in *UpsertMemoReactionRequest, opts ...grpc.CallOption) (*Reaction, error)
  70. // DeleteMemoReaction deletes a reaction for a memo.
  71. DeleteMemoReaction(ctx context.Context, in *DeleteMemoReactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  72. }
  73. type memoServiceClient struct {
  74. cc grpc.ClientConnInterface
  75. }
  76. func NewMemoServiceClient(cc grpc.ClientConnInterface) MemoServiceClient {
  77. return &memoServiceClient{cc}
  78. }
  79. func (c *memoServiceClient) CreateMemo(ctx context.Context, in *CreateMemoRequest, opts ...grpc.CallOption) (*Memo, error) {
  80. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  81. out := new(Memo)
  82. err := c.cc.Invoke(ctx, MemoService_CreateMemo_FullMethodName, in, out, cOpts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return out, nil
  87. }
  88. func (c *memoServiceClient) ListMemos(ctx context.Context, in *ListMemosRequest, opts ...grpc.CallOption) (*ListMemosResponse, error) {
  89. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  90. out := new(ListMemosResponse)
  91. err := c.cc.Invoke(ctx, MemoService_ListMemos_FullMethodName, in, out, cOpts...)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. func (c *memoServiceClient) GetMemo(ctx context.Context, in *GetMemoRequest, opts ...grpc.CallOption) (*Memo, error) {
  98. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  99. out := new(Memo)
  100. err := c.cc.Invoke(ctx, MemoService_GetMemo_FullMethodName, in, out, cOpts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. func (c *memoServiceClient) UpdateMemo(ctx context.Context, in *UpdateMemoRequest, opts ...grpc.CallOption) (*Memo, error) {
  107. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  108. out := new(Memo)
  109. err := c.cc.Invoke(ctx, MemoService_UpdateMemo_FullMethodName, in, out, cOpts...)
  110. if err != nil {
  111. return nil, err
  112. }
  113. return out, nil
  114. }
  115. func (c *memoServiceClient) DeleteMemo(ctx context.Context, in *DeleteMemoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  116. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  117. out := new(emptypb.Empty)
  118. err := c.cc.Invoke(ctx, MemoService_DeleteMemo_FullMethodName, in, out, cOpts...)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return out, nil
  123. }
  124. func (c *memoServiceClient) RenameMemoTag(ctx context.Context, in *RenameMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  125. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  126. out := new(emptypb.Empty)
  127. err := c.cc.Invoke(ctx, MemoService_RenameMemoTag_FullMethodName, in, out, cOpts...)
  128. if err != nil {
  129. return nil, err
  130. }
  131. return out, nil
  132. }
  133. func (c *memoServiceClient) DeleteMemoTag(ctx context.Context, in *DeleteMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  134. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  135. out := new(emptypb.Empty)
  136. err := c.cc.Invoke(ctx, MemoService_DeleteMemoTag_FullMethodName, in, out, cOpts...)
  137. if err != nil {
  138. return nil, err
  139. }
  140. return out, nil
  141. }
  142. func (c *memoServiceClient) SetMemoResources(ctx context.Context, in *SetMemoResourcesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  143. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  144. out := new(emptypb.Empty)
  145. err := c.cc.Invoke(ctx, MemoService_SetMemoResources_FullMethodName, in, out, cOpts...)
  146. if err != nil {
  147. return nil, err
  148. }
  149. return out, nil
  150. }
  151. func (c *memoServiceClient) ListMemoResources(ctx context.Context, in *ListMemoResourcesRequest, opts ...grpc.CallOption) (*ListMemoResourcesResponse, error) {
  152. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  153. out := new(ListMemoResourcesResponse)
  154. err := c.cc.Invoke(ctx, MemoService_ListMemoResources_FullMethodName, in, out, cOpts...)
  155. if err != nil {
  156. return nil, err
  157. }
  158. return out, nil
  159. }
  160. func (c *memoServiceClient) SetMemoRelations(ctx context.Context, in *SetMemoRelationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  161. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  162. out := new(emptypb.Empty)
  163. err := c.cc.Invoke(ctx, MemoService_SetMemoRelations_FullMethodName, in, out, cOpts...)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return out, nil
  168. }
  169. func (c *memoServiceClient) ListMemoRelations(ctx context.Context, in *ListMemoRelationsRequest, opts ...grpc.CallOption) (*ListMemoRelationsResponse, error) {
  170. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  171. out := new(ListMemoRelationsResponse)
  172. err := c.cc.Invoke(ctx, MemoService_ListMemoRelations_FullMethodName, in, out, cOpts...)
  173. if err != nil {
  174. return nil, err
  175. }
  176. return out, nil
  177. }
  178. func (c *memoServiceClient) CreateMemoComment(ctx context.Context, in *CreateMemoCommentRequest, opts ...grpc.CallOption) (*Memo, error) {
  179. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  180. out := new(Memo)
  181. err := c.cc.Invoke(ctx, MemoService_CreateMemoComment_FullMethodName, in, out, cOpts...)
  182. if err != nil {
  183. return nil, err
  184. }
  185. return out, nil
  186. }
  187. func (c *memoServiceClient) ListMemoComments(ctx context.Context, in *ListMemoCommentsRequest, opts ...grpc.CallOption) (*ListMemoCommentsResponse, error) {
  188. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  189. out := new(ListMemoCommentsResponse)
  190. err := c.cc.Invoke(ctx, MemoService_ListMemoComments_FullMethodName, in, out, cOpts...)
  191. if err != nil {
  192. return nil, err
  193. }
  194. return out, nil
  195. }
  196. func (c *memoServiceClient) ListMemoReactions(ctx context.Context, in *ListMemoReactionsRequest, opts ...grpc.CallOption) (*ListMemoReactionsResponse, error) {
  197. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  198. out := new(ListMemoReactionsResponse)
  199. err := c.cc.Invoke(ctx, MemoService_ListMemoReactions_FullMethodName, in, out, cOpts...)
  200. if err != nil {
  201. return nil, err
  202. }
  203. return out, nil
  204. }
  205. func (c *memoServiceClient) UpsertMemoReaction(ctx context.Context, in *UpsertMemoReactionRequest, opts ...grpc.CallOption) (*Reaction, error) {
  206. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  207. out := new(Reaction)
  208. err := c.cc.Invoke(ctx, MemoService_UpsertMemoReaction_FullMethodName, in, out, cOpts...)
  209. if err != nil {
  210. return nil, err
  211. }
  212. return out, nil
  213. }
  214. func (c *memoServiceClient) DeleteMemoReaction(ctx context.Context, in *DeleteMemoReactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  215. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  216. out := new(emptypb.Empty)
  217. err := c.cc.Invoke(ctx, MemoService_DeleteMemoReaction_FullMethodName, in, out, cOpts...)
  218. if err != nil {
  219. return nil, err
  220. }
  221. return out, nil
  222. }
  223. // MemoServiceServer is the server API for MemoService service.
  224. // All implementations must embed UnimplementedMemoServiceServer
  225. // for forward compatibility.
  226. type MemoServiceServer interface {
  227. // CreateMemo creates a memo.
  228. CreateMemo(context.Context, *CreateMemoRequest) (*Memo, error)
  229. // ListMemos lists memos with pagination and filter.
  230. ListMemos(context.Context, *ListMemosRequest) (*ListMemosResponse, error)
  231. // GetMemo gets a memo.
  232. GetMemo(context.Context, *GetMemoRequest) (*Memo, error)
  233. // UpdateMemo updates a memo.
  234. UpdateMemo(context.Context, *UpdateMemoRequest) (*Memo, error)
  235. // DeleteMemo deletes a memo.
  236. DeleteMemo(context.Context, *DeleteMemoRequest) (*emptypb.Empty, error)
  237. // RenameMemoTag renames a tag for a memo.
  238. RenameMemoTag(context.Context, *RenameMemoTagRequest) (*emptypb.Empty, error)
  239. // DeleteMemoTag deletes a tag for a memo.
  240. DeleteMemoTag(context.Context, *DeleteMemoTagRequest) (*emptypb.Empty, error)
  241. // SetMemoResources sets resources for a memo.
  242. SetMemoResources(context.Context, *SetMemoResourcesRequest) (*emptypb.Empty, error)
  243. // ListMemoResources lists resources for a memo.
  244. ListMemoResources(context.Context, *ListMemoResourcesRequest) (*ListMemoResourcesResponse, error)
  245. // SetMemoRelations sets relations for a memo.
  246. SetMemoRelations(context.Context, *SetMemoRelationsRequest) (*emptypb.Empty, error)
  247. // ListMemoRelations lists relations for a memo.
  248. ListMemoRelations(context.Context, *ListMemoRelationsRequest) (*ListMemoRelationsResponse, error)
  249. // CreateMemoComment creates a comment for a memo.
  250. CreateMemoComment(context.Context, *CreateMemoCommentRequest) (*Memo, error)
  251. // ListMemoComments lists comments for a memo.
  252. ListMemoComments(context.Context, *ListMemoCommentsRequest) (*ListMemoCommentsResponse, error)
  253. // ListMemoReactions lists reactions for a memo.
  254. ListMemoReactions(context.Context, *ListMemoReactionsRequest) (*ListMemoReactionsResponse, error)
  255. // UpsertMemoReaction upserts a reaction for a memo.
  256. UpsertMemoReaction(context.Context, *UpsertMemoReactionRequest) (*Reaction, error)
  257. // DeleteMemoReaction deletes a reaction for a memo.
  258. DeleteMemoReaction(context.Context, *DeleteMemoReactionRequest) (*emptypb.Empty, error)
  259. mustEmbedUnimplementedMemoServiceServer()
  260. }
  261. // UnimplementedMemoServiceServer must be embedded to have
  262. // forward compatible implementations.
  263. //
  264. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  265. // pointer dereference when methods are called.
  266. type UnimplementedMemoServiceServer struct{}
  267. func (UnimplementedMemoServiceServer) CreateMemo(context.Context, *CreateMemoRequest) (*Memo, error) {
  268. return nil, status.Errorf(codes.Unimplemented, "method CreateMemo not implemented")
  269. }
  270. func (UnimplementedMemoServiceServer) ListMemos(context.Context, *ListMemosRequest) (*ListMemosResponse, error) {
  271. return nil, status.Errorf(codes.Unimplemented, "method ListMemos not implemented")
  272. }
  273. func (UnimplementedMemoServiceServer) GetMemo(context.Context, *GetMemoRequest) (*Memo, error) {
  274. return nil, status.Errorf(codes.Unimplemented, "method GetMemo not implemented")
  275. }
  276. func (UnimplementedMemoServiceServer) UpdateMemo(context.Context, *UpdateMemoRequest) (*Memo, error) {
  277. return nil, status.Errorf(codes.Unimplemented, "method UpdateMemo not implemented")
  278. }
  279. func (UnimplementedMemoServiceServer) DeleteMemo(context.Context, *DeleteMemoRequest) (*emptypb.Empty, error) {
  280. return nil, status.Errorf(codes.Unimplemented, "method DeleteMemo not implemented")
  281. }
  282. func (UnimplementedMemoServiceServer) RenameMemoTag(context.Context, *RenameMemoTagRequest) (*emptypb.Empty, error) {
  283. return nil, status.Errorf(codes.Unimplemented, "method RenameMemoTag not implemented")
  284. }
  285. func (UnimplementedMemoServiceServer) DeleteMemoTag(context.Context, *DeleteMemoTagRequest) (*emptypb.Empty, error) {
  286. return nil, status.Errorf(codes.Unimplemented, "method DeleteMemoTag not implemented")
  287. }
  288. func (UnimplementedMemoServiceServer) SetMemoResources(context.Context, *SetMemoResourcesRequest) (*emptypb.Empty, error) {
  289. return nil, status.Errorf(codes.Unimplemented, "method SetMemoResources not implemented")
  290. }
  291. func (UnimplementedMemoServiceServer) ListMemoResources(context.Context, *ListMemoResourcesRequest) (*ListMemoResourcesResponse, error) {
  292. return nil, status.Errorf(codes.Unimplemented, "method ListMemoResources not implemented")
  293. }
  294. func (UnimplementedMemoServiceServer) SetMemoRelations(context.Context, *SetMemoRelationsRequest) (*emptypb.Empty, error) {
  295. return nil, status.Errorf(codes.Unimplemented, "method SetMemoRelations not implemented")
  296. }
  297. func (UnimplementedMemoServiceServer) ListMemoRelations(context.Context, *ListMemoRelationsRequest) (*ListMemoRelationsResponse, error) {
  298. return nil, status.Errorf(codes.Unimplemented, "method ListMemoRelations not implemented")
  299. }
  300. func (UnimplementedMemoServiceServer) CreateMemoComment(context.Context, *CreateMemoCommentRequest) (*Memo, error) {
  301. return nil, status.Errorf(codes.Unimplemented, "method CreateMemoComment not implemented")
  302. }
  303. func (UnimplementedMemoServiceServer) ListMemoComments(context.Context, *ListMemoCommentsRequest) (*ListMemoCommentsResponse, error) {
  304. return nil, status.Errorf(codes.Unimplemented, "method ListMemoComments not implemented")
  305. }
  306. func (UnimplementedMemoServiceServer) ListMemoReactions(context.Context, *ListMemoReactionsRequest) (*ListMemoReactionsResponse, error) {
  307. return nil, status.Errorf(codes.Unimplemented, "method ListMemoReactions not implemented")
  308. }
  309. func (UnimplementedMemoServiceServer) UpsertMemoReaction(context.Context, *UpsertMemoReactionRequest) (*Reaction, error) {
  310. return nil, status.Errorf(codes.Unimplemented, "method UpsertMemoReaction not implemented")
  311. }
  312. func (UnimplementedMemoServiceServer) DeleteMemoReaction(context.Context, *DeleteMemoReactionRequest) (*emptypb.Empty, error) {
  313. return nil, status.Errorf(codes.Unimplemented, "method DeleteMemoReaction not implemented")
  314. }
  315. func (UnimplementedMemoServiceServer) mustEmbedUnimplementedMemoServiceServer() {}
  316. func (UnimplementedMemoServiceServer) testEmbeddedByValue() {}
  317. // UnsafeMemoServiceServer may be embedded to opt out of forward compatibility for this service.
  318. // Use of this interface is not recommended, as added methods to MemoServiceServer will
  319. // result in compilation errors.
  320. type UnsafeMemoServiceServer interface {
  321. mustEmbedUnimplementedMemoServiceServer()
  322. }
  323. func RegisterMemoServiceServer(s grpc.ServiceRegistrar, srv MemoServiceServer) {
  324. // If the following call pancis, it indicates UnimplementedMemoServiceServer was
  325. // embedded by pointer and is nil. This will cause panics if an
  326. // unimplemented method is ever invoked, so we test this at initialization
  327. // time to prevent it from happening at runtime later due to I/O.
  328. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  329. t.testEmbeddedByValue()
  330. }
  331. s.RegisterService(&MemoService_ServiceDesc, srv)
  332. }
  333. func _MemoService_CreateMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  334. in := new(CreateMemoRequest)
  335. if err := dec(in); err != nil {
  336. return nil, err
  337. }
  338. if interceptor == nil {
  339. return srv.(MemoServiceServer).CreateMemo(ctx, in)
  340. }
  341. info := &grpc.UnaryServerInfo{
  342. Server: srv,
  343. FullMethod: MemoService_CreateMemo_FullMethodName,
  344. }
  345. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  346. return srv.(MemoServiceServer).CreateMemo(ctx, req.(*CreateMemoRequest))
  347. }
  348. return interceptor(ctx, in, info, handler)
  349. }
  350. func _MemoService_ListMemos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  351. in := new(ListMemosRequest)
  352. if err := dec(in); err != nil {
  353. return nil, err
  354. }
  355. if interceptor == nil {
  356. return srv.(MemoServiceServer).ListMemos(ctx, in)
  357. }
  358. info := &grpc.UnaryServerInfo{
  359. Server: srv,
  360. FullMethod: MemoService_ListMemos_FullMethodName,
  361. }
  362. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  363. return srv.(MemoServiceServer).ListMemos(ctx, req.(*ListMemosRequest))
  364. }
  365. return interceptor(ctx, in, info, handler)
  366. }
  367. func _MemoService_GetMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  368. in := new(GetMemoRequest)
  369. if err := dec(in); err != nil {
  370. return nil, err
  371. }
  372. if interceptor == nil {
  373. return srv.(MemoServiceServer).GetMemo(ctx, in)
  374. }
  375. info := &grpc.UnaryServerInfo{
  376. Server: srv,
  377. FullMethod: MemoService_GetMemo_FullMethodName,
  378. }
  379. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  380. return srv.(MemoServiceServer).GetMemo(ctx, req.(*GetMemoRequest))
  381. }
  382. return interceptor(ctx, in, info, handler)
  383. }
  384. func _MemoService_UpdateMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  385. in := new(UpdateMemoRequest)
  386. if err := dec(in); err != nil {
  387. return nil, err
  388. }
  389. if interceptor == nil {
  390. return srv.(MemoServiceServer).UpdateMemo(ctx, in)
  391. }
  392. info := &grpc.UnaryServerInfo{
  393. Server: srv,
  394. FullMethod: MemoService_UpdateMemo_FullMethodName,
  395. }
  396. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  397. return srv.(MemoServiceServer).UpdateMemo(ctx, req.(*UpdateMemoRequest))
  398. }
  399. return interceptor(ctx, in, info, handler)
  400. }
  401. func _MemoService_DeleteMemo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  402. in := new(DeleteMemoRequest)
  403. if err := dec(in); err != nil {
  404. return nil, err
  405. }
  406. if interceptor == nil {
  407. return srv.(MemoServiceServer).DeleteMemo(ctx, in)
  408. }
  409. info := &grpc.UnaryServerInfo{
  410. Server: srv,
  411. FullMethod: MemoService_DeleteMemo_FullMethodName,
  412. }
  413. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  414. return srv.(MemoServiceServer).DeleteMemo(ctx, req.(*DeleteMemoRequest))
  415. }
  416. return interceptor(ctx, in, info, handler)
  417. }
  418. func _MemoService_RenameMemoTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  419. in := new(RenameMemoTagRequest)
  420. if err := dec(in); err != nil {
  421. return nil, err
  422. }
  423. if interceptor == nil {
  424. return srv.(MemoServiceServer).RenameMemoTag(ctx, in)
  425. }
  426. info := &grpc.UnaryServerInfo{
  427. Server: srv,
  428. FullMethod: MemoService_RenameMemoTag_FullMethodName,
  429. }
  430. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  431. return srv.(MemoServiceServer).RenameMemoTag(ctx, req.(*RenameMemoTagRequest))
  432. }
  433. return interceptor(ctx, in, info, handler)
  434. }
  435. func _MemoService_DeleteMemoTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  436. in := new(DeleteMemoTagRequest)
  437. if err := dec(in); err != nil {
  438. return nil, err
  439. }
  440. if interceptor == nil {
  441. return srv.(MemoServiceServer).DeleteMemoTag(ctx, in)
  442. }
  443. info := &grpc.UnaryServerInfo{
  444. Server: srv,
  445. FullMethod: MemoService_DeleteMemoTag_FullMethodName,
  446. }
  447. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  448. return srv.(MemoServiceServer).DeleteMemoTag(ctx, req.(*DeleteMemoTagRequest))
  449. }
  450. return interceptor(ctx, in, info, handler)
  451. }
  452. func _MemoService_SetMemoResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  453. in := new(SetMemoResourcesRequest)
  454. if err := dec(in); err != nil {
  455. return nil, err
  456. }
  457. if interceptor == nil {
  458. return srv.(MemoServiceServer).SetMemoResources(ctx, in)
  459. }
  460. info := &grpc.UnaryServerInfo{
  461. Server: srv,
  462. FullMethod: MemoService_SetMemoResources_FullMethodName,
  463. }
  464. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  465. return srv.(MemoServiceServer).SetMemoResources(ctx, req.(*SetMemoResourcesRequest))
  466. }
  467. return interceptor(ctx, in, info, handler)
  468. }
  469. func _MemoService_ListMemoResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  470. in := new(ListMemoResourcesRequest)
  471. if err := dec(in); err != nil {
  472. return nil, err
  473. }
  474. if interceptor == nil {
  475. return srv.(MemoServiceServer).ListMemoResources(ctx, in)
  476. }
  477. info := &grpc.UnaryServerInfo{
  478. Server: srv,
  479. FullMethod: MemoService_ListMemoResources_FullMethodName,
  480. }
  481. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  482. return srv.(MemoServiceServer).ListMemoResources(ctx, req.(*ListMemoResourcesRequest))
  483. }
  484. return interceptor(ctx, in, info, handler)
  485. }
  486. func _MemoService_SetMemoRelations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  487. in := new(SetMemoRelationsRequest)
  488. if err := dec(in); err != nil {
  489. return nil, err
  490. }
  491. if interceptor == nil {
  492. return srv.(MemoServiceServer).SetMemoRelations(ctx, in)
  493. }
  494. info := &grpc.UnaryServerInfo{
  495. Server: srv,
  496. FullMethod: MemoService_SetMemoRelations_FullMethodName,
  497. }
  498. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  499. return srv.(MemoServiceServer).SetMemoRelations(ctx, req.(*SetMemoRelationsRequest))
  500. }
  501. return interceptor(ctx, in, info, handler)
  502. }
  503. func _MemoService_ListMemoRelations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  504. in := new(ListMemoRelationsRequest)
  505. if err := dec(in); err != nil {
  506. return nil, err
  507. }
  508. if interceptor == nil {
  509. return srv.(MemoServiceServer).ListMemoRelations(ctx, in)
  510. }
  511. info := &grpc.UnaryServerInfo{
  512. Server: srv,
  513. FullMethod: MemoService_ListMemoRelations_FullMethodName,
  514. }
  515. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  516. return srv.(MemoServiceServer).ListMemoRelations(ctx, req.(*ListMemoRelationsRequest))
  517. }
  518. return interceptor(ctx, in, info, handler)
  519. }
  520. func _MemoService_CreateMemoComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  521. in := new(CreateMemoCommentRequest)
  522. if err := dec(in); err != nil {
  523. return nil, err
  524. }
  525. if interceptor == nil {
  526. return srv.(MemoServiceServer).CreateMemoComment(ctx, in)
  527. }
  528. info := &grpc.UnaryServerInfo{
  529. Server: srv,
  530. FullMethod: MemoService_CreateMemoComment_FullMethodName,
  531. }
  532. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  533. return srv.(MemoServiceServer).CreateMemoComment(ctx, req.(*CreateMemoCommentRequest))
  534. }
  535. return interceptor(ctx, in, info, handler)
  536. }
  537. func _MemoService_ListMemoComments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  538. in := new(ListMemoCommentsRequest)
  539. if err := dec(in); err != nil {
  540. return nil, err
  541. }
  542. if interceptor == nil {
  543. return srv.(MemoServiceServer).ListMemoComments(ctx, in)
  544. }
  545. info := &grpc.UnaryServerInfo{
  546. Server: srv,
  547. FullMethod: MemoService_ListMemoComments_FullMethodName,
  548. }
  549. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  550. return srv.(MemoServiceServer).ListMemoComments(ctx, req.(*ListMemoCommentsRequest))
  551. }
  552. return interceptor(ctx, in, info, handler)
  553. }
  554. func _MemoService_ListMemoReactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  555. in := new(ListMemoReactionsRequest)
  556. if err := dec(in); err != nil {
  557. return nil, err
  558. }
  559. if interceptor == nil {
  560. return srv.(MemoServiceServer).ListMemoReactions(ctx, in)
  561. }
  562. info := &grpc.UnaryServerInfo{
  563. Server: srv,
  564. FullMethod: MemoService_ListMemoReactions_FullMethodName,
  565. }
  566. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  567. return srv.(MemoServiceServer).ListMemoReactions(ctx, req.(*ListMemoReactionsRequest))
  568. }
  569. return interceptor(ctx, in, info, handler)
  570. }
  571. func _MemoService_UpsertMemoReaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  572. in := new(UpsertMemoReactionRequest)
  573. if err := dec(in); err != nil {
  574. return nil, err
  575. }
  576. if interceptor == nil {
  577. return srv.(MemoServiceServer).UpsertMemoReaction(ctx, in)
  578. }
  579. info := &grpc.UnaryServerInfo{
  580. Server: srv,
  581. FullMethod: MemoService_UpsertMemoReaction_FullMethodName,
  582. }
  583. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  584. return srv.(MemoServiceServer).UpsertMemoReaction(ctx, req.(*UpsertMemoReactionRequest))
  585. }
  586. return interceptor(ctx, in, info, handler)
  587. }
  588. func _MemoService_DeleteMemoReaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  589. in := new(DeleteMemoReactionRequest)
  590. if err := dec(in); err != nil {
  591. return nil, err
  592. }
  593. if interceptor == nil {
  594. return srv.(MemoServiceServer).DeleteMemoReaction(ctx, in)
  595. }
  596. info := &grpc.UnaryServerInfo{
  597. Server: srv,
  598. FullMethod: MemoService_DeleteMemoReaction_FullMethodName,
  599. }
  600. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  601. return srv.(MemoServiceServer).DeleteMemoReaction(ctx, req.(*DeleteMemoReactionRequest))
  602. }
  603. return interceptor(ctx, in, info, handler)
  604. }
  605. // MemoService_ServiceDesc is the grpc.ServiceDesc for MemoService service.
  606. // It's only intended for direct use with grpc.RegisterService,
  607. // and not to be introspected or modified (even as a copy)
  608. var MemoService_ServiceDesc = grpc.ServiceDesc{
  609. ServiceName: "memos.api.v1.MemoService",
  610. HandlerType: (*MemoServiceServer)(nil),
  611. Methods: []grpc.MethodDesc{
  612. {
  613. MethodName: "CreateMemo",
  614. Handler: _MemoService_CreateMemo_Handler,
  615. },
  616. {
  617. MethodName: "ListMemos",
  618. Handler: _MemoService_ListMemos_Handler,
  619. },
  620. {
  621. MethodName: "GetMemo",
  622. Handler: _MemoService_GetMemo_Handler,
  623. },
  624. {
  625. MethodName: "UpdateMemo",
  626. Handler: _MemoService_UpdateMemo_Handler,
  627. },
  628. {
  629. MethodName: "DeleteMemo",
  630. Handler: _MemoService_DeleteMemo_Handler,
  631. },
  632. {
  633. MethodName: "RenameMemoTag",
  634. Handler: _MemoService_RenameMemoTag_Handler,
  635. },
  636. {
  637. MethodName: "DeleteMemoTag",
  638. Handler: _MemoService_DeleteMemoTag_Handler,
  639. },
  640. {
  641. MethodName: "SetMemoResources",
  642. Handler: _MemoService_SetMemoResources_Handler,
  643. },
  644. {
  645. MethodName: "ListMemoResources",
  646. Handler: _MemoService_ListMemoResources_Handler,
  647. },
  648. {
  649. MethodName: "SetMemoRelations",
  650. Handler: _MemoService_SetMemoRelations_Handler,
  651. },
  652. {
  653. MethodName: "ListMemoRelations",
  654. Handler: _MemoService_ListMemoRelations_Handler,
  655. },
  656. {
  657. MethodName: "CreateMemoComment",
  658. Handler: _MemoService_CreateMemoComment_Handler,
  659. },
  660. {
  661. MethodName: "ListMemoComments",
  662. Handler: _MemoService_ListMemoComments_Handler,
  663. },
  664. {
  665. MethodName: "ListMemoReactions",
  666. Handler: _MemoService_ListMemoReactions_Handler,
  667. },
  668. {
  669. MethodName: "UpsertMemoReaction",
  670. Handler: _MemoService_UpsertMemoReaction_Handler,
  671. },
  672. {
  673. MethodName: "DeleteMemoReaction",
  674. Handler: _MemoService_DeleteMemoReaction_Handler,
  675. },
  676. },
  677. Streams: []grpc.StreamDesc{},
  678. Metadata: "api/v1/memo_service.proto",
  679. }