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"
MemoService_CreateMemoComment_FullMethodName = "/memos.api.v2.MemoService/CreateMemoComment"
MemoService_ListMemoComments_FullMethodName = "/memos.api.v2.MemoService/ListMemoComments"
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-10-01 14:44:10 +08:00
CreateMemo ( ctx context . Context , in * CreateMemoRequest , opts ... grpc . CallOption ) ( * CreateMemoResponse , error )
2023-08-05 09:32:52 +08:00
ListMemos ( ctx context . Context , in * ListMemosRequest , opts ... grpc . CallOption ) ( * ListMemosResponse , error )
GetMemo ( ctx context . Context , in * GetMemoRequest , opts ... grpc . CallOption ) ( * GetMemoResponse , error )
2023-10-01 14:44:10 +08:00
CreateMemoComment ( ctx context . Context , in * CreateMemoCommentRequest , opts ... grpc . CallOption ) ( * CreateMemoCommentResponse , error )
ListMemoComments ( ctx context . Context , in * ListMemoCommentsRequest , opts ... grpc . CallOption ) ( * ListMemoCommentsResponse , 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
}
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-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-10-01 14:44:10 +08:00
CreateMemo ( context . Context , * CreateMemoRequest ) ( * CreateMemoResponse , error )
2023-08-05 09:32:52 +08:00
ListMemos ( context . Context , * ListMemosRequest ) ( * ListMemosResponse , error )
GetMemo ( context . Context , * GetMemoRequest ) ( * GetMemoResponse , error )
2023-10-01 14:44:10 +08:00
CreateMemoComment ( context . Context , * CreateMemoCommentRequest ) ( * CreateMemoCommentResponse , error )
ListMemoComments ( context . Context , * ListMemoCommentsRequest ) ( * ListMemoCommentsResponse , 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" )
}
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-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 )
}
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-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 ,
} ,
2023-10-01 14:44:10 +08:00
{
MethodName : "CreateMemoComment" ,
Handler : _MemoService_CreateMemoComment_Handler ,
} ,
{
MethodName : "ListMemoComments" ,
Handler : _MemoService_ListMemoComments_Handler ,
} ,
2023-08-05 09:32:52 +08:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "api/v2/memo_service.proto" ,
}