Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractActivityIDFromName(name string) (int32, error)
- func ExtractIdentityProviderIDFromName(name string) (int32, error)
- func ExtractInboxIDFromName(name string) (int32, error)
- func ExtractMemoIDFromName(name string) (int32, error)
- func ExtractResourceIDFromName(name string) (int32, error)
- func ExtractStorageIDFromName(name string) (int32, error)
- func ExtractUserIDFromName(name string) (int32, error)
- func ExtractWorkspaceSettingKeyFromName(name string) (string, error)
- func GenerateAccessToken(username string, userID int32, expirationTime time.Time, secret []byte) (string, error)
- func GetNameParentTokens(name string, tokenPrefixes ...string) ([]string, error)
- func SaveResourceBlob(ctx context.Context, s *store.Store, create *store.Resource) error
- type APIV1Service
- func (s *APIV1Service) CreateIdentityProvider(ctx context.Context, request *v1pb.CreateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) CreateMemoComment(ctx context.Context, request *v1pb.CreateMemoCommentRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) CreateResource(ctx context.Context, request *v1pb.CreateResourceRequest) (*v1pb.Resource, error)
- func (s *APIV1Service) CreateUser(ctx context.Context, request *v1pb.CreateUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) CreateUserAccessToken(ctx context.Context, request *v1pb.CreateUserAccessTokenRequest) (*v1pb.UserAccessToken, error)
- func (s *APIV1Service) CreateWebhook(ctx context.Context, request *v1pb.CreateWebhookRequest) (*v1pb.Webhook, error)
- func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteInbox(ctx context.Context, request *v1pb.DeleteInboxRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteMemo(ctx context.Context, request *v1pb.DeleteMemoRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteMemoReaction(ctx context.Context, request *v1pb.DeleteMemoReactionRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteMemoTag(ctx context.Context, request *v1pb.DeleteMemoTagRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteResource(ctx context.Context, request *v1pb.DeleteResourceRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteUserAccessToken(ctx context.Context, request *v1pb.DeleteUserAccessTokenRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWebhookRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DispatchMemoCreatedWebhook(ctx context.Context, memo *v1pb.Memo) error
- func (s *APIV1Service) DispatchMemoDeletedWebhook(ctx context.Context, memo *v1pb.Memo) error
- func (s *APIV1Service) DispatchMemoUpdatedWebhook(ctx context.Context, memo *v1pb.Memo) error
- func (s *APIV1Service) GetActivity(ctx context.Context, request *v1pb.GetActivityRequest) (*v1pb.Activity, error)
- func (s *APIV1Service) GetAuthStatus(ctx context.Context, _ *v1pb.GetAuthStatusRequest) (*v1pb.User, error)
- func (s *APIV1Service) GetCurrentUser(ctx context.Context) (*store.User, error)
- func (s *APIV1Service) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) GetInstanceOwner(ctx context.Context) (*v1pb.User, error)
- func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error)
- func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) GetMemoByUid(ctx context.Context, request *v1pb.GetMemoByUidRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) GetResource(ctx context.Context, request *v1pb.GetResourceRequest) (*v1pb.Resource, error)
- func (s *APIV1Service) GetResourceBinary(ctx context.Context, request *v1pb.GetResourceBinaryRequest) (*httpbody.HttpBody, error)
- func (s *APIV1Service) GetResourceBlob(resource *store.Resource) ([]byte, error)
- func (s *APIV1Service) GetResourceByUid(ctx context.Context, request *v1pb.GetResourceByUidRequest) (*v1pb.Resource, error)
- func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) GetUserAvatarBinary(ctx context.Context, request *v1pb.GetUserAvatarBinaryRequest) (*httpbody.HttpBody, error)
- func (s *APIV1Service) GetUserSetting(ctx context.Context, _ *v1pb.GetUserSettingRequest) (*v1pb.UserSetting, error)
- func (s *APIV1Service) GetUserStats(ctx context.Context, request *v1pb.GetUserStatsRequest) (*v1pb.UserStats, error)
- func (s *APIV1Service) GetWebhook(ctx context.Context, request *v1pb.GetWebhookRequest) (*v1pb.Webhook, error)
- func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error)
- func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, request *v1pb.GetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error)
- func (s *APIV1Service) ListAllUserStats(ctx context.Context, _ *v1pb.ListAllUserStatsRequest) (*v1pb.ListAllUserStatsResponse, error)
- func (s *APIV1Service) ListIdentityProviders(ctx context.Context, _ *v1pb.ListIdentityProvidersRequest) (*v1pb.ListIdentityProvidersResponse, error)
- func (s *APIV1Service) ListInboxes(ctx context.Context, request *v1pb.ListInboxesRequest) (*v1pb.ListInboxesResponse, error)
- func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListMemoCommentsRequest) (*v1pb.ListMemoCommentsResponse, error)
- func (s *APIV1Service) ListMemoReactions(ctx context.Context, request *v1pb.ListMemoReactionsRequest) (*v1pb.ListMemoReactionsResponse, error)
- func (s *APIV1Service) ListMemoRelations(ctx context.Context, request *v1pb.ListMemoRelationsRequest) (*v1pb.ListMemoRelationsResponse, error)
- func (s *APIV1Service) ListMemoResources(ctx context.Context, request *v1pb.ListMemoResourcesRequest) (*v1pb.ListMemoResourcesResponse, error)
- func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosRequest) (*v1pb.ListMemosResponse, error)
- func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesRequest) (*v1pb.ListResourcesResponse, error)
- func (s *APIV1Service) ListUserAccessTokens(ctx context.Context, request *v1pb.ListUserAccessTokensRequest) (*v1pb.ListUserAccessTokensResponse, error)
- func (s *APIV1Service) ListUsers(ctx context.Context, _ *v1pb.ListUsersRequest) (*v1pb.ListUsersResponse, error)
- func (s *APIV1Service) ListWebhooks(ctx context.Context, request *v1pb.ListWebhooksRequest) (*v1pb.ListWebhooksResponse, error)
- func (*APIV1Service) ParseMarkdown(_ context.Context, request *v1pb.ParseMarkdownRequest) (*v1pb.ParseMarkdownResponse, error)
- func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error
- func (s *APIV1Service) RenameMemoTag(ctx context.Context, request *v1pb.RenameMemoTagRequest) (*emptypb.Empty, error)
- func (*APIV1Service) RestoreMarkdownNodes(_ context.Context, request *v1pb.RestoreMarkdownNodesRequest) (*v1pb.RestoreMarkdownNodesResponse, error)
- func (s *APIV1Service) SearchUsers(ctx context.Context, request *v1pb.SearchUsersRequest) (*v1pb.SearchUsersResponse, error)
- func (s *APIV1Service) SetMemoRelations(ctx context.Context, request *v1pb.SetMemoRelationsRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) SetMemoResources(ctx context.Context, request *v1pb.SetMemoResourcesRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) SetWorkspaceSetting(ctx context.Context, request *v1pb.SetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error)
- func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest) (*v1pb.User, error)
- func (s *APIV1Service) SignInWithSSO(ctx context.Context, request *v1pb.SignInWithSSORequest) (*v1pb.User, error)
- func (s *APIV1Service) SignOut(ctx context.Context, _ *v1pb.SignOutRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) SignUp(ctx context.Context, request *v1pb.SignUpRequest) (*v1pb.User, error)
- func (*APIV1Service) StringifyMarkdownNodes(_ context.Context, request *v1pb.StringifyMarkdownNodesRequest) (*v1pb.StringifyMarkdownNodesResponse, error)
- func (s *APIV1Service) UpdateIdentityProvider(ctx context.Context, request *v1pb.UpdateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) UpdateInbox(ctx context.Context, request *v1pb.UpdateInboxRequest) (*v1pb.Inbox, error)
- func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) UpdateResource(ctx context.Context, request *v1pb.UpdateResourceRequest) (*v1pb.Resource, error)
- func (s *APIV1Service) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) UpdateUserSetting(ctx context.Context, request *v1pb.UpdateUserSettingRequest) (*v1pb.UserSetting, error)
- func (s *APIV1Service) UpdateWebhook(ctx context.Context, request *v1pb.UpdateWebhookRequest) (*v1pb.Webhook, error)
- func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error
- func (s *APIV1Service) UpsertMemoReaction(ctx context.Context, request *v1pb.UpsertMemoReactionRequest) (*v1pb.Reaction, error)
- type ClaimsMessage
- type ContextKey
- type GRPCAuthInterceptor
- type LoggerInterceptor
- type MemoFilter
- type SearchUsersFilter
Constants ¶
const ( // issuer is the issuer of the jwt token. Issuer = "memos" // Signing key section. For now, this is only used for signing, not for verifying since we only // have 1 version. But it will be used to maintain backward compatibility if we change the signing mechanism. KeyID = "v1" // AccessTokenAudienceName is the audience name of the access token. AccessTokenAudienceName = "user.access-token" AccessTokenDuration = 7 * 24 * time.Hour // CookieExpDuration expires slightly earlier than the jwt expiration. Client would be logged out if the user // cookie expires, thus the client would always logout first before attempting to make a request with the expired jwt. CookieExpDuration = AccessTokenDuration - 1*time.Minute // AccessTokenCookieName is the cookie name of access token. AccessTokenCookieName = "memos.access-token" )
const ( WorkspaceSettingNamePrefix = "settings/" UserNamePrefix = "users/" MemoNamePrefix = "memos/" ResourceNamePrefix = "resources/" InboxNamePrefix = "inboxes/" StorageNamePrefix = "storages/" IdentityProviderNamePrefix = "identityProviders/" ActivityNamePrefix = "activities/" )
const ( // The upload memory buffer is 32 MiB. // It should be kept low, so RAM usage doesn't get out of control. // This is unrelated to maximum upload size limit, which is now set through system setting. MaxUploadBufferSizeBytes = 32 << 20 MebiByte = 1024 * 1024 // ThumbnailCacheFolder is the folder name where the thumbnail images are stored. ThumbnailCacheFolder = ".thumbnail_cache" )
const (
// DefaultPageSize is the default page size for requests.
DefaultPageSize = 10
)
Variables ¶
var MemoFilterCELAttributes = []cel.EnvOption{ cel.Variable("content_search", cel.ListType(cel.StringType)), cel.Variable("visibilities", cel.ListType(cel.StringType)), cel.Variable("tag_search", cel.ListType(cel.StringType)), cel.Variable("order_by_pinned", cel.BoolType), cel.Variable("order_by_time_asc", cel.BoolType), cel.Variable("display_time_before", cel.IntType), cel.Variable("display_time_after", cel.IntType), cel.Variable("creator", cel.StringType), cel.Variable("uid", cel.StringType), cel.Variable("state", cel.StringType), cel.Variable("random", cel.BoolType), cel.Variable("limit", cel.IntType), cel.Variable("include_comments", cel.BoolType), cel.Variable("has_link", cel.BoolType), cel.Variable("has_task_list", cel.BoolType), cel.Variable("has_code", cel.BoolType), cel.Variable("has_incomplete_tasks", cel.BoolType), }
MemoFilterCELAttributes are the CEL attributes.
var SearchUsersFilterCELAttributes = []cel.EnvOption{ cel.Variable("username", cel.StringType), cel.Variable("random", cel.BoolType), cel.Variable("limit", cel.IntType), }
SearchUsersFilterCELAttributes are the CEL attributes for SearchUsersFilter.
var SupportedThumbnailMimeTypes = []string{
"image/png",
"image/jpeg",
}
Functions ¶
func ExtractActivityIDFromName ¶ added in v0.22.5
func ExtractInboxIDFromName ¶
ExtractInboxIDFromName returns the inbox ID from a resource name.
func ExtractMemoIDFromName ¶
ExtractMemoIDFromName returns the memo ID from a resource name.
func ExtractResourceIDFromName ¶
ExtractResourceIDFromName returns the resource ID from a resource name.
func ExtractStorageIDFromName ¶
ExtractStorageIDFromName returns the storage ID from a resource name.
func ExtractUserIDFromName ¶
ExtractUserIDFromName returns the uid from a resource name.
func GenerateAccessToken ¶
func GenerateAccessToken(username string, userID int32, expirationTime time.Time, secret []byte) (string, error)
GenerateAccessToken generates an access token.
func GetNameParentTokens ¶
GetNameParentTokens returns the tokens from a resource name.
Types ¶
type APIV1Service ¶
type APIV1Service struct { v1pb.UnimplementedWorkspaceServiceServer v1pb.UnimplementedWorkspaceSettingServiceServer v1pb.UnimplementedAuthServiceServer v1pb.UnimplementedUserServiceServer v1pb.UnimplementedMemoServiceServer v1pb.UnimplementedResourceServiceServer v1pb.UnimplementedInboxServiceServer v1pb.UnimplementedActivityServiceServer v1pb.UnimplementedWebhookServiceServer v1pb.UnimplementedMarkdownServiceServer v1pb.UnimplementedIdentityProviderServiceServer Secret string Profile *profile.Profile Store *store.Store // contains filtered or unexported fields }
func NewAPIV1Service ¶
func (*APIV1Service) CreateIdentityProvider ¶
func (s *APIV1Service) CreateIdentityProvider(ctx context.Context, request *v1pb.CreateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) CreateMemo ¶
func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoRequest) (*v1pb.Memo, error)
func (*APIV1Service) CreateMemoComment ¶
func (s *APIV1Service) CreateMemoComment(ctx context.Context, request *v1pb.CreateMemoCommentRequest) (*v1pb.Memo, error)
func (*APIV1Service) CreateResource ¶
func (s *APIV1Service) CreateResource(ctx context.Context, request *v1pb.CreateResourceRequest) (*v1pb.Resource, error)
func (*APIV1Service) CreateUser ¶
func (s *APIV1Service) CreateUser(ctx context.Context, request *v1pb.CreateUserRequest) (*v1pb.User, error)
func (*APIV1Service) CreateUserAccessToken ¶
func (s *APIV1Service) CreateUserAccessToken(ctx context.Context, request *v1pb.CreateUserAccessTokenRequest) (*v1pb.UserAccessToken, error)
func (*APIV1Service) CreateWebhook ¶
func (s *APIV1Service) CreateWebhook(ctx context.Context, request *v1pb.CreateWebhookRequest) (*v1pb.Webhook, error)
func (*APIV1Service) DeleteIdentityProvider ¶
func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteInbox ¶
func (s *APIV1Service) DeleteInbox(ctx context.Context, request *v1pb.DeleteInboxRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteMemo ¶
func (s *APIV1Service) DeleteMemo(ctx context.Context, request *v1pb.DeleteMemoRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteMemoReaction ¶
func (s *APIV1Service) DeleteMemoReaction(ctx context.Context, request *v1pb.DeleteMemoReactionRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteMemoTag ¶
func (s *APIV1Service) DeleteMemoTag(ctx context.Context, request *v1pb.DeleteMemoTagRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteResource ¶
func (s *APIV1Service) DeleteResource(ctx context.Context, request *v1pb.DeleteResourceRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteUser ¶
func (s *APIV1Service) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteUserAccessToken ¶
func (s *APIV1Service) DeleteUserAccessToken(ctx context.Context, request *v1pb.DeleteUserAccessTokenRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteWebhook ¶
func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWebhookRequest) (*emptypb.Empty, error)
func (*APIV1Service) DispatchMemoCreatedWebhook ¶
DispatchMemoCreatedWebhook dispatches webhook when memo is created.
func (*APIV1Service) DispatchMemoDeletedWebhook ¶
DispatchMemoDeletedWebhook dispatches webhook when memo is deleted.
func (*APIV1Service) DispatchMemoUpdatedWebhook ¶
DispatchMemoUpdatedWebhook dispatches webhook when memo is updated.
func (*APIV1Service) GetActivity ¶
func (s *APIV1Service) GetActivity(ctx context.Context, request *v1pb.GetActivityRequest) (*v1pb.Activity, error)
func (*APIV1Service) GetAuthStatus ¶
func (s *APIV1Service) GetAuthStatus(ctx context.Context, _ *v1pb.GetAuthStatusRequest) (*v1pb.User, error)
func (*APIV1Service) GetCurrentUser ¶ added in v0.22.1
func (*APIV1Service) GetIdentityProvider ¶
func (s *APIV1Service) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) GetInstanceOwner ¶
func (*APIV1Service) GetLinkMetadata ¶
func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error)
func (*APIV1Service) GetMemo ¶
func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error)
func (*APIV1Service) GetMemoByUid ¶ added in v0.22.3
func (s *APIV1Service) GetMemoByUid(ctx context.Context, request *v1pb.GetMemoByUidRequest) (*v1pb.Memo, error)
func (*APIV1Service) GetResource ¶
func (s *APIV1Service) GetResource(ctx context.Context, request *v1pb.GetResourceRequest) (*v1pb.Resource, error)
func (*APIV1Service) GetResourceBinary ¶
func (s *APIV1Service) GetResourceBinary(ctx context.Context, request *v1pb.GetResourceBinaryRequest) (*httpbody.HttpBody, error)
func (*APIV1Service) GetResourceBlob ¶ added in v0.22.5
func (s *APIV1Service) GetResourceBlob(resource *store.Resource) ([]byte, error)
func (*APIV1Service) GetResourceByUid ¶ added in v0.22.3
func (s *APIV1Service) GetResourceByUid(ctx context.Context, request *v1pb.GetResourceByUidRequest) (*v1pb.Resource, error)
func (*APIV1Service) GetUser ¶
func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error)
func (*APIV1Service) GetUserAvatarBinary ¶
func (s *APIV1Service) GetUserAvatarBinary(ctx context.Context, request *v1pb.GetUserAvatarBinaryRequest) (*httpbody.HttpBody, error)
func (*APIV1Service) GetUserSetting ¶
func (s *APIV1Service) GetUserSetting(ctx context.Context, _ *v1pb.GetUserSettingRequest) (*v1pb.UserSetting, error)
func (*APIV1Service) GetUserStats ¶ added in v0.23.1
func (s *APIV1Service) GetUserStats(ctx context.Context, request *v1pb.GetUserStatsRequest) (*v1pb.UserStats, error)
func (*APIV1Service) GetWebhook ¶
func (s *APIV1Service) GetWebhook(ctx context.Context, request *v1pb.GetWebhookRequest) (*v1pb.Webhook, error)
func (*APIV1Service) GetWorkspaceProfile ¶
func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error)
func (*APIV1Service) GetWorkspaceSetting ¶
func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, request *v1pb.GetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error)
func (*APIV1Service) ListAllUserStats ¶ added in v0.23.1
func (s *APIV1Service) ListAllUserStats(ctx context.Context, _ *v1pb.ListAllUserStatsRequest) (*v1pb.ListAllUserStatsResponse, error)
func (*APIV1Service) ListIdentityProviders ¶
func (s *APIV1Service) ListIdentityProviders(ctx context.Context, _ *v1pb.ListIdentityProvidersRequest) (*v1pb.ListIdentityProvidersResponse, error)
func (*APIV1Service) ListInboxes ¶
func (s *APIV1Service) ListInboxes(ctx context.Context, request *v1pb.ListInboxesRequest) (*v1pb.ListInboxesResponse, error)
func (*APIV1Service) ListMemoComments ¶
func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListMemoCommentsRequest) (*v1pb.ListMemoCommentsResponse, error)
func (*APIV1Service) ListMemoReactions ¶
func (s *APIV1Service) ListMemoReactions(ctx context.Context, request *v1pb.ListMemoReactionsRequest) (*v1pb.ListMemoReactionsResponse, error)
func (*APIV1Service) ListMemoRelations ¶
func (s *APIV1Service) ListMemoRelations(ctx context.Context, request *v1pb.ListMemoRelationsRequest) (*v1pb.ListMemoRelationsResponse, error)
func (*APIV1Service) ListMemoResources ¶
func (s *APIV1Service) ListMemoResources(ctx context.Context, request *v1pb.ListMemoResourcesRequest) (*v1pb.ListMemoResourcesResponse, error)
func (*APIV1Service) ListMemos ¶
func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosRequest) (*v1pb.ListMemosResponse, error)
func (*APIV1Service) ListResources ¶
func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesRequest) (*v1pb.ListResourcesResponse, error)
func (*APIV1Service) ListUserAccessTokens ¶
func (s *APIV1Service) ListUserAccessTokens(ctx context.Context, request *v1pb.ListUserAccessTokensRequest) (*v1pb.ListUserAccessTokensResponse, error)
func (*APIV1Service) ListUsers ¶
func (s *APIV1Service) ListUsers(ctx context.Context, _ *v1pb.ListUsersRequest) (*v1pb.ListUsersResponse, error)
func (*APIV1Service) ListWebhooks ¶
func (s *APIV1Service) ListWebhooks(ctx context.Context, request *v1pb.ListWebhooksRequest) (*v1pb.ListWebhooksResponse, error)
func (*APIV1Service) ParseMarkdown ¶
func (*APIV1Service) ParseMarkdown(_ context.Context, request *v1pb.ParseMarkdownRequest) (*v1pb.ParseMarkdownResponse, error)
func (*APIV1Service) RegisterGateway ¶
func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error
RegisterGateway registers the gRPC-Gateway with the given Echo instance.
func (*APIV1Service) RenameMemoTag ¶
func (s *APIV1Service) RenameMemoTag(ctx context.Context, request *v1pb.RenameMemoTagRequest) (*emptypb.Empty, error)
func (*APIV1Service) RestoreMarkdownNodes ¶ added in v0.22.3
func (*APIV1Service) RestoreMarkdownNodes(_ context.Context, request *v1pb.RestoreMarkdownNodesRequest) (*v1pb.RestoreMarkdownNodesResponse, error)
func (*APIV1Service) SearchUsers ¶
func (s *APIV1Service) SearchUsers(ctx context.Context, request *v1pb.SearchUsersRequest) (*v1pb.SearchUsersResponse, error)
func (*APIV1Service) SetMemoRelations ¶
func (s *APIV1Service) SetMemoRelations(ctx context.Context, request *v1pb.SetMemoRelationsRequest) (*emptypb.Empty, error)
func (*APIV1Service) SetMemoResources ¶
func (s *APIV1Service) SetMemoResources(ctx context.Context, request *v1pb.SetMemoResourcesRequest) (*emptypb.Empty, error)
func (*APIV1Service) SetWorkspaceSetting ¶
func (s *APIV1Service) SetWorkspaceSetting(ctx context.Context, request *v1pb.SetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error)
func (*APIV1Service) SignIn ¶
func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest) (*v1pb.User, error)
func (*APIV1Service) SignInWithSSO ¶
func (s *APIV1Service) SignInWithSSO(ctx context.Context, request *v1pb.SignInWithSSORequest) (*v1pb.User, error)
func (*APIV1Service) SignOut ¶
func (s *APIV1Service) SignOut(ctx context.Context, _ *v1pb.SignOutRequest) (*emptypb.Empty, error)
func (*APIV1Service) SignUp ¶
func (s *APIV1Service) SignUp(ctx context.Context, request *v1pb.SignUpRequest) (*v1pb.User, error)
func (*APIV1Service) StringifyMarkdownNodes ¶ added in v0.22.3
func (*APIV1Service) StringifyMarkdownNodes(_ context.Context, request *v1pb.StringifyMarkdownNodesRequest) (*v1pb.StringifyMarkdownNodesResponse, error)
func (*APIV1Service) UpdateIdentityProvider ¶
func (s *APIV1Service) UpdateIdentityProvider(ctx context.Context, request *v1pb.UpdateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) UpdateInbox ¶
func (s *APIV1Service) UpdateInbox(ctx context.Context, request *v1pb.UpdateInboxRequest) (*v1pb.Inbox, error)
func (*APIV1Service) UpdateMemo ¶
func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoRequest) (*v1pb.Memo, error)
func (*APIV1Service) UpdateResource ¶
func (s *APIV1Service) UpdateResource(ctx context.Context, request *v1pb.UpdateResourceRequest) (*v1pb.Resource, error)
func (*APIV1Service) UpdateUser ¶
func (s *APIV1Service) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRequest) (*v1pb.User, error)
func (*APIV1Service) UpdateUserSetting ¶
func (s *APIV1Service) UpdateUserSetting(ctx context.Context, request *v1pb.UpdateUserSettingRequest) (*v1pb.UserSetting, error)
func (*APIV1Service) UpdateWebhook ¶
func (s *APIV1Service) UpdateWebhook(ctx context.Context, request *v1pb.UpdateWebhookRequest) (*v1pb.Webhook, error)
func (*APIV1Service) UpsertAccessTokenToStore ¶
func (*APIV1Service) UpsertMemoReaction ¶
func (s *APIV1Service) UpsertMemoReaction(ctx context.Context, request *v1pb.UpsertMemoReactionRequest) (*v1pb.Reaction, error)
type ClaimsMessage ¶
type ClaimsMessage struct { Name string `json:"name"` jwt.RegisteredClaims }
type GRPCAuthInterceptor ¶
GRPCAuthInterceptor is the auth interceptor for gRPC server.
func NewGRPCAuthInterceptor ¶
func NewGRPCAuthInterceptor(store *store.Store, secret string) *GRPCAuthInterceptor
NewGRPCAuthInterceptor returns a new API auth interceptor.
func (*GRPCAuthInterceptor) AuthenticationInterceptor ¶
func (in *GRPCAuthInterceptor) AuthenticationInterceptor(ctx context.Context, request any, serverInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
AuthenticationInterceptor is the unary interceptor for gRPC API.
type LoggerInterceptor ¶
type LoggerInterceptor struct { }
func NewLoggerInterceptor ¶
func NewLoggerInterceptor() *LoggerInterceptor
func (*LoggerInterceptor) LoggerInterceptor ¶
func (in *LoggerInterceptor) LoggerInterceptor(ctx context.Context, request any, serverInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
type MemoFilter ¶ added in v0.22.4
type MemoFilter struct { ContentSearch []string Visibilities []store.Visibility TagSearch []string OrderByPinned bool OrderByTimeAsc bool DisplayTimeBefore *int64 DisplayTimeAfter *int64 Creator *string RowStatus *store.RowStatus Random bool Limit *int IncludeComments bool HasLink bool HasTaskList bool HasCode bool HasIncompleteTasks bool }
type SearchUsersFilter ¶
Source Files
¶
- acl.go
- acl_config.go
- activity_service.go
- auth.go
- auth_service.go
- common.go
- idp_service.go
- inbox_service.go
- logger_interceptor.go
- markdown_service.go
- memo_relation_service.go
- memo_resource_service.go
- memo_service.go
- memo_service_converter.go
- memo_service_filter.go
- reaction_service.go
- resource_name.go
- resource_service.go
- user_service.go
- user_service_stats.go
- v1.go
- webhook_service.go
- workspace_service.go
- workspace_setting_service.go