memo_service_grpc.pb.go 32 KB

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