|
|
|
|
@ -349,58 +349,6 @@ func local_request_MemoService_DeleteMemo_0(ctx context.Context, marshaler runti
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func request_MemoService_ListMemoProperties_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq ListMemoPropertiesRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
val string
|
|
|
|
|
ok bool
|
|
|
|
|
err error
|
|
|
|
|
_ = err
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val, ok = pathParams["name"]
|
|
|
|
|
if !ok {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := client.ListMemoProperties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func local_request_MemoService_ListMemoProperties_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq ListMemoPropertiesRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
val string
|
|
|
|
|
ok bool
|
|
|
|
|
err error
|
|
|
|
|
_ = err
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val, ok = pathParams["name"]
|
|
|
|
|
if !ok {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := server.ListMemoProperties(ctx, &protoReq)
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func request_MemoService_RebuildMemoProperty_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq RebuildMemoPropertyRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
@ -461,76 +409,6 @@ func local_request_MemoService_RebuildMemoProperty_0(ctx context.Context, marsha
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
filter_MemoService_ListMemoTags_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func request_MemoService_ListMemoTags_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq ListMemoTagsRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
val string
|
|
|
|
|
ok bool
|
|
|
|
|
err error
|
|
|
|
|
_ = err
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val, ok = pathParams["parent"]
|
|
|
|
|
if !ok {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_ListMemoTags_0); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := client.ListMemoTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func local_request_MemoService_ListMemoTags_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq ListMemoTagsRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
val string
|
|
|
|
|
ok bool
|
|
|
|
|
err error
|
|
|
|
|
_ = err
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val, ok = pathParams["parent"]
|
|
|
|
|
if !ok {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_ListMemoTags_0); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := server.ListMemoTags(ctx, &protoReq)
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func request_MemoService_RenameMemoTag_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq RenameMemoTagRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
@ -1338,31 +1216,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoProperties_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.MemoService/ListMemoProperties", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/properties"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := local_request_MemoService_ListMemoProperties_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_MemoService_ListMemoProperties_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("POST", pattern_MemoService_RebuildMemoProperty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
|
@ -1388,31 +1241,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoTags_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.MemoService/ListMemoTags", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := local_request_MemoService_ListMemoTags_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_MemoService_ListMemoTags_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("PATCH", pattern_MemoService_RenameMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
|
@ -1861,28 +1689,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoProperties_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.MemoService/ListMemoProperties", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/properties"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := request_MemoService_ListMemoProperties_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoProperties_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("POST", pattern_MemoService_RebuildMemoProperty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
|
@ -1905,28 +1711,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoTags_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.MemoService/ListMemoTags", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := request_MemoService_ListMemoTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoTags_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("PATCH", pattern_MemoService_RenameMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
|
@ -2185,12 +1969,8 @@ var (
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_DeleteMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_ListMemoProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "properties"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_RebuildMemoProperty_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "properties"}, "rebuild"))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_ListMemoTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "parent", "tags"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_RenameMemoTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "parent", "tags"}, "rename"))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_DeleteMemoTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "memos", "parent", "tags", "tag"}, ""))
|
|
|
|
|
@ -2227,12 +2007,8 @@ var (
|
|
|
|
|
|
|
|
|
|
forward_MemoService_DeleteMemo_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoProperties_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_RebuildMemoProperty_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoTags_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_RenameMemoTag_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_DeleteMemoTag_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|