2023-08-05 09:32:52 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: api/v2/memo_service.proto
package apiv2
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
const (
2023-10-01 14:44:10 +08:00
MemoService_CreateMemo_FullMethodName = "/memos.api.v2.MemoService/CreateMemo"
MemoService_ListMemos_FullMethodName = "/memos.api.v2.MemoService/ListMemos"
MemoService_GetMemo_FullMethodName = "/memos.api.v2.MemoService/GetMemo"
2024-01-20 23:48:35 +08:00
MemoService_GetMemoByName_FullMethodName = "/memos.api.v2.MemoService/GetMemoByName"
2023-12-20 23:14:15 +08:00
MemoService_UpdateMemo_FullMethodName = "/memos.api.v2.MemoService/UpdateMemo"
MemoService_DeleteMemo_FullMethodName = "/memos.api.v2.MemoService/DeleteMemo"
2023-12-21 21:24:08 +08:00
MemoService_SetMemoResources_FullMethodName = "/memos.api.v2.MemoService/SetMemoResources"
2023-12-20 23:46:04 +08:00
MemoService_ListMemoResources_FullMethodName = "/memos.api.v2.MemoService/ListMemoResources"
2023-12-21 21:24:08 +08:00
MemoService_SetMemoRelations_FullMethodName = "/memos.api.v2.MemoService/SetMemoRelations"
MemoService_ListMemoRelations_FullMethodName = "/memos.api.v2.MemoService/ListMemoRelations"
2023-10-01 14:44:10 +08:00
MemoService_CreateMemoComment_FullMethodName = "/memos.api.v2.MemoService/CreateMemoComment"
MemoService_ListMemoComments_FullMethodName = "/memos.api.v2.MemoService/ListMemoComments"
2023-12-23 18:35:47 +08:00
MemoService_GetUserMemosStats_FullMethodName = "/memos.api.v2.MemoService/GetUserMemosStats"
2023-08-05 09:32:52 +08:00
)
// MemoServiceClient is the client API for MemoService service.
//
// 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.
type MemoServiceClient interface {
2023-12-21 22:42:06 +08:00
// CreateMemo creates a memo.
2023-10-01 14:44:10 +08:00
CreateMemo ( ctx context . Context , in * CreateMemoRequest , opts ... grpc . CallOption ) ( * CreateMemoResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemos lists memos with pagination and filter.
2023-08-05 09:32:52 +08:00
ListMemos ( ctx context . Context , in * ListMemosRequest , opts ... grpc . CallOption ) ( * ListMemosResponse , error )
2023-12-21 22:42:06 +08:00
// GetMemo gets a memo by id.
2023-08-05 09:32:52 +08:00
GetMemo ( ctx context . Context , in * GetMemoRequest , opts ... grpc . CallOption ) ( * GetMemoResponse , error )
2024-01-20 23:48:35 +08:00
// GetMemoByName gets a memo by name.
GetMemoByName ( ctx context . Context , in * GetMemoByNameRequest , opts ... grpc . CallOption ) ( * GetMemoByNameResponse , error )
2023-12-21 22:42:06 +08:00
// UpdateMemo updates a memo.
2023-12-20 23:14:15 +08:00
UpdateMemo ( ctx context . Context , in * UpdateMemoRequest , opts ... grpc . CallOption ) ( * UpdateMemoResponse , error )
2023-12-21 22:42:06 +08:00
// DeleteMemo deletes a memo by id.
2023-12-20 23:14:15 +08:00
DeleteMemo ( ctx context . Context , in * DeleteMemoRequest , opts ... grpc . CallOption ) ( * DeleteMemoResponse , error )
2023-12-21 22:42:06 +08:00
// SetMemoResources sets resources for a memo.
2023-12-21 21:24:08 +08:00
SetMemoResources ( ctx context . Context , in * SetMemoResourcesRequest , opts ... grpc . CallOption ) ( * SetMemoResourcesResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoResources lists resources for a memo.
2023-12-20 23:46:04 +08:00
ListMemoResources ( ctx context . Context , in * ListMemoResourcesRequest , opts ... grpc . CallOption ) ( * ListMemoResourcesResponse , error )
2023-12-21 22:42:06 +08:00
// SetMemoRelations sets relations for a memo.
2023-12-21 21:24:08 +08:00
SetMemoRelations ( ctx context . Context , in * SetMemoRelationsRequest , opts ... grpc . CallOption ) ( * SetMemoRelationsResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoRelations lists relations for a memo.
2023-12-21 21:24:08 +08:00
ListMemoRelations ( ctx context . Context , in * ListMemoRelationsRequest , opts ... grpc . CallOption ) ( * ListMemoRelationsResponse , error )
2023-12-21 22:42:06 +08:00
// CreateMemoComment creates a comment for a memo.
2023-10-01 14:44:10 +08:00
CreateMemoComment ( ctx context . Context , in * CreateMemoCommentRequest , opts ... grpc . CallOption ) ( * CreateMemoCommentResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoComments lists comments for a memo.
2023-10-01 14:44:10 +08:00
ListMemoComments ( ctx context . Context , in * ListMemoCommentsRequest , opts ... grpc . CallOption ) ( * ListMemoCommentsResponse , error )
2023-12-23 18:35:47 +08:00
// GetUserMemosStats gets stats of memos for a user.
GetUserMemosStats ( ctx context . Context , in * GetUserMemosStatsRequest , opts ... grpc . CallOption ) ( * GetUserMemosStatsResponse , error )
2023-08-05 09:32:52 +08:00
}
type memoServiceClient struct {
cc grpc . ClientConnInterface
}
func NewMemoServiceClient ( cc grpc . ClientConnInterface ) MemoServiceClient {
return & memoServiceClient { cc }
}
2023-10-01 14:44:10 +08:00
func ( c * memoServiceClient ) CreateMemo ( ctx context . Context , in * CreateMemoRequest , opts ... grpc . CallOption ) ( * CreateMemoResponse , error ) {
out := new ( CreateMemoResponse )
err := c . cc . Invoke ( ctx , MemoService_CreateMemo_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-08-05 09:32:52 +08:00
func ( c * memoServiceClient ) ListMemos ( ctx context . Context , in * ListMemosRequest , opts ... grpc . CallOption ) ( * ListMemosResponse , error ) {
out := new ( ListMemosResponse )
err := c . cc . Invoke ( ctx , MemoService_ListMemos_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * memoServiceClient ) GetMemo ( ctx context . Context , in * GetMemoRequest , opts ... grpc . CallOption ) ( * GetMemoResponse , error ) {
out := new ( GetMemoResponse )
err := c . cc . Invoke ( ctx , MemoService_GetMemo_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-01-20 23:48:35 +08:00
func ( c * memoServiceClient ) GetMemoByName ( ctx context . Context , in * GetMemoByNameRequest , opts ... grpc . CallOption ) ( * GetMemoByNameResponse , error ) {
out := new ( GetMemoByNameResponse )
err := c . cc . Invoke ( ctx , MemoService_GetMemoByName_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-12-20 23:14:15 +08:00
func ( c * memoServiceClient ) UpdateMemo ( ctx context . Context , in * UpdateMemoRequest , opts ... grpc . CallOption ) ( * UpdateMemoResponse , error ) {
out := new ( UpdateMemoResponse )
err := c . cc . Invoke ( ctx , MemoService_UpdateMemo_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * memoServiceClient ) DeleteMemo ( ctx context . Context , in * DeleteMemoRequest , opts ... grpc . CallOption ) ( * DeleteMemoResponse , error ) {
out := new ( DeleteMemoResponse )
err := c . cc . Invoke ( ctx , MemoService_DeleteMemo_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-12-21 21:24:08 +08:00
func ( c * memoServiceClient ) SetMemoResources ( ctx context . Context , in * SetMemoResourcesRequest , opts ... grpc . CallOption ) ( * SetMemoResourcesResponse , error ) {
out := new ( SetMemoResourcesResponse )
err := c . cc . Invoke ( ctx , MemoService_SetMemoResources_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-12-20 23:46:04 +08:00
func ( c * memoServiceClient ) ListMemoResources ( ctx context . Context , in * ListMemoResourcesRequest , opts ... grpc . CallOption ) ( * ListMemoResourcesResponse , error ) {
out := new ( ListMemoResourcesResponse )
err := c . cc . Invoke ( ctx , MemoService_ListMemoResources_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-12-21 21:24:08 +08:00
func ( c * memoServiceClient ) SetMemoRelations ( ctx context . Context , in * SetMemoRelationsRequest , opts ... grpc . CallOption ) ( * SetMemoRelationsResponse , error ) {
out := new ( SetMemoRelationsResponse )
err := c . cc . Invoke ( ctx , MemoService_SetMemoRelations_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * memoServiceClient ) ListMemoRelations ( ctx context . Context , in * ListMemoRelationsRequest , opts ... grpc . CallOption ) ( * ListMemoRelationsResponse , error ) {
out := new ( ListMemoRelationsResponse )
err := c . cc . Invoke ( ctx , MemoService_ListMemoRelations_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-10-01 14:44:10 +08:00
func ( c * memoServiceClient ) CreateMemoComment ( ctx context . Context , in * CreateMemoCommentRequest , opts ... grpc . CallOption ) ( * CreateMemoCommentResponse , error ) {
out := new ( CreateMemoCommentResponse )
err := c . cc . Invoke ( ctx , MemoService_CreateMemoComment_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * memoServiceClient ) ListMemoComments ( ctx context . Context , in * ListMemoCommentsRequest , opts ... grpc . CallOption ) ( * ListMemoCommentsResponse , error ) {
out := new ( ListMemoCommentsResponse )
err := c . cc . Invoke ( ctx , MemoService_ListMemoComments_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-12-23 18:35:47 +08:00
func ( c * memoServiceClient ) GetUserMemosStats ( ctx context . Context , in * GetUserMemosStatsRequest , opts ... grpc . CallOption ) ( * GetUserMemosStatsResponse , error ) {
out := new ( GetUserMemosStatsResponse )
err := c . cc . Invoke ( ctx , MemoService_GetUserMemosStats_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2023-08-05 09:32:52 +08:00
// MemoServiceServer is the server API for MemoService service.
// All implementations must embed UnimplementedMemoServiceServer
// for forward compatibility
type MemoServiceServer interface {
2023-12-21 22:42:06 +08:00
// CreateMemo creates a memo.
2023-10-01 14:44:10 +08:00
CreateMemo ( context . Context , * CreateMemoRequest ) ( * CreateMemoResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemos lists memos with pagination and filter.
2023-08-05 09:32:52 +08:00
ListMemos ( context . Context , * ListMemosRequest ) ( * ListMemosResponse , error )
2023-12-21 22:42:06 +08:00
// GetMemo gets a memo by id.
2023-08-05 09:32:52 +08:00
GetMemo ( context . Context , * GetMemoRequest ) ( * GetMemoResponse , error )
2024-01-20 23:48:35 +08:00
// GetMemoByName gets a memo by name.
GetMemoByName ( context . Context , * GetMemoByNameRequest ) ( * GetMemoByNameResponse , error )
2023-12-21 22:42:06 +08:00
// UpdateMemo updates a memo.
2023-12-20 23:14:15 +08:00
UpdateMemo ( context . Context , * UpdateMemoRequest ) ( * UpdateMemoResponse , error )
2023-12-21 22:42:06 +08:00
// DeleteMemo deletes a memo by id.
2023-12-20 23:14:15 +08:00
DeleteMemo ( context . Context , * DeleteMemoRequest ) ( * DeleteMemoResponse , error )
2023-12-21 22:42:06 +08:00
// SetMemoResources sets resources for a memo.
2023-12-21 21:24:08 +08:00
SetMemoResources ( context . Context , * SetMemoResourcesRequest ) ( * SetMemoResourcesResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoResources lists resources for a memo.
2023-12-20 23:46:04 +08:00
ListMemoResources ( context . Context , * ListMemoResourcesRequest ) ( * ListMemoResourcesResponse , error )
2023-12-21 22:42:06 +08:00
// SetMemoRelations sets relations for a memo.
2023-12-21 21:24:08 +08:00
SetMemoRelations ( context . Context , * SetMemoRelationsRequest ) ( * SetMemoRelationsResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoRelations lists relations for a memo.
2023-12-21 21:24:08 +08:00
ListMemoRelations ( context . Context , * ListMemoRelationsRequest ) ( * ListMemoRelationsResponse , error )
2023-12-21 22:42:06 +08:00
// CreateMemoComment creates a comment for a memo.
2023-10-01 14:44:10 +08:00
CreateMemoComment ( context . Context , * CreateMemoCommentRequest ) ( * CreateMemoCommentResponse , error )
2023-12-21 22:42:06 +08:00
// ListMemoComments lists comments for a memo.
2023-10-01 14:44:10 +08:00
ListMemoComments ( context . Context , * ListMemoCommentsRequest ) ( * ListMemoCommentsResponse , error )
2023-12-23 18:35:47 +08:00
// GetUserMemosStats gets stats of memos for a user.
GetUserMemosStats ( context . Context , * GetUserMemosStatsRequest ) ( * GetUserMemosStatsResponse , error )
2023-08-05 09:32:52 +08:00
mustEmbedUnimplementedMemoServiceServer ( )
}
// UnimplementedMemoServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMemoServiceServer struct {
}
2023-10-01 14:44:10 +08:00
func ( UnimplementedMemoServiceServer ) CreateMemo ( context . Context , * CreateMemoRequest ) ( * CreateMemoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateMemo not implemented" )
}
2023-08-05 09:32:52 +08:00
func ( UnimplementedMemoServiceServer ) ListMemos ( context . Context , * ListMemosRequest ) ( * ListMemosResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListMemos not implemented" )
}
func ( UnimplementedMemoServiceServer ) GetMemo ( context . Context , * GetMemoRequest ) ( * GetMemoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetMemo not implemented" )
}
2024-01-20 23:48:35 +08:00
func ( UnimplementedMemoServiceServer ) GetMemoByName ( context . Context , * GetMemoByNameRequest ) ( * GetMemoByNameResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetMemoByName not implemented" )
}
2023-12-20 23:14:15 +08:00
func ( UnimplementedMemoServiceServer ) UpdateMemo ( context . Context , * UpdateMemoRequest ) ( * UpdateMemoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UpdateMemo not implemented" )
}
func ( UnimplementedMemoServiceServer ) DeleteMemo ( context . Context , * DeleteMemoRequest ) ( * DeleteMemoResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteMemo not implemented" )
}
2023-12-21 21:24:08 +08:00
func ( UnimplementedMemoServiceServer ) SetMemoResources ( context . Context , * SetMemoResourcesRequest ) ( * SetMemoResourcesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SetMemoResources not implemented" )
}
2023-12-20 23:46:04 +08:00
func ( UnimplementedMemoServiceServer ) ListMemoResources ( context . Context , * ListMemoResourcesRequest ) ( * ListMemoResourcesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListMemoResources not implemented" )
}
2023-12-21 21:24:08 +08:00
func ( UnimplementedMemoServiceServer ) SetMemoRelations ( context . Context , * SetMemoRelationsRequest ) ( * SetMemoRelationsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SetMemoRelations not implemented" )
}
func ( UnimplementedMemoServiceServer ) ListMemoRelations ( context . Context , * ListMemoRelationsRequest ) ( * ListMemoRelationsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListMemoRelations not implemented" )
}
2023-10-01 14:44:10 +08:00
func ( UnimplementedMemoServiceServer ) CreateMemoComment ( context . Context , * CreateMemoCommentRequest ) ( * CreateMemoCommentResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateMemoComment not implemented" )
}
func ( UnimplementedMemoServiceServer ) ListMemoComments ( context . Context , * ListMemoCommentsRequest ) ( * ListMemoCommentsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListMemoComments not implemented" )
}
2023-12-23 18:35:47 +08:00
func ( UnimplementedMemoServiceServer ) GetUserMemosStats ( context . Context , * GetUserMemosStatsRequest ) ( * GetUserMemosStatsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetUserMemosStats not implemented" )
}
2023-08-05 09:32:52 +08:00
func ( UnimplementedMemoServiceServer ) mustEmbedUnimplementedMemoServiceServer ( ) { }
// UnsafeMemoServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MemoServiceServer will
// result in compilation errors.
type UnsafeMemoServiceServer interface {
mustEmbedUnimplementedMemoServiceServer ( )
}
func RegisterMemoServiceServer ( s grpc . ServiceRegistrar , srv MemoServiceServer ) {
s . RegisterService ( & MemoService_ServiceDesc , srv )
}
2023-10-01 14:44:10 +08:00
func _MemoService_CreateMemo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateMemoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . CreateMemo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_CreateMemo_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . CreateMemo ( ctx , req . ( * CreateMemoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-08-05 09:32:52 +08:00
func _MemoService_ListMemos_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListMemosRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . ListMemos ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_ListMemos_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . ListMemos ( ctx , req . ( * ListMemosRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _MemoService_GetMemo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetMemoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . GetMemo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_GetMemo_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . GetMemo ( ctx , req . ( * GetMemoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-01-20 23:48:35 +08:00
func _MemoService_GetMemoByName_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetMemoByNameRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . GetMemoByName ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_GetMemoByName_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . GetMemoByName ( ctx , req . ( * GetMemoByNameRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-12-20 23:14:15 +08:00
func _MemoService_UpdateMemo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateMemoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . UpdateMemo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_UpdateMemo_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . UpdateMemo ( ctx , req . ( * UpdateMemoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _MemoService_DeleteMemo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteMemoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . DeleteMemo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_DeleteMemo_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . DeleteMemo ( ctx , req . ( * DeleteMemoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-12-21 21:24:08 +08:00
func _MemoService_SetMemoResources_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetMemoResourcesRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . SetMemoResources ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_SetMemoResources_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . SetMemoResources ( ctx , req . ( * SetMemoResourcesRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-12-20 23:46:04 +08:00
func _MemoService_ListMemoResources_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListMemoResourcesRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . ListMemoResources ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_ListMemoResources_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . ListMemoResources ( ctx , req . ( * ListMemoResourcesRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-12-21 21:24:08 +08:00
func _MemoService_SetMemoRelations_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SetMemoRelationsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . SetMemoRelations ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_SetMemoRelations_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . SetMemoRelations ( ctx , req . ( * SetMemoRelationsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _MemoService_ListMemoRelations_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListMemoRelationsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . ListMemoRelations ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_ListMemoRelations_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . ListMemoRelations ( ctx , req . ( * ListMemoRelationsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-10-01 14:44:10 +08:00
func _MemoService_CreateMemoComment_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateMemoCommentRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . CreateMemoComment ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_CreateMemoComment_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . CreateMemoComment ( ctx , req . ( * CreateMemoCommentRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _MemoService_ListMemoComments_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListMemoCommentsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . ListMemoComments ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_ListMemoComments_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . ListMemoComments ( ctx , req . ( * ListMemoCommentsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-12-23 18:35:47 +08:00
func _MemoService_GetUserMemosStats_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetUserMemosStatsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( MemoServiceServer ) . GetUserMemosStats ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : MemoService_GetUserMemosStats_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( MemoServiceServer ) . GetUserMemosStats ( ctx , req . ( * GetUserMemosStatsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-08-05 09:32:52 +08:00
// MemoService_ServiceDesc is the grpc.ServiceDesc for MemoService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MemoService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "memos.api.v2.MemoService" ,
HandlerType : ( * MemoServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
2023-10-01 14:44:10 +08:00
{
MethodName : "CreateMemo" ,
Handler : _MemoService_CreateMemo_Handler ,
} ,
2023-08-05 09:32:52 +08:00
{
MethodName : "ListMemos" ,
Handler : _MemoService_ListMemos_Handler ,
} ,
{
MethodName : "GetMemo" ,
Handler : _MemoService_GetMemo_Handler ,
} ,
2024-01-20 23:48:35 +08:00
{
MethodName : "GetMemoByName" ,
Handler : _MemoService_GetMemoByName_Handler ,
} ,
2023-12-20 23:14:15 +08:00
{
MethodName : "UpdateMemo" ,
Handler : _MemoService_UpdateMemo_Handler ,
} ,
{
MethodName : "DeleteMemo" ,
Handler : _MemoService_DeleteMemo_Handler ,
} ,
2023-12-21 21:24:08 +08:00
{
MethodName : "SetMemoResources" ,
Handler : _MemoService_SetMemoResources_Handler ,
} ,
2023-12-20 23:46:04 +08:00
{
MethodName : "ListMemoResources" ,
Handler : _MemoService_ListMemoResources_Handler ,
} ,
2023-12-21 21:24:08 +08:00
{
MethodName : "SetMemoRelations" ,
Handler : _MemoService_SetMemoRelations_Handler ,
} ,
{
MethodName : "ListMemoRelations" ,
Handler : _MemoService_ListMemoRelations_Handler ,
} ,
2023-10-01 14:44:10 +08:00
{
MethodName : "CreateMemoComment" ,
Handler : _MemoService_CreateMemoComment_Handler ,
} ,
{
MethodName : "ListMemoComments" ,
Handler : _MemoService_ListMemoComments_Handler ,
} ,
2023-12-23 18:35:47 +08:00
{
MethodName : "GetUserMemosStats" ,
Handler : _MemoService_GetUserMemosStats_Handler ,
} ,
2023-08-05 09:32:52 +08:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "api/v2/memo_service.proto" ,
}