Commit 797f5a12 authored by Steven's avatar Steven

feat: add `HasIncompleteTasks` to memo property

parent f0817f27
...@@ -2197,8 +2197,7 @@ definitions: ...@@ -2197,8 +2197,7 @@ definitions:
Note: this functionality is not currently available in the official Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server type.googleapis.com.
implementations and no plans to implement one.
Schemes other than `http`, `https` (or the empty scheme) might be Schemes other than `http`, `https` (or the empty scheme) might be
used with implementation specific semantics. used with implementation specific semantics.
...@@ -2233,7 +2232,7 @@ definitions: ...@@ -2233,7 +2232,7 @@ definitions:
foo = any.unpack(Foo.getDefaultInstance()); foo = any.unpack(Foo.getDefaultInstance());
} }
Example 3: Pack and unpack a message in Python. Example 3: Pack and unpack a message in Python.
foo = Foo(...) foo = Foo(...)
any = Any() any = Any()
...@@ -2243,7 +2242,7 @@ definitions: ...@@ -2243,7 +2242,7 @@ definitions:
any.Unpack(foo) any.Unpack(foo)
... ...
Example 4: Pack and unpack a message in Go Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...} foo := &pb.Foo{...}
any, err := anypb.New(foo) any, err := anypb.New(foo)
...@@ -2263,7 +2262,7 @@ definitions: ...@@ -2263,7 +2262,7 @@ definitions:
name "y.z". name "y.z".
JSON JSON
====
The JSON representation of an `Any` value uses the regular The JSON representation of an `Any` value uses the regular
representation of the deserialized, embedded message, with an representation of the deserialized, embedded message, with an
additional field `@type` which contains the type URL. Example: additional field `@type` which contains the type URL. Example:
...@@ -2709,6 +2708,8 @@ definitions: ...@@ -2709,6 +2708,8 @@ definitions:
type: boolean type: boolean
hasCode: hasCode:
type: boolean type: boolean
hasIncompleteTasks:
type: boolean
v1MemoRelation: v1MemoRelation:
type: object type: object
properties: properties:
......
...@@ -208,6 +208,7 @@ message MemoProperty { ...@@ -208,6 +208,7 @@ message MemoProperty {
bool has_link = 2; bool has_link = 2;
bool has_task_list = 3; bool has_task_list = 3;
bool has_code = 4; bool has_code = 4;
bool has_incomplete_tasks = 5;
} }
message CreateMemoRequest { message CreateMemoRequest {
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/activity_service.proto // source: api/v1/activity_service.proto
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
ActivityService_GetActivity_FullMethodName = "/memos.api.v1.ActivityService/GetActivity" ActivityService_GetActivity_FullMethodName = "/memos.api.v1.ActivityService/GetActivity"
...@@ -39,8 +39,9 @@ func NewActivityServiceClient(cc grpc.ClientConnInterface) ActivityServiceClient ...@@ -39,8 +39,9 @@ func NewActivityServiceClient(cc grpc.ClientConnInterface) ActivityServiceClient
} }
func (c *activityServiceClient) GetActivity(ctx context.Context, in *GetActivityRequest, opts ...grpc.CallOption) (*Activity, error) { func (c *activityServiceClient) GetActivity(ctx context.Context, in *GetActivityRequest, opts ...grpc.CallOption) (*Activity, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Activity) out := new(Activity)
err := c.cc.Invoke(ctx, ActivityService_GetActivity_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ActivityService_GetActivity_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/auth_service.proto // source: api/v1/auth_service.proto
...@@ -16,8 +16,8 @@ import ( ...@@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
AuthService_GetAuthStatus_FullMethodName = "/memos.api.v1.AuthService/GetAuthStatus" AuthService_GetAuthStatus_FullMethodName = "/memos.api.v1.AuthService/GetAuthStatus"
...@@ -52,8 +52,9 @@ func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { ...@@ -52,8 +52,9 @@ func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
} }
func (c *authServiceClient) GetAuthStatus(ctx context.Context, in *GetAuthStatusRequest, opts ...grpc.CallOption) (*User, error) { func (c *authServiceClient) GetAuthStatus(ctx context.Context, in *GetAuthStatusRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, AuthService_GetAuthStatus_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, AuthService_GetAuthStatus_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -61,8 +62,9 @@ func (c *authServiceClient) GetAuthStatus(ctx context.Context, in *GetAuthStatus ...@@ -61,8 +62,9 @@ func (c *authServiceClient) GetAuthStatus(ctx context.Context, in *GetAuthStatus
} }
func (c *authServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*User, error) { func (c *authServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, AuthService_SignIn_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, AuthService_SignIn_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -70,8 +72,9 @@ func (c *authServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...@@ -70,8 +72,9 @@ func (c *authServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts
} }
func (c *authServiceClient) SignInWithSSO(ctx context.Context, in *SignInWithSSORequest, opts ...grpc.CallOption) (*User, error) { func (c *authServiceClient) SignInWithSSO(ctx context.Context, in *SignInWithSSORequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, AuthService_SignInWithSSO_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, AuthService_SignInWithSSO_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -79,8 +82,9 @@ func (c *authServiceClient) SignInWithSSO(ctx context.Context, in *SignInWithSSO ...@@ -79,8 +82,9 @@ func (c *authServiceClient) SignInWithSSO(ctx context.Context, in *SignInWithSSO
} }
func (c *authServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*User, error) { func (c *authServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, AuthService_SignUp_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, AuthService_SignUp_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -88,8 +92,9 @@ func (c *authServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...@@ -88,8 +92,9 @@ func (c *authServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts
} }
func (c *authServiceClient) SignOut(ctx context.Context, in *SignOutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *authServiceClient) SignOut(ctx context.Context, in *SignOutRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, AuthService_SignOut_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, AuthService_SignOut_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/idp_service.proto // source: api/v1/idp_service.proto
...@@ -16,8 +16,8 @@ import ( ...@@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v1.IdentityProviderService/ListIdentityProviders" IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v1.IdentityProviderService/ListIdentityProviders"
...@@ -52,8 +52,9 @@ func NewIdentityProviderServiceClient(cc grpc.ClientConnInterface) IdentityProvi ...@@ -52,8 +52,9 @@ func NewIdentityProviderServiceClient(cc grpc.ClientConnInterface) IdentityProvi
} }
func (c *identityProviderServiceClient) ListIdentityProviders(ctx context.Context, in *ListIdentityProvidersRequest, opts ...grpc.CallOption) (*ListIdentityProvidersResponse, error) { func (c *identityProviderServiceClient) ListIdentityProviders(ctx context.Context, in *ListIdentityProvidersRequest, opts ...grpc.CallOption) (*ListIdentityProvidersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListIdentityProvidersResponse) out := new(ListIdentityProvidersResponse)
err := c.cc.Invoke(ctx, IdentityProviderService_ListIdentityProviders_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, IdentityProviderService_ListIdentityProviders_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -61,8 +62,9 @@ func (c *identityProviderServiceClient) ListIdentityProviders(ctx context.Contex ...@@ -61,8 +62,9 @@ func (c *identityProviderServiceClient) ListIdentityProviders(ctx context.Contex
} }
func (c *identityProviderServiceClient) GetIdentityProvider(ctx context.Context, in *GetIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) { func (c *identityProviderServiceClient) GetIdentityProvider(ctx context.Context, in *GetIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdentityProvider) out := new(IdentityProvider)
err := c.cc.Invoke(ctx, IdentityProviderService_GetIdentityProvider_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, IdentityProviderService_GetIdentityProvider_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -70,8 +72,9 @@ func (c *identityProviderServiceClient) GetIdentityProvider(ctx context.Context, ...@@ -70,8 +72,9 @@ func (c *identityProviderServiceClient) GetIdentityProvider(ctx context.Context,
} }
func (c *identityProviderServiceClient) CreateIdentityProvider(ctx context.Context, in *CreateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) { func (c *identityProviderServiceClient) CreateIdentityProvider(ctx context.Context, in *CreateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdentityProvider) out := new(IdentityProvider)
err := c.cc.Invoke(ctx, IdentityProviderService_CreateIdentityProvider_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, IdentityProviderService_CreateIdentityProvider_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -79,8 +82,9 @@ func (c *identityProviderServiceClient) CreateIdentityProvider(ctx context.Conte ...@@ -79,8 +82,9 @@ func (c *identityProviderServiceClient) CreateIdentityProvider(ctx context.Conte
} }
func (c *identityProviderServiceClient) UpdateIdentityProvider(ctx context.Context, in *UpdateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) { func (c *identityProviderServiceClient) UpdateIdentityProvider(ctx context.Context, in *UpdateIdentityProviderRequest, opts ...grpc.CallOption) (*IdentityProvider, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdentityProvider) out := new(IdentityProvider)
err := c.cc.Invoke(ctx, IdentityProviderService_UpdateIdentityProvider_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, IdentityProviderService_UpdateIdentityProvider_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -88,8 +92,9 @@ func (c *identityProviderServiceClient) UpdateIdentityProvider(ctx context.Conte ...@@ -88,8 +92,9 @@ func (c *identityProviderServiceClient) UpdateIdentityProvider(ctx context.Conte
} }
func (c *identityProviderServiceClient) DeleteIdentityProvider(ctx context.Context, in *DeleteIdentityProviderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *identityProviderServiceClient) DeleteIdentityProvider(ctx context.Context, in *DeleteIdentityProviderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, IdentityProviderService_DeleteIdentityProvider_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, IdentityProviderService_DeleteIdentityProvider_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/inbox_service.proto // source: api/v1/inbox_service.proto
...@@ -16,8 +16,8 @@ import ( ...@@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
InboxService_ListInboxes_FullMethodName = "/memos.api.v1.InboxService/ListInboxes" InboxService_ListInboxes_FullMethodName = "/memos.api.v1.InboxService/ListInboxes"
...@@ -46,8 +46,9 @@ func NewInboxServiceClient(cc grpc.ClientConnInterface) InboxServiceClient { ...@@ -46,8 +46,9 @@ func NewInboxServiceClient(cc grpc.ClientConnInterface) InboxServiceClient {
} }
func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) { func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListInboxesResponse) out := new(ListInboxesResponse)
err := c.cc.Invoke(ctx, InboxService_ListInboxes_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, InboxService_ListInboxes_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -55,8 +56,9 @@ func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesReq ...@@ -55,8 +56,9 @@ func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesReq
} }
func (c *inboxServiceClient) UpdateInbox(ctx context.Context, in *UpdateInboxRequest, opts ...grpc.CallOption) (*Inbox, error) { func (c *inboxServiceClient) UpdateInbox(ctx context.Context, in *UpdateInboxRequest, opts ...grpc.CallOption) (*Inbox, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Inbox) out := new(Inbox)
err := c.cc.Invoke(ctx, InboxService_UpdateInbox_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, InboxService_UpdateInbox_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -64,8 +66,9 @@ func (c *inboxServiceClient) UpdateInbox(ctx context.Context, in *UpdateInboxReq ...@@ -64,8 +66,9 @@ func (c *inboxServiceClient) UpdateInbox(ctx context.Context, in *UpdateInboxReq
} }
func (c *inboxServiceClient) DeleteInbox(ctx context.Context, in *DeleteInboxRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *inboxServiceClient) DeleteInbox(ctx context.Context, in *DeleteInboxRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, InboxService_DeleteInbox_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, InboxService_DeleteInbox_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/markdown_service.proto // source: api/v1/markdown_service.proto
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
MarkdownService_ParseMarkdown_FullMethodName = "/memos.api.v1.MarkdownService/ParseMarkdown" MarkdownService_ParseMarkdown_FullMethodName = "/memos.api.v1.MarkdownService/ParseMarkdown"
...@@ -45,8 +45,9 @@ func NewMarkdownServiceClient(cc grpc.ClientConnInterface) MarkdownServiceClient ...@@ -45,8 +45,9 @@ func NewMarkdownServiceClient(cc grpc.ClientConnInterface) MarkdownServiceClient
} }
func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error) { func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ParseMarkdownResponse) out := new(ParseMarkdownResponse)
err := c.cc.Invoke(ctx, MarkdownService_ParseMarkdown_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, MarkdownService_ParseMarkdown_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -54,8 +55,9 @@ func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMark ...@@ -54,8 +55,9 @@ func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMark
} }
func (c *markdownServiceClient) RestoreMarkdown(ctx context.Context, in *RestoreMarkdownRequest, opts ...grpc.CallOption) (*RestoreMarkdownResponse, error) { func (c *markdownServiceClient) RestoreMarkdown(ctx context.Context, in *RestoreMarkdownRequest, opts ...grpc.CallOption) (*RestoreMarkdownResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RestoreMarkdownResponse) out := new(RestoreMarkdownResponse)
err := c.cc.Invoke(ctx, MarkdownService_RestoreMarkdown_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, MarkdownService_RestoreMarkdown_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -63,8 +65,9 @@ func (c *markdownServiceClient) RestoreMarkdown(ctx context.Context, in *Restore ...@@ -63,8 +65,9 @@ func (c *markdownServiceClient) RestoreMarkdown(ctx context.Context, in *Restore
} }
func (c *markdownServiceClient) GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*LinkMetadata, error) { func (c *markdownServiceClient) GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*LinkMetadata, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LinkMetadata) out := new(LinkMetadata)
err := c.cc.Invoke(ctx, MarkdownService_GetLinkMetadata_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, MarkdownService_GetLinkMetadata_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
This diff is collapsed.
This diff is collapsed.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/resource_service.proto // source: api/v1/resource_service.proto
...@@ -17,8 +17,8 @@ import ( ...@@ -17,8 +17,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
ResourceService_CreateResource_FullMethodName = "/memos.api.v1.ResourceService/CreateResource" ResourceService_CreateResource_FullMethodName = "/memos.api.v1.ResourceService/CreateResource"
...@@ -59,8 +59,9 @@ func NewResourceServiceClient(cc grpc.ClientConnInterface) ResourceServiceClient ...@@ -59,8 +59,9 @@ func NewResourceServiceClient(cc grpc.ClientConnInterface) ResourceServiceClient
} }
func (c *resourceServiceClient) CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*Resource, error) { func (c *resourceServiceClient) CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*Resource, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Resource) out := new(Resource)
err := c.cc.Invoke(ctx, ResourceService_CreateResource_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_CreateResource_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -68,8 +69,9 @@ func (c *resourceServiceClient) CreateResource(ctx context.Context, in *CreateRe ...@@ -68,8 +69,9 @@ func (c *resourceServiceClient) CreateResource(ctx context.Context, in *CreateRe
} }
func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) { func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListResourcesResponse) out := new(ListResourcesResponse)
err := c.cc.Invoke(ctx, ResourceService_ListResources_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_ListResources_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -77,8 +79,9 @@ func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResou ...@@ -77,8 +79,9 @@ func (c *resourceServiceClient) ListResources(ctx context.Context, in *ListResou
} }
func (c *resourceServiceClient) SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error) { func (c *resourceServiceClient) SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchResourcesResponse) out := new(SearchResourcesResponse)
err := c.cc.Invoke(ctx, ResourceService_SearchResources_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_SearchResources_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -86,8 +89,9 @@ func (c *resourceServiceClient) SearchResources(ctx context.Context, in *SearchR ...@@ -86,8 +89,9 @@ func (c *resourceServiceClient) SearchResources(ctx context.Context, in *SearchR
} }
func (c *resourceServiceClient) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*Resource, error) { func (c *resourceServiceClient) GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*Resource, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Resource) out := new(Resource)
err := c.cc.Invoke(ctx, ResourceService_GetResource_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_GetResource_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -95,8 +99,9 @@ func (c *resourceServiceClient) GetResource(ctx context.Context, in *GetResource ...@@ -95,8 +99,9 @@ func (c *resourceServiceClient) GetResource(ctx context.Context, in *GetResource
} }
func (c *resourceServiceClient) GetResourceBinary(ctx context.Context, in *GetResourceBinaryRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { func (c *resourceServiceClient) GetResourceBinary(ctx context.Context, in *GetResourceBinaryRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(httpbody.HttpBody) out := new(httpbody.HttpBody)
err := c.cc.Invoke(ctx, ResourceService_GetResourceBinary_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_GetResourceBinary_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -104,8 +109,9 @@ func (c *resourceServiceClient) GetResourceBinary(ctx context.Context, in *GetRe ...@@ -104,8 +109,9 @@ func (c *resourceServiceClient) GetResourceBinary(ctx context.Context, in *GetRe
} }
func (c *resourceServiceClient) UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*Resource, error) { func (c *resourceServiceClient) UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*Resource, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Resource) out := new(Resource)
err := c.cc.Invoke(ctx, ResourceService_UpdateResource_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_UpdateResource_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -113,8 +119,9 @@ func (c *resourceServiceClient) UpdateResource(ctx context.Context, in *UpdateRe ...@@ -113,8 +119,9 @@ func (c *resourceServiceClient) UpdateResource(ctx context.Context, in *UpdateRe
} }
func (c *resourceServiceClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *resourceServiceClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, ResourceService_DeleteResource_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, ResourceService_DeleteResource_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/user_service.proto // source: api/v1/user_service.proto
...@@ -17,8 +17,8 @@ import ( ...@@ -17,8 +17,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
UserService_ListUsers_FullMethodName = "/memos.api.v1.UserService/ListUsers" UserService_ListUsers_FullMethodName = "/memos.api.v1.UserService/ListUsers"
...@@ -74,8 +74,9 @@ func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { ...@@ -74,8 +74,9 @@ func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
} }
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) { func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListUsersResponse) out := new(ListUsersResponse)
err := c.cc.Invoke(ctx, UserService_ListUsers_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_ListUsers_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -83,8 +84,9 @@ func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, ...@@ -83,8 +84,9 @@ func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest,
} }
func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) { func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchUsersResponse) out := new(SearchUsersResponse)
err := c.cc.Invoke(ctx, UserService_SearchUsers_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_SearchUsers_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -92,8 +94,9 @@ func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequ ...@@ -92,8 +94,9 @@ func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequ
} }
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) { func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -101,8 +104,9 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opt ...@@ -101,8 +104,9 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opt
} }
func (c *userServiceClient) GetUserAvatarBinary(ctx context.Context, in *GetUserAvatarBinaryRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { func (c *userServiceClient) GetUserAvatarBinary(ctx context.Context, in *GetUserAvatarBinaryRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(httpbody.HttpBody) out := new(httpbody.HttpBody)
err := c.cc.Invoke(ctx, UserService_GetUserAvatarBinary_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_GetUserAvatarBinary_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -110,8 +114,9 @@ func (c *userServiceClient) GetUserAvatarBinary(ctx context.Context, in *GetUser ...@@ -110,8 +114,9 @@ func (c *userServiceClient) GetUserAvatarBinary(ctx context.Context, in *GetUser
} }
func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) { func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -119,8 +124,9 @@ func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserReques ...@@ -119,8 +124,9 @@ func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserReques
} }
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) { func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User) out := new(User)
err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -128,8 +134,9 @@ func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReques ...@@ -128,8 +134,9 @@ func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReques
} }
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserService_DeleteUser_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_DeleteUser_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -137,8 +144,9 @@ func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserReques ...@@ -137,8 +144,9 @@ func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserReques
} }
func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) { func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserSetting) out := new(UserSetting)
err := c.cc.Invoke(ctx, UserService_GetUserSetting_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_GetUserSetting_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -146,8 +154,9 @@ func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSetti ...@@ -146,8 +154,9 @@ func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSetti
} }
func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) { func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserSetting) out := new(UserSetting)
err := c.cc.Invoke(ctx, UserService_UpdateUserSetting_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_UpdateUserSetting_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -155,8 +164,9 @@ func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUse ...@@ -155,8 +164,9 @@ func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUse
} }
func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error) { func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListUserAccessTokensResponse) out := new(ListUserAccessTokensResponse)
err := c.cc.Invoke(ctx, UserService_ListUserAccessTokens_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_ListUserAccessTokens_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -164,8 +174,9 @@ func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUs ...@@ -164,8 +174,9 @@ func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUs
} }
func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*UserAccessToken, error) { func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*UserAccessToken, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserAccessToken) out := new(UserAccessToken)
err := c.cc.Invoke(ctx, UserService_CreateUserAccessToken_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_CreateUserAccessToken_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -173,8 +184,9 @@ func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *Creat ...@@ -173,8 +184,9 @@ func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *Creat
} }
func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserService_DeleteUserAccessToken_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, UserService_DeleteUserAccessToken_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/webhook_service.proto // source: api/v1/webhook_service.proto
...@@ -16,8 +16,8 @@ import ( ...@@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
WebhookService_CreateWebhook_FullMethodName = "/memos.api.v1.WebhookService/CreateWebhook" WebhookService_CreateWebhook_FullMethodName = "/memos.api.v1.WebhookService/CreateWebhook"
...@@ -52,8 +52,9 @@ func NewWebhookServiceClient(cc grpc.ClientConnInterface) WebhookServiceClient { ...@@ -52,8 +52,9 @@ func NewWebhookServiceClient(cc grpc.ClientConnInterface) WebhookServiceClient {
} }
func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) { func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Webhook) out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_CreateWebhook_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WebhookService_CreateWebhook_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -61,8 +62,9 @@ func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebh ...@@ -61,8 +62,9 @@ func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebh
} }
func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) { func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Webhook) out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_GetWebhook_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WebhookService_GetWebhook_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -70,8 +72,9 @@ func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookReq ...@@ -70,8 +72,9 @@ func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookReq
} }
func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error) { func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListWebhooksResponse) out := new(ListWebhooksResponse)
err := c.cc.Invoke(ctx, WebhookService_ListWebhooks_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WebhookService_ListWebhooks_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -79,8 +82,9 @@ func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhook ...@@ -79,8 +82,9 @@ func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhook
} }
func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) { func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Webhook) out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_UpdateWebhook_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WebhookService_UpdateWebhook_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -88,8 +92,9 @@ func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebh ...@@ -88,8 +92,9 @@ func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebh
} }
func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WebhookService_DeleteWebhook_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WebhookService_DeleteWebhook_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/workspace_service.proto // source: api/v1/workspace_service.proto
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
WorkspaceService_GetWorkspaceProfile_FullMethodName = "/memos.api.v1.WorkspaceService/GetWorkspaceProfile" WorkspaceService_GetWorkspaceProfile_FullMethodName = "/memos.api.v1.WorkspaceService/GetWorkspaceProfile"
...@@ -39,8 +39,9 @@ func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClie ...@@ -39,8 +39,9 @@ func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClie
} }
func (c *workspaceServiceClient) GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*WorkspaceProfile, error) { func (c *workspaceServiceClient) GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*WorkspaceProfile, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WorkspaceProfile) out := new(WorkspaceProfile)
err := c.cc.Invoke(ctx, WorkspaceService_GetWorkspaceProfile_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WorkspaceService_GetWorkspaceProfile_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v1/workspace_setting_service.proto // source: api/v1/workspace_setting_service.proto
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting" WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting"
...@@ -42,8 +42,9 @@ func NewWorkspaceSettingServiceClient(cc grpc.ClientConnInterface) WorkspaceSett ...@@ -42,8 +42,9 @@ func NewWorkspaceSettingServiceClient(cc grpc.ClientConnInterface) WorkspaceSett
} }
func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) { func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WorkspaceSetting) out := new(WorkspaceSetting)
err := c.cc.Invoke(ctx, WorkspaceSettingService_GetWorkspaceSetting_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WorkspaceSettingService_GetWorkspaceSetting_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -51,8 +52,9 @@ func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, ...@@ -51,8 +52,9 @@ func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context,
} }
func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) { func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WorkspaceSetting) out := new(WorkspaceSetting)
err := c.cc.Invoke(ctx, WorkspaceSettingService_SetWorkspaceSetting_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, WorkspaceSettingService_SetWorkspaceSetting_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -73,10 +73,11 @@ type MemoPayload_Property struct { ...@@ -73,10 +73,11 @@ type MemoPayload_Property struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
HasLink bool `protobuf:"varint,2,opt,name=has_link,json=hasLink,proto3" json:"has_link,omitempty"` HasLink bool `protobuf:"varint,2,opt,name=has_link,json=hasLink,proto3" json:"has_link,omitempty"`
HasTaskList bool `protobuf:"varint,3,opt,name=has_task_list,json=hasTaskList,proto3" json:"has_task_list,omitempty"` HasTaskList bool `protobuf:"varint,3,opt,name=has_task_list,json=hasTaskList,proto3" json:"has_task_list,omitempty"`
HasCode bool `protobuf:"varint,4,opt,name=has_code,json=hasCode,proto3" json:"has_code,omitempty"` HasCode bool `protobuf:"varint,4,opt,name=has_code,json=hasCode,proto3" json:"has_code,omitempty"`
HasIncompleteTasks bool `protobuf:"varint,5,opt,name=has_incomplete_tasks,json=hasIncompleteTasks,proto3" json:"has_incomplete_tasks,omitempty"`
} }
func (x *MemoPayload_Property) Reset() { func (x *MemoPayload_Property) Reset() {
...@@ -139,34 +140,44 @@ func (x *MemoPayload_Property) GetHasCode() bool { ...@@ -139,34 +140,44 @@ func (x *MemoPayload_Property) GetHasCode() bool {
return false return false
} }
func (x *MemoPayload_Property) GetHasIncompleteTasks() bool {
if x != nil {
return x.HasIncompleteTasks
}
return false
}
var File_store_memo_proto protoreflect.FileDescriptor var File_store_memo_proto protoreflect.FileDescriptor
var file_store_memo_proto_rawDesc = []byte{ var file_store_memo_proto_rawDesc = []byte{
0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x0a, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22,
0xc6, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0xf9, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,
0x3d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x3d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
0x4d, 0x65, 0x6d, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x4d, 0x65, 0x6d, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70,
0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x78, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0xaa,
0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x19, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12,
0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28,
0x52, 0x07, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x61,
0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x73, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x52, 0x0b, 0x68, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x52, 0x0b, 0x68, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19,
0x08, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
0x07, 0x68, 0x61, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x94, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x52, 0x07, 0x68, 0x61, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x61, 0x73,
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x09, 0x4d, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b,
0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x68, 0x61, 0x73, 0x49, 0x6e, 0x63, 0x6f,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x94, 0x01, 0x0a, 0x0f,
0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42,
0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x09, 0x4d, 0x65, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69,
0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f,
0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65,
0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b,
0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f,
0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f,
0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
...@@ -13,5 +13,6 @@ message MemoPayload { ...@@ -13,5 +13,6 @@ message MemoPayload {
bool has_link = 2; bool has_link = 2;
bool has_task_list = 3; bool has_task_list = 3;
bool has_code = 4; bool has_code = 4;
bool has_incomplete_tasks = 5;
} }
} }
...@@ -869,10 +869,11 @@ func convertMemoPropertyFromStore(property *storepb.MemoPayload_Property) *v1pb. ...@@ -869,10 +869,11 @@ func convertMemoPropertyFromStore(property *storepb.MemoPayload_Property) *v1pb.
return nil return nil
} }
return &v1pb.MemoProperty{ return &v1pb.MemoProperty{
Tags: property.Tags, Tags: property.Tags,
HasLink: property.HasLink, HasLink: property.HasLink,
HasTaskList: property.HasTaskList, HasTaskList: property.HasTaskList,
HasCode: property.HasCode, HasCode: property.HasCode,
HasIncompleteTasks: property.HasIncompleteTasks,
} }
} }
...@@ -991,6 +992,9 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store. ...@@ -991,6 +992,9 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store.
if filter.HasCode { if filter.HasCode {
find.PayloadFind.HasCode = true find.PayloadFind.HasCode = true
} }
if filter.HasIncompleteTasks {
find.PayloadFind.HasIncompleteTasks = true
}
} }
user, err := s.GetCurrentUser(ctx) user, err := s.GetCurrentUser(ctx)
...@@ -1044,24 +1048,26 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{ ...@@ -1044,24 +1048,26 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{
cel.Variable("has_link", cel.BoolType), cel.Variable("has_link", cel.BoolType),
cel.Variable("has_task_list", cel.BoolType), cel.Variable("has_task_list", cel.BoolType),
cel.Variable("has_code", cel.BoolType), cel.Variable("has_code", cel.BoolType),
cel.Variable("has_incomplete_tasks", cel.BoolType),
} }
type SearchMemosFilter struct { type SearchMemosFilter struct {
ContentSearch []string ContentSearch []string
Visibilities []store.Visibility Visibilities []store.Visibility
Tag *string Tag *string
OrderByPinned bool OrderByPinned bool
DisplayTimeBefore *int64 DisplayTimeBefore *int64
DisplayTimeAfter *int64 DisplayTimeAfter *int64
Creator *string Creator *string
UID *string UID *string
RowStatus *store.RowStatus RowStatus *store.RowStatus
Random bool Random bool
Limit *int Limit *int
IncludeComments bool IncludeComments bool
HasLink bool HasLink bool
HasTaskList bool HasTaskList bool
HasCode bool HasCode bool
HasIncompleteTasks bool
} }
func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) { func parseSearchMemosFilter(expression string) (*SearchMemosFilter, error) {
...@@ -1140,6 +1146,9 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) { ...@@ -1140,6 +1146,9 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
} else if idExpr.Name == "has_code" { } else if idExpr.Name == "has_code" {
value := callExpr.Args[1].GetConstExpr().GetBoolValue() value := callExpr.Args[1].GetConstExpr().GetBoolValue()
filter.HasCode = value filter.HasCode = value
} else if idExpr.Name == "has_incomplete_tasks" {
value := callExpr.Args[1].GetConstExpr().GetBoolValue()
filter.HasIncompleteTasks = value
} }
return return
} }
...@@ -1170,6 +1179,9 @@ func getMemoPropertyFromContent(content string) (*storepb.MemoPayload_Property, ...@@ -1170,6 +1179,9 @@ func getMemoPropertyFromContent(content string) (*storepb.MemoPayload_Property,
property.HasLink = true property.HasLink = true
case *ast.TaskList: case *ast.TaskList:
property.HasTaskList = true property.HasTaskList = true
if !n.Complete {
property.HasIncompleteTasks = true
}
case *ast.Code, *ast.CodeBlock: case *ast.Code, *ast.CodeBlock:
property.HasCode = true property.HasCode = true
} }
......
...@@ -11,8 +11,6 @@ import ( ...@@ -11,8 +11,6 @@ import (
"github.com/usememos/memos/store" "github.com/usememos/memos/store"
) )
var ownerCache *v1pb.User
func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error) { func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error) {
workspaceProfile := &v1pb.WorkspaceProfile{ workspaceProfile := &v1pb.WorkspaceProfile{
Version: s.Profile.Version, Version: s.Profile.Version,
...@@ -28,6 +26,8 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks ...@@ -28,6 +26,8 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
return workspaceProfile, nil return workspaceProfile, nil
} }
var ownerCache *v1pb.User
func (s *APIV1Service) GetInstanceOwner(ctx context.Context) (*v1pb.User, error) { func (s *APIV1Service) GetInstanceOwner(ctx context.Context) (*v1pb.User, error) {
if ownerCache != nil { if ownerCache != nil {
return ownerCache, nil return ownerCache, nil
......
...@@ -102,6 +102,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo ...@@ -102,6 +102,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
if v.HasCode { if v.HasCode {
where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasCode') IS TRUE") where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasCode') IS TRUE")
} }
if v.HasIncompleteTasks {
where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasIncompleteTasks') IS TRUE")
}
} }
if find.ExcludeComments { if find.ExcludeComments {
having = append(having, "`parent_id` IS NULL") having = append(having, "`parent_id` IS NULL")
......
...@@ -93,6 +93,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo ...@@ -93,6 +93,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
if v.HasCode { if v.HasCode {
where = append(where, "(memo.payload->'property'->>'hasCode')::BOOLEAN IS TRUE") where = append(where, "(memo.payload->'property'->>'hasCode')::BOOLEAN IS TRUE")
} }
if v.HasIncompleteTasks {
where = append(where, "(memo.payload->'property'->>'hasIncompleteTasks')::BOOLEAN IS TRUE")
}
} }
if find.ExcludeComments { if find.ExcludeComments {
where = append(where, "memo_relation.related_memo_id IS NULL") where = append(where, "memo_relation.related_memo_id IS NULL")
......
...@@ -94,6 +94,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo ...@@ -94,6 +94,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
if v.HasCode { if v.HasCode {
where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasCode') IS TRUE") where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasCode') IS TRUE")
} }
if v.HasIncompleteTasks {
where = append(where, "JSON_EXTRACT(`memo`.`payload`, '$.property.hasIncompleteTasks') IS TRUE")
}
} }
if find.ExcludeComments { if find.ExcludeComments {
where = append(where, "`parent_id` IS NULL") where = append(where, "`parent_id` IS NULL")
......
...@@ -83,11 +83,12 @@ type FindMemo struct { ...@@ -83,11 +83,12 @@ type FindMemo struct {
} }
type FindMemoPayload struct { type FindMemoPayload struct {
Raw *string Raw *string
Tag *string Tag *string
HasLink bool HasLink bool
HasTaskList bool HasTaskList bool
HasCode bool HasCode bool
HasIncompleteTasks bool
} }
type UpdateMemo struct { type UpdateMemo struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment