0.29.1原版
This commit is contained in:
@@ -0,0 +1,698 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: api/v1/memo_service.proto
|
||||
|
||||
package apiv1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/usememos/memos/proto/gen/api/v1"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// MemoServiceName is the fully-qualified name of the MemoService service.
|
||||
MemoServiceName = "memos.api.v1.MemoService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// MemoServiceCreateMemoProcedure is the fully-qualified name of the MemoService's CreateMemo RPC.
|
||||
MemoServiceCreateMemoProcedure = "/memos.api.v1.MemoService/CreateMemo"
|
||||
// MemoServiceListMemosProcedure is the fully-qualified name of the MemoService's ListMemos RPC.
|
||||
MemoServiceListMemosProcedure = "/memos.api.v1.MemoService/ListMemos"
|
||||
// MemoServiceGetMemoProcedure is the fully-qualified name of the MemoService's GetMemo RPC.
|
||||
MemoServiceGetMemoProcedure = "/memos.api.v1.MemoService/GetMemo"
|
||||
// MemoServiceUpdateMemoProcedure is the fully-qualified name of the MemoService's UpdateMemo RPC.
|
||||
MemoServiceUpdateMemoProcedure = "/memos.api.v1.MemoService/UpdateMemo"
|
||||
// MemoServiceDeleteMemoProcedure is the fully-qualified name of the MemoService's DeleteMemo RPC.
|
||||
MemoServiceDeleteMemoProcedure = "/memos.api.v1.MemoService/DeleteMemo"
|
||||
// MemoServiceSetMemoAttachmentsProcedure is the fully-qualified name of the MemoService's
|
||||
// SetMemoAttachments RPC.
|
||||
MemoServiceSetMemoAttachmentsProcedure = "/memos.api.v1.MemoService/SetMemoAttachments"
|
||||
// MemoServiceListMemoAttachmentsProcedure is the fully-qualified name of the MemoService's
|
||||
// ListMemoAttachments RPC.
|
||||
MemoServiceListMemoAttachmentsProcedure = "/memos.api.v1.MemoService/ListMemoAttachments"
|
||||
// MemoServiceSetMemoRelationsProcedure is the fully-qualified name of the MemoService's
|
||||
// SetMemoRelations RPC.
|
||||
MemoServiceSetMemoRelationsProcedure = "/memos.api.v1.MemoService/SetMemoRelations"
|
||||
// MemoServiceListMemoRelationsProcedure is the fully-qualified name of the MemoService's
|
||||
// ListMemoRelations RPC.
|
||||
MemoServiceListMemoRelationsProcedure = "/memos.api.v1.MemoService/ListMemoRelations"
|
||||
// MemoServiceCreateMemoCommentProcedure is the fully-qualified name of the MemoService's
|
||||
// CreateMemoComment RPC.
|
||||
MemoServiceCreateMemoCommentProcedure = "/memos.api.v1.MemoService/CreateMemoComment"
|
||||
// MemoServiceListMemoCommentsProcedure is the fully-qualified name of the MemoService's
|
||||
// ListMemoComments RPC.
|
||||
MemoServiceListMemoCommentsProcedure = "/memos.api.v1.MemoService/ListMemoComments"
|
||||
// MemoServiceListMemoReactionsProcedure is the fully-qualified name of the MemoService's
|
||||
// ListMemoReactions RPC.
|
||||
MemoServiceListMemoReactionsProcedure = "/memos.api.v1.MemoService/ListMemoReactions"
|
||||
// MemoServiceUpsertMemoReactionProcedure is the fully-qualified name of the MemoService's
|
||||
// UpsertMemoReaction RPC.
|
||||
MemoServiceUpsertMemoReactionProcedure = "/memos.api.v1.MemoService/UpsertMemoReaction"
|
||||
// MemoServiceDeleteMemoReactionProcedure is the fully-qualified name of the MemoService's
|
||||
// DeleteMemoReaction RPC.
|
||||
MemoServiceDeleteMemoReactionProcedure = "/memos.api.v1.MemoService/DeleteMemoReaction"
|
||||
// MemoServiceCreateMemoShareProcedure is the fully-qualified name of the MemoService's
|
||||
// CreateMemoShare RPC.
|
||||
MemoServiceCreateMemoShareProcedure = "/memos.api.v1.MemoService/CreateMemoShare"
|
||||
// MemoServiceListMemoSharesProcedure is the fully-qualified name of the MemoService's
|
||||
// ListMemoShares RPC.
|
||||
MemoServiceListMemoSharesProcedure = "/memos.api.v1.MemoService/ListMemoShares"
|
||||
// MemoServiceDeleteMemoShareProcedure is the fully-qualified name of the MemoService's
|
||||
// DeleteMemoShare RPC.
|
||||
MemoServiceDeleteMemoShareProcedure = "/memos.api.v1.MemoService/DeleteMemoShare"
|
||||
// MemoServiceGetMemoByShareProcedure is the fully-qualified name of the MemoService's
|
||||
// GetMemoByShare RPC.
|
||||
MemoServiceGetMemoByShareProcedure = "/memos.api.v1.MemoService/GetMemoByShare"
|
||||
// MemoServiceGetLinkMetadataProcedure is the fully-qualified name of the MemoService's
|
||||
// GetLinkMetadata RPC.
|
||||
MemoServiceGetLinkMetadataProcedure = "/memos.api.v1.MemoService/GetLinkMetadata"
|
||||
// MemoServiceBatchGetLinkMetadataProcedure is the fully-qualified name of the MemoService's
|
||||
// BatchGetLinkMetadata RPC.
|
||||
MemoServiceBatchGetLinkMetadataProcedure = "/memos.api.v1.MemoService/BatchGetLinkMetadata"
|
||||
)
|
||||
|
||||
// MemoServiceClient is a client for the memos.api.v1.MemoService service.
|
||||
type MemoServiceClient interface {
|
||||
// CreateMemo creates a memo.
|
||||
CreateMemo(context.Context, *connect.Request[v1.CreateMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// ListMemos lists memos with pagination and filter.
|
||||
ListMemos(context.Context, *connect.Request[v1.ListMemosRequest]) (*connect.Response[v1.ListMemosResponse], error)
|
||||
// GetMemo gets a memo.
|
||||
GetMemo(context.Context, *connect.Request[v1.GetMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// UpdateMemo updates a memo.
|
||||
UpdateMemo(context.Context, *connect.Request[v1.UpdateMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// DeleteMemo deletes a memo.
|
||||
DeleteMemo(context.Context, *connect.Request[v1.DeleteMemoRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// SetMemoAttachments sets attachments for a memo.
|
||||
SetMemoAttachments(context.Context, *connect.Request[v1.SetMemoAttachmentsRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// ListMemoAttachments lists attachments for a memo.
|
||||
ListMemoAttachments(context.Context, *connect.Request[v1.ListMemoAttachmentsRequest]) (*connect.Response[v1.ListMemoAttachmentsResponse], error)
|
||||
// SetMemoRelations sets relations for a memo.
|
||||
SetMemoRelations(context.Context, *connect.Request[v1.SetMemoRelationsRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// ListMemoRelations lists relations for a memo.
|
||||
ListMemoRelations(context.Context, *connect.Request[v1.ListMemoRelationsRequest]) (*connect.Response[v1.ListMemoRelationsResponse], error)
|
||||
// CreateMemoComment creates a comment for a memo.
|
||||
CreateMemoComment(context.Context, *connect.Request[v1.CreateMemoCommentRequest]) (*connect.Response[v1.Memo], error)
|
||||
// ListMemoComments lists comments for a memo.
|
||||
ListMemoComments(context.Context, *connect.Request[v1.ListMemoCommentsRequest]) (*connect.Response[v1.ListMemoCommentsResponse], error)
|
||||
// ListMemoReactions lists reactions for a memo.
|
||||
ListMemoReactions(context.Context, *connect.Request[v1.ListMemoReactionsRequest]) (*connect.Response[v1.ListMemoReactionsResponse], error)
|
||||
// UpsertMemoReaction upserts a reaction for a memo.
|
||||
UpsertMemoReaction(context.Context, *connect.Request[v1.UpsertMemoReactionRequest]) (*connect.Response[v1.Reaction], error)
|
||||
// DeleteMemoReaction deletes a reaction for a memo.
|
||||
DeleteMemoReaction(context.Context, *connect.Request[v1.DeleteMemoReactionRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// CreateMemoShare creates a share link for a memo. Requires authentication as the memo creator.
|
||||
CreateMemoShare(context.Context, *connect.Request[v1.CreateMemoShareRequest]) (*connect.Response[v1.MemoShare], error)
|
||||
// ListMemoShares lists all share links for a memo. Requires authentication as the memo creator.
|
||||
ListMemoShares(context.Context, *connect.Request[v1.ListMemoSharesRequest]) (*connect.Response[v1.ListMemoSharesResponse], error)
|
||||
// DeleteMemoShare revokes a share link. Requires authentication as the memo creator.
|
||||
DeleteMemoShare(context.Context, *connect.Request[v1.DeleteMemoShareRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// GetMemoByShare resolves a share token to its memo. No authentication required.
|
||||
// Returns NOT_FOUND if the token is invalid or expired.
|
||||
GetMemoByShare(context.Context, *connect.Request[v1.GetMemoByShareRequest]) (*connect.Response[v1.Memo], error)
|
||||
// GetLinkMetadata gets metadata for a link.
|
||||
GetLinkMetadata(context.Context, *connect.Request[v1.GetLinkMetadataRequest]) (*connect.Response[v1.LinkMetadata], error)
|
||||
// BatchGetLinkMetadata gets metadata for links.
|
||||
BatchGetLinkMetadata(context.Context, *connect.Request[v1.BatchGetLinkMetadataRequest]) (*connect.Response[v1.BatchGetLinkMetadataResponse], error)
|
||||
}
|
||||
|
||||
// NewMemoServiceClient constructs a client for the memos.api.v1.MemoService service. By default, it
|
||||
// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
|
||||
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
||||
// connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewMemoServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MemoServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
memoServiceMethods := v1.File_api_v1_memo_service_proto.Services().ByName("MemoService").Methods()
|
||||
return &memoServiceClient{
|
||||
createMemo: connect.NewClient[v1.CreateMemoRequest, v1.Memo](
|
||||
httpClient,
|
||||
baseURL+MemoServiceCreateMemoProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemos: connect.NewClient[v1.ListMemosRequest, v1.ListMemosResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemosProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemos")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getMemo: connect.NewClient[v1.GetMemoRequest, v1.Memo](
|
||||
httpClient,
|
||||
baseURL+MemoServiceGetMemoProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetMemo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
updateMemo: connect.NewClient[v1.UpdateMemoRequest, v1.Memo](
|
||||
httpClient,
|
||||
baseURL+MemoServiceUpdateMemoProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("UpdateMemo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteMemo: connect.NewClient[v1.DeleteMemoRequest, emptypb.Empty](
|
||||
httpClient,
|
||||
baseURL+MemoServiceDeleteMemoProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setMemoAttachments: connect.NewClient[v1.SetMemoAttachmentsRequest, emptypb.Empty](
|
||||
httpClient,
|
||||
baseURL+MemoServiceSetMemoAttachmentsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("SetMemoAttachments")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemoAttachments: connect.NewClient[v1.ListMemoAttachmentsRequest, v1.ListMemoAttachmentsResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemoAttachmentsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoAttachments")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setMemoRelations: connect.NewClient[v1.SetMemoRelationsRequest, emptypb.Empty](
|
||||
httpClient,
|
||||
baseURL+MemoServiceSetMemoRelationsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("SetMemoRelations")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemoRelations: connect.NewClient[v1.ListMemoRelationsRequest, v1.ListMemoRelationsResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemoRelationsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoRelations")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
createMemoComment: connect.NewClient[v1.CreateMemoCommentRequest, v1.Memo](
|
||||
httpClient,
|
||||
baseURL+MemoServiceCreateMemoCommentProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemoComment")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemoComments: connect.NewClient[v1.ListMemoCommentsRequest, v1.ListMemoCommentsResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemoCommentsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoComments")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemoReactions: connect.NewClient[v1.ListMemoReactionsRequest, v1.ListMemoReactionsResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemoReactionsProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoReactions")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
upsertMemoReaction: connect.NewClient[v1.UpsertMemoReactionRequest, v1.Reaction](
|
||||
httpClient,
|
||||
baseURL+MemoServiceUpsertMemoReactionProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("UpsertMemoReaction")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteMemoReaction: connect.NewClient[v1.DeleteMemoReactionRequest, emptypb.Empty](
|
||||
httpClient,
|
||||
baseURL+MemoServiceDeleteMemoReactionProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemoReaction")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
createMemoShare: connect.NewClient[v1.CreateMemoShareRequest, v1.MemoShare](
|
||||
httpClient,
|
||||
baseURL+MemoServiceCreateMemoShareProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemoShare")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listMemoShares: connect.NewClient[v1.ListMemoSharesRequest, v1.ListMemoSharesResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceListMemoSharesProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoShares")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteMemoShare: connect.NewClient[v1.DeleteMemoShareRequest, emptypb.Empty](
|
||||
httpClient,
|
||||
baseURL+MemoServiceDeleteMemoShareProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemoShare")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getMemoByShare: connect.NewClient[v1.GetMemoByShareRequest, v1.Memo](
|
||||
httpClient,
|
||||
baseURL+MemoServiceGetMemoByShareProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetMemoByShare")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getLinkMetadata: connect.NewClient[v1.GetLinkMetadataRequest, v1.LinkMetadata](
|
||||
httpClient,
|
||||
baseURL+MemoServiceGetLinkMetadataProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetLinkMetadata")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
batchGetLinkMetadata: connect.NewClient[v1.BatchGetLinkMetadataRequest, v1.BatchGetLinkMetadataResponse](
|
||||
httpClient,
|
||||
baseURL+MemoServiceBatchGetLinkMetadataProcedure,
|
||||
connect.WithSchema(memoServiceMethods.ByName("BatchGetLinkMetadata")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// memoServiceClient implements MemoServiceClient.
|
||||
type memoServiceClient struct {
|
||||
createMemo *connect.Client[v1.CreateMemoRequest, v1.Memo]
|
||||
listMemos *connect.Client[v1.ListMemosRequest, v1.ListMemosResponse]
|
||||
getMemo *connect.Client[v1.GetMemoRequest, v1.Memo]
|
||||
updateMemo *connect.Client[v1.UpdateMemoRequest, v1.Memo]
|
||||
deleteMemo *connect.Client[v1.DeleteMemoRequest, emptypb.Empty]
|
||||
setMemoAttachments *connect.Client[v1.SetMemoAttachmentsRequest, emptypb.Empty]
|
||||
listMemoAttachments *connect.Client[v1.ListMemoAttachmentsRequest, v1.ListMemoAttachmentsResponse]
|
||||
setMemoRelations *connect.Client[v1.SetMemoRelationsRequest, emptypb.Empty]
|
||||
listMemoRelations *connect.Client[v1.ListMemoRelationsRequest, v1.ListMemoRelationsResponse]
|
||||
createMemoComment *connect.Client[v1.CreateMemoCommentRequest, v1.Memo]
|
||||
listMemoComments *connect.Client[v1.ListMemoCommentsRequest, v1.ListMemoCommentsResponse]
|
||||
listMemoReactions *connect.Client[v1.ListMemoReactionsRequest, v1.ListMemoReactionsResponse]
|
||||
upsertMemoReaction *connect.Client[v1.UpsertMemoReactionRequest, v1.Reaction]
|
||||
deleteMemoReaction *connect.Client[v1.DeleteMemoReactionRequest, emptypb.Empty]
|
||||
createMemoShare *connect.Client[v1.CreateMemoShareRequest, v1.MemoShare]
|
||||
listMemoShares *connect.Client[v1.ListMemoSharesRequest, v1.ListMemoSharesResponse]
|
||||
deleteMemoShare *connect.Client[v1.DeleteMemoShareRequest, emptypb.Empty]
|
||||
getMemoByShare *connect.Client[v1.GetMemoByShareRequest, v1.Memo]
|
||||
getLinkMetadata *connect.Client[v1.GetLinkMetadataRequest, v1.LinkMetadata]
|
||||
batchGetLinkMetadata *connect.Client[v1.BatchGetLinkMetadataRequest, v1.BatchGetLinkMetadataResponse]
|
||||
}
|
||||
|
||||
// CreateMemo calls memos.api.v1.MemoService.CreateMemo.
|
||||
func (c *memoServiceClient) CreateMemo(ctx context.Context, req *connect.Request[v1.CreateMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return c.createMemo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemos calls memos.api.v1.MemoService.ListMemos.
|
||||
func (c *memoServiceClient) ListMemos(ctx context.Context, req *connect.Request[v1.ListMemosRequest]) (*connect.Response[v1.ListMemosResponse], error) {
|
||||
return c.listMemos.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetMemo calls memos.api.v1.MemoService.GetMemo.
|
||||
func (c *memoServiceClient) GetMemo(ctx context.Context, req *connect.Request[v1.GetMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return c.getMemo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateMemo calls memos.api.v1.MemoService.UpdateMemo.
|
||||
func (c *memoServiceClient) UpdateMemo(ctx context.Context, req *connect.Request[v1.UpdateMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return c.updateMemo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteMemo calls memos.api.v1.MemoService.DeleteMemo.
|
||||
func (c *memoServiceClient) DeleteMemo(ctx context.Context, req *connect.Request[v1.DeleteMemoRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return c.deleteMemo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetMemoAttachments calls memos.api.v1.MemoService.SetMemoAttachments.
|
||||
func (c *memoServiceClient) SetMemoAttachments(ctx context.Context, req *connect.Request[v1.SetMemoAttachmentsRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return c.setMemoAttachments.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemoAttachments calls memos.api.v1.MemoService.ListMemoAttachments.
|
||||
func (c *memoServiceClient) ListMemoAttachments(ctx context.Context, req *connect.Request[v1.ListMemoAttachmentsRequest]) (*connect.Response[v1.ListMemoAttachmentsResponse], error) {
|
||||
return c.listMemoAttachments.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetMemoRelations calls memos.api.v1.MemoService.SetMemoRelations.
|
||||
func (c *memoServiceClient) SetMemoRelations(ctx context.Context, req *connect.Request[v1.SetMemoRelationsRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return c.setMemoRelations.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemoRelations calls memos.api.v1.MemoService.ListMemoRelations.
|
||||
func (c *memoServiceClient) ListMemoRelations(ctx context.Context, req *connect.Request[v1.ListMemoRelationsRequest]) (*connect.Response[v1.ListMemoRelationsResponse], error) {
|
||||
return c.listMemoRelations.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CreateMemoComment calls memos.api.v1.MemoService.CreateMemoComment.
|
||||
func (c *memoServiceClient) CreateMemoComment(ctx context.Context, req *connect.Request[v1.CreateMemoCommentRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return c.createMemoComment.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemoComments calls memos.api.v1.MemoService.ListMemoComments.
|
||||
func (c *memoServiceClient) ListMemoComments(ctx context.Context, req *connect.Request[v1.ListMemoCommentsRequest]) (*connect.Response[v1.ListMemoCommentsResponse], error) {
|
||||
return c.listMemoComments.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemoReactions calls memos.api.v1.MemoService.ListMemoReactions.
|
||||
func (c *memoServiceClient) ListMemoReactions(ctx context.Context, req *connect.Request[v1.ListMemoReactionsRequest]) (*connect.Response[v1.ListMemoReactionsResponse], error) {
|
||||
return c.listMemoReactions.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpsertMemoReaction calls memos.api.v1.MemoService.UpsertMemoReaction.
|
||||
func (c *memoServiceClient) UpsertMemoReaction(ctx context.Context, req *connect.Request[v1.UpsertMemoReactionRequest]) (*connect.Response[v1.Reaction], error) {
|
||||
return c.upsertMemoReaction.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteMemoReaction calls memos.api.v1.MemoService.DeleteMemoReaction.
|
||||
func (c *memoServiceClient) DeleteMemoReaction(ctx context.Context, req *connect.Request[v1.DeleteMemoReactionRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return c.deleteMemoReaction.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CreateMemoShare calls memos.api.v1.MemoService.CreateMemoShare.
|
||||
func (c *memoServiceClient) CreateMemoShare(ctx context.Context, req *connect.Request[v1.CreateMemoShareRequest]) (*connect.Response[v1.MemoShare], error) {
|
||||
return c.createMemoShare.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListMemoShares calls memos.api.v1.MemoService.ListMemoShares.
|
||||
func (c *memoServiceClient) ListMemoShares(ctx context.Context, req *connect.Request[v1.ListMemoSharesRequest]) (*connect.Response[v1.ListMemoSharesResponse], error) {
|
||||
return c.listMemoShares.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteMemoShare calls memos.api.v1.MemoService.DeleteMemoShare.
|
||||
func (c *memoServiceClient) DeleteMemoShare(ctx context.Context, req *connect.Request[v1.DeleteMemoShareRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return c.deleteMemoShare.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetMemoByShare calls memos.api.v1.MemoService.GetMemoByShare.
|
||||
func (c *memoServiceClient) GetMemoByShare(ctx context.Context, req *connect.Request[v1.GetMemoByShareRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return c.getMemoByShare.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetLinkMetadata calls memos.api.v1.MemoService.GetLinkMetadata.
|
||||
func (c *memoServiceClient) GetLinkMetadata(ctx context.Context, req *connect.Request[v1.GetLinkMetadataRequest]) (*connect.Response[v1.LinkMetadata], error) {
|
||||
return c.getLinkMetadata.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// BatchGetLinkMetadata calls memos.api.v1.MemoService.BatchGetLinkMetadata.
|
||||
func (c *memoServiceClient) BatchGetLinkMetadata(ctx context.Context, req *connect.Request[v1.BatchGetLinkMetadataRequest]) (*connect.Response[v1.BatchGetLinkMetadataResponse], error) {
|
||||
return c.batchGetLinkMetadata.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// MemoServiceHandler is an implementation of the memos.api.v1.MemoService service.
|
||||
type MemoServiceHandler interface {
|
||||
// CreateMemo creates a memo.
|
||||
CreateMemo(context.Context, *connect.Request[v1.CreateMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// ListMemos lists memos with pagination and filter.
|
||||
ListMemos(context.Context, *connect.Request[v1.ListMemosRequest]) (*connect.Response[v1.ListMemosResponse], error)
|
||||
// GetMemo gets a memo.
|
||||
GetMemo(context.Context, *connect.Request[v1.GetMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// UpdateMemo updates a memo.
|
||||
UpdateMemo(context.Context, *connect.Request[v1.UpdateMemoRequest]) (*connect.Response[v1.Memo], error)
|
||||
// DeleteMemo deletes a memo.
|
||||
DeleteMemo(context.Context, *connect.Request[v1.DeleteMemoRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// SetMemoAttachments sets attachments for a memo.
|
||||
SetMemoAttachments(context.Context, *connect.Request[v1.SetMemoAttachmentsRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// ListMemoAttachments lists attachments for a memo.
|
||||
ListMemoAttachments(context.Context, *connect.Request[v1.ListMemoAttachmentsRequest]) (*connect.Response[v1.ListMemoAttachmentsResponse], error)
|
||||
// SetMemoRelations sets relations for a memo.
|
||||
SetMemoRelations(context.Context, *connect.Request[v1.SetMemoRelationsRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// ListMemoRelations lists relations for a memo.
|
||||
ListMemoRelations(context.Context, *connect.Request[v1.ListMemoRelationsRequest]) (*connect.Response[v1.ListMemoRelationsResponse], error)
|
||||
// CreateMemoComment creates a comment for a memo.
|
||||
CreateMemoComment(context.Context, *connect.Request[v1.CreateMemoCommentRequest]) (*connect.Response[v1.Memo], error)
|
||||
// ListMemoComments lists comments for a memo.
|
||||
ListMemoComments(context.Context, *connect.Request[v1.ListMemoCommentsRequest]) (*connect.Response[v1.ListMemoCommentsResponse], error)
|
||||
// ListMemoReactions lists reactions for a memo.
|
||||
ListMemoReactions(context.Context, *connect.Request[v1.ListMemoReactionsRequest]) (*connect.Response[v1.ListMemoReactionsResponse], error)
|
||||
// UpsertMemoReaction upserts a reaction for a memo.
|
||||
UpsertMemoReaction(context.Context, *connect.Request[v1.UpsertMemoReactionRequest]) (*connect.Response[v1.Reaction], error)
|
||||
// DeleteMemoReaction deletes a reaction for a memo.
|
||||
DeleteMemoReaction(context.Context, *connect.Request[v1.DeleteMemoReactionRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// CreateMemoShare creates a share link for a memo. Requires authentication as the memo creator.
|
||||
CreateMemoShare(context.Context, *connect.Request[v1.CreateMemoShareRequest]) (*connect.Response[v1.MemoShare], error)
|
||||
// ListMemoShares lists all share links for a memo. Requires authentication as the memo creator.
|
||||
ListMemoShares(context.Context, *connect.Request[v1.ListMemoSharesRequest]) (*connect.Response[v1.ListMemoSharesResponse], error)
|
||||
// DeleteMemoShare revokes a share link. Requires authentication as the memo creator.
|
||||
DeleteMemoShare(context.Context, *connect.Request[v1.DeleteMemoShareRequest]) (*connect.Response[emptypb.Empty], error)
|
||||
// GetMemoByShare resolves a share token to its memo. No authentication required.
|
||||
// Returns NOT_FOUND if the token is invalid or expired.
|
||||
GetMemoByShare(context.Context, *connect.Request[v1.GetMemoByShareRequest]) (*connect.Response[v1.Memo], error)
|
||||
// GetLinkMetadata gets metadata for a link.
|
||||
GetLinkMetadata(context.Context, *connect.Request[v1.GetLinkMetadataRequest]) (*connect.Response[v1.LinkMetadata], error)
|
||||
// BatchGetLinkMetadata gets metadata for links.
|
||||
BatchGetLinkMetadata(context.Context, *connect.Request[v1.BatchGetLinkMetadataRequest]) (*connect.Response[v1.BatchGetLinkMetadataResponse], error)
|
||||
}
|
||||
|
||||
// NewMemoServiceHandler builds an HTTP handler from the service implementation. It returns the path
|
||||
// on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewMemoServiceHandler(svc MemoServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
memoServiceMethods := v1.File_api_v1_memo_service_proto.Services().ByName("MemoService").Methods()
|
||||
memoServiceCreateMemoHandler := connect.NewUnaryHandler(
|
||||
MemoServiceCreateMemoProcedure,
|
||||
svc.CreateMemo,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemosHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemosProcedure,
|
||||
svc.ListMemos,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemos")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceGetMemoHandler := connect.NewUnaryHandler(
|
||||
MemoServiceGetMemoProcedure,
|
||||
svc.GetMemo,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetMemo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceUpdateMemoHandler := connect.NewUnaryHandler(
|
||||
MemoServiceUpdateMemoProcedure,
|
||||
svc.UpdateMemo,
|
||||
connect.WithSchema(memoServiceMethods.ByName("UpdateMemo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceDeleteMemoHandler := connect.NewUnaryHandler(
|
||||
MemoServiceDeleteMemoProcedure,
|
||||
svc.DeleteMemo,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceSetMemoAttachmentsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceSetMemoAttachmentsProcedure,
|
||||
svc.SetMemoAttachments,
|
||||
connect.WithSchema(memoServiceMethods.ByName("SetMemoAttachments")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemoAttachmentsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemoAttachmentsProcedure,
|
||||
svc.ListMemoAttachments,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoAttachments")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceSetMemoRelationsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceSetMemoRelationsProcedure,
|
||||
svc.SetMemoRelations,
|
||||
connect.WithSchema(memoServiceMethods.ByName("SetMemoRelations")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemoRelationsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemoRelationsProcedure,
|
||||
svc.ListMemoRelations,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoRelations")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceCreateMemoCommentHandler := connect.NewUnaryHandler(
|
||||
MemoServiceCreateMemoCommentProcedure,
|
||||
svc.CreateMemoComment,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemoComment")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemoCommentsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemoCommentsProcedure,
|
||||
svc.ListMemoComments,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoComments")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemoReactionsHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemoReactionsProcedure,
|
||||
svc.ListMemoReactions,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoReactions")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceUpsertMemoReactionHandler := connect.NewUnaryHandler(
|
||||
MemoServiceUpsertMemoReactionProcedure,
|
||||
svc.UpsertMemoReaction,
|
||||
connect.WithSchema(memoServiceMethods.ByName("UpsertMemoReaction")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceDeleteMemoReactionHandler := connect.NewUnaryHandler(
|
||||
MemoServiceDeleteMemoReactionProcedure,
|
||||
svc.DeleteMemoReaction,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemoReaction")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceCreateMemoShareHandler := connect.NewUnaryHandler(
|
||||
MemoServiceCreateMemoShareProcedure,
|
||||
svc.CreateMemoShare,
|
||||
connect.WithSchema(memoServiceMethods.ByName("CreateMemoShare")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceListMemoSharesHandler := connect.NewUnaryHandler(
|
||||
MemoServiceListMemoSharesProcedure,
|
||||
svc.ListMemoShares,
|
||||
connect.WithSchema(memoServiceMethods.ByName("ListMemoShares")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceDeleteMemoShareHandler := connect.NewUnaryHandler(
|
||||
MemoServiceDeleteMemoShareProcedure,
|
||||
svc.DeleteMemoShare,
|
||||
connect.WithSchema(memoServiceMethods.ByName("DeleteMemoShare")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceGetMemoByShareHandler := connect.NewUnaryHandler(
|
||||
MemoServiceGetMemoByShareProcedure,
|
||||
svc.GetMemoByShare,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetMemoByShare")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceGetLinkMetadataHandler := connect.NewUnaryHandler(
|
||||
MemoServiceGetLinkMetadataProcedure,
|
||||
svc.GetLinkMetadata,
|
||||
connect.WithSchema(memoServiceMethods.ByName("GetLinkMetadata")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
memoServiceBatchGetLinkMetadataHandler := connect.NewUnaryHandler(
|
||||
MemoServiceBatchGetLinkMetadataProcedure,
|
||||
svc.BatchGetLinkMetadata,
|
||||
connect.WithSchema(memoServiceMethods.ByName("BatchGetLinkMetadata")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/memos.api.v1.MemoService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case MemoServiceCreateMemoProcedure:
|
||||
memoServiceCreateMemoHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemosProcedure:
|
||||
memoServiceListMemosHandler.ServeHTTP(w, r)
|
||||
case MemoServiceGetMemoProcedure:
|
||||
memoServiceGetMemoHandler.ServeHTTP(w, r)
|
||||
case MemoServiceUpdateMemoProcedure:
|
||||
memoServiceUpdateMemoHandler.ServeHTTP(w, r)
|
||||
case MemoServiceDeleteMemoProcedure:
|
||||
memoServiceDeleteMemoHandler.ServeHTTP(w, r)
|
||||
case MemoServiceSetMemoAttachmentsProcedure:
|
||||
memoServiceSetMemoAttachmentsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemoAttachmentsProcedure:
|
||||
memoServiceListMemoAttachmentsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceSetMemoRelationsProcedure:
|
||||
memoServiceSetMemoRelationsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemoRelationsProcedure:
|
||||
memoServiceListMemoRelationsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceCreateMemoCommentProcedure:
|
||||
memoServiceCreateMemoCommentHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemoCommentsProcedure:
|
||||
memoServiceListMemoCommentsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemoReactionsProcedure:
|
||||
memoServiceListMemoReactionsHandler.ServeHTTP(w, r)
|
||||
case MemoServiceUpsertMemoReactionProcedure:
|
||||
memoServiceUpsertMemoReactionHandler.ServeHTTP(w, r)
|
||||
case MemoServiceDeleteMemoReactionProcedure:
|
||||
memoServiceDeleteMemoReactionHandler.ServeHTTP(w, r)
|
||||
case MemoServiceCreateMemoShareProcedure:
|
||||
memoServiceCreateMemoShareHandler.ServeHTTP(w, r)
|
||||
case MemoServiceListMemoSharesProcedure:
|
||||
memoServiceListMemoSharesHandler.ServeHTTP(w, r)
|
||||
case MemoServiceDeleteMemoShareProcedure:
|
||||
memoServiceDeleteMemoShareHandler.ServeHTTP(w, r)
|
||||
case MemoServiceGetMemoByShareProcedure:
|
||||
memoServiceGetMemoByShareHandler.ServeHTTP(w, r)
|
||||
case MemoServiceGetLinkMetadataProcedure:
|
||||
memoServiceGetLinkMetadataHandler.ServeHTTP(w, r)
|
||||
case MemoServiceBatchGetLinkMetadataProcedure:
|
||||
memoServiceBatchGetLinkMetadataHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedMemoServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedMemoServiceHandler struct{}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) CreateMemo(context.Context, *connect.Request[v1.CreateMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.CreateMemo is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemos(context.Context, *connect.Request[v1.ListMemosRequest]) (*connect.Response[v1.ListMemosResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemos is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) GetMemo(context.Context, *connect.Request[v1.GetMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.GetMemo is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) UpdateMemo(context.Context, *connect.Request[v1.UpdateMemoRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.UpdateMemo is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) DeleteMemo(context.Context, *connect.Request[v1.DeleteMemoRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.DeleteMemo is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) SetMemoAttachments(context.Context, *connect.Request[v1.SetMemoAttachmentsRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.SetMemoAttachments is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemoAttachments(context.Context, *connect.Request[v1.ListMemoAttachmentsRequest]) (*connect.Response[v1.ListMemoAttachmentsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemoAttachments is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) SetMemoRelations(context.Context, *connect.Request[v1.SetMemoRelationsRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.SetMemoRelations is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemoRelations(context.Context, *connect.Request[v1.ListMemoRelationsRequest]) (*connect.Response[v1.ListMemoRelationsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemoRelations is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) CreateMemoComment(context.Context, *connect.Request[v1.CreateMemoCommentRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.CreateMemoComment is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemoComments(context.Context, *connect.Request[v1.ListMemoCommentsRequest]) (*connect.Response[v1.ListMemoCommentsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemoComments is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemoReactions(context.Context, *connect.Request[v1.ListMemoReactionsRequest]) (*connect.Response[v1.ListMemoReactionsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemoReactions is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) UpsertMemoReaction(context.Context, *connect.Request[v1.UpsertMemoReactionRequest]) (*connect.Response[v1.Reaction], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.UpsertMemoReaction is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) DeleteMemoReaction(context.Context, *connect.Request[v1.DeleteMemoReactionRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.DeleteMemoReaction is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) CreateMemoShare(context.Context, *connect.Request[v1.CreateMemoShareRequest]) (*connect.Response[v1.MemoShare], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.CreateMemoShare is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) ListMemoShares(context.Context, *connect.Request[v1.ListMemoSharesRequest]) (*connect.Response[v1.ListMemoSharesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.ListMemoShares is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) DeleteMemoShare(context.Context, *connect.Request[v1.DeleteMemoShareRequest]) (*connect.Response[emptypb.Empty], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.DeleteMemoShare is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) GetMemoByShare(context.Context, *connect.Request[v1.GetMemoByShareRequest]) (*connect.Response[v1.Memo], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.GetMemoByShare is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) GetLinkMetadata(context.Context, *connect.Request[v1.GetLinkMetadataRequest]) (*connect.Response[v1.LinkMetadata], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.GetLinkMetadata is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedMemoServiceHandler) BatchGetLinkMetadata(context.Context, *connect.Request[v1.BatchGetLinkMetadataRequest]) (*connect.Response[v1.BatchGetLinkMetadataResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("memos.api.v1.MemoService.BatchGetLinkMetadata is not implemented"))
|
||||
}
|
||||
Reference in New Issue
Block a user