@ -57,28 +57,54 @@ func local_request_MarkdownService_ParseMarkdown_0(ctx context.Context, marshale
}
func request_MarkdownService_RestoreMarkdown _0( ctx context . Context , marshaler runtime . Marshaler , client MarkdownServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq RestoreMarkdown Request
func request_MarkdownService_RestoreMarkdown Nodes _0( ctx context . Context , marshaler runtime . Marshaler , client MarkdownServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq RestoreMarkdown Nodes Request
var metadata runtime . ServerMetadata
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && err != io . EOF {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := client . RestoreMarkdown ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
msg , err := client . RestoreMarkdown Nodes ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
}
func local_request_MarkdownService_RestoreMarkdown _0( ctx context . Context , marshaler runtime . Marshaler , server MarkdownServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq RestoreMarkdown Request
func local_request_MarkdownService_RestoreMarkdown Nodes _0( ctx context . Context , marshaler runtime . Marshaler , server MarkdownServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq RestoreMarkdown Nodes Request
var metadata runtime . ServerMetadata
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && err != io . EOF {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := server . RestoreMarkdown ( ctx , & protoReq )
msg , err := server . RestoreMarkdownNodes ( ctx , & protoReq )
return msg , metadata , err
}
func request_MarkdownService_StringifyMarkdownNodes_0 ( ctx context . Context , marshaler runtime . Marshaler , client MarkdownServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq StringifyMarkdownNodesRequest
var metadata runtime . ServerMetadata
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && err != io . EOF {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := client . StringifyMarkdownNodes ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
}
func local_request_MarkdownService_StringifyMarkdownNodes_0 ( ctx context . Context , marshaler runtime . Marshaler , server MarkdownServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var protoReq StringifyMarkdownNodesRequest
var metadata runtime . ServerMetadata
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && err != io . EOF {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := server . StringifyMarkdownNodes ( ctx , & protoReq )
return msg , metadata , err
}
@ -133,7 +159,7 @@ func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.Serv
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/ParseMarkdown" , runtime . WithHTTPPathPattern ( "/api/v1/markdown / parse") )
annotatedContext , err = runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/ParseMarkdown" , runtime . WithHTTPPathPattern ( "/api/v1/markdown : parse") )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
@ -150,7 +176,7 @@ func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.Serv
} )
mux . Handle ( "POST" , pattern_MarkdownService_RestoreMarkdown _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( "POST" , pattern_MarkdownService_RestoreMarkdown Nodes _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
var stream runtime . ServerTransportStream
@ -158,12 +184,12 @@ func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.Serv
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/RestoreMarkdown ", runtime . WithHTTPPathPattern ( "/api/v1/markdown :restore") )
annotatedContext , err = runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/RestoreMarkdown Nodes ", runtime . WithHTTPPathPattern ( "/api/v1/markdown /node :restore") )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
}
resp , md , err := local_request_MarkdownService_RestoreMarkdown _0( annotatedContext , inboundMarshaler , server , req , pathParams )
resp , md , err := local_request_MarkdownService_RestoreMarkdown Nodes _0( annotatedContext , inboundMarshaler , server , req , pathParams )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
@ -171,7 +197,32 @@ func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.Serv
return
}
forward_MarkdownService_RestoreMarkdown_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_MarkdownService_RestoreMarkdownNodes_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
mux . Handle ( "POST" , pattern_MarkdownService_StringifyMarkdownNodes_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
var stream runtime . ServerTransportStream
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/StringifyMarkdownNodes" , runtime . WithHTTPPathPattern ( "/api/v1/markdown/node:stringify" ) )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
}
resp , md , err := local_request_MarkdownService_StringifyMarkdownNodes_0 ( annotatedContext , inboundMarshaler , server , req , pathParams )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
}
forward_MarkdownService_StringifyMarkdownNodes_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
@ -247,7 +298,7 @@ func RegisterMarkdownServiceHandlerClient(ctx context.Context, mux *runtime.Serv
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/ParseMarkdown" , runtime . WithHTTPPathPattern ( "/api/v1/markdown / parse") )
annotatedContext , err = runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/ParseMarkdown" , runtime . WithHTTPPathPattern ( "/api/v1/markdown : parse") )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
@ -263,25 +314,47 @@ func RegisterMarkdownServiceHandlerClient(ctx context.Context, mux *runtime.Serv
} )
mux . Handle ( "POST" , pattern_MarkdownService_RestoreMarkdown_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( "POST" , pattern_MarkdownService_RestoreMarkdownNodes_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/RestoreMarkdownNodes" , runtime . WithHTTPPathPattern ( "/api/v1/markdown/node:restore" ) )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
}
resp , md , err := request_MarkdownService_RestoreMarkdownNodes_0 ( annotatedContext , inboundMarshaler , client , req , pathParams )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
}
forward_MarkdownService_RestoreMarkdownNodes_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
mux . Handle ( "POST" , pattern_MarkdownService_StringifyMarkdownNodes_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
var err error
var annotatedContext context . Context
annotatedContext , err = runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/RestoreMarkdown" , runtime . WithHTTPPathPattern ( "/api/v1/markdown:restore" ) )
annotatedContext , err = runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.MarkdownService/ StringifyMarkdownNodes ", runtime . WithHTTPPathPattern ( "/api/v1/markdown /node:stringify ") )
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
}
resp , md , err := request_MarkdownService_RestoreMarkdown_0 ( annotatedContext , inboundMarshaler , client , req , pathParams )
resp , md , err := request_MarkdownService_ StringifyMarkdownNodes _0( annotatedContext , inboundMarshaler , client , req , pathParams )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
}
forward_MarkdownService_RestoreMarkdown_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_MarkdownService_ StringifyMarkdownNodes _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
@ -311,9 +384,11 @@ func RegisterMarkdownServiceHandlerClient(ctx context.Context, mux *runtime.Serv
}
var (
pattern_MarkdownService_ParseMarkdown_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 } , [ ] string { "api" , "v1" , "markdown" , "parse" } , "" ) )
pattern_MarkdownService_ParseMarkdown_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 } , [ ] string { "api" , "v1" , "markdown" } , "parse" ) )
pattern_MarkdownService_RestoreMarkdownNodes_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 } , [ ] string { "api" , "v1" , "markdown" , "node" } , "restore" ) )
pattern_MarkdownService_RestoreMarkdown_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 } , [ ] string { "api" , "v1" , "markdown" } , "restore" ) )
pattern_MarkdownService_ StringifyMarkdownNodes _0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 }, [ ] string { "api" , "v1" , "markdown" , "node" } , "stringify ") )
pattern_MarkdownService_GetLinkMetadata_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 } , [ ] string { "api" , "v1" , "markdown" , "link" } , "metadata" ) )
)
@ -321,7 +396,9 @@ var (
var (
forward_MarkdownService_ParseMarkdown_0 = runtime . ForwardResponseMessage
forward_MarkdownService_RestoreMarkdown_0 = runtime . ForwardResponseMessage
forward_MarkdownService_RestoreMarkdownNodes_0 = runtime . ForwardResponseMessage
forward_MarkdownService_StringifyMarkdownNodes_0 = runtime . ForwardResponseMessage
forward_MarkdownService_GetLinkMetadata_0 = runtime . ForwardResponseMessage
)