|
|
|
@ -1043,42 +1043,6 @@ func local_request_MemoService_ListMemoComments_0(ctx context.Context, marshaler
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
filter_MemoService_GetUserMemosStats_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func request_MemoService_GetUserMemosStats_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq GetUserMemosStatsRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_GetUserMemosStats_0); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := client.GetUserMemosStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func local_request_MemoService_GetUserMemosStats_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq GetUserMemosStatsRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_GetUserMemosStats_0); err != nil {
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msg, err := server.GetUserMemosStats(ctx, &protoReq)
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func request_MemoService_ListMemoReactions_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
var protoReq ListMemoReactionsRequest
|
|
|
|
|
var metadata runtime.ServerMetadata
|
|
|
|
@ -1699,31 +1663,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_GetUserMemosStats_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/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v1/memos/stats"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := local_request_MemoService_GetUserMemosStats_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_GetUserMemosStats_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoReactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
@ -2236,28 +2175,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_GetUserMemosStats_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/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v1/memos/stats"))
|
|
|
|
|
if err != nil {
|
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
resp, md, err := request_MemoService_GetUserMemosStats_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_GetUserMemosStats_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
mux.Handle("GET", pattern_MemoService_ListMemoReactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
|
|
|
defer cancel()
|
|
|
|
@ -2364,8 +2281,6 @@ var (
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_ListMemoComments_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", "comments"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_GetUserMemosStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "memos", "stats"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_ListMemoReactions_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", "reactions"}, ""))
|
|
|
|
|
|
|
|
|
|
pattern_MemoService_UpsertMemoReaction_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", "reactions"}, ""))
|
|
|
|
@ -2410,8 +2325,6 @@ var (
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoComments_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_GetUserMemosStats_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_ListMemoReactions_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
|
|
forward_MemoService_UpsertMemoReaction_0 = runtime.ForwardResponseMessage
|
|
|
|
|