Documentation
¶
Index ¶
- Constants
- Variables
- func BuildUserName(username string) string
- func ExtractAttachmentUIDFromName(name string) (string, error)
- func ExtractIdentityProviderUIDFromName(name string) (string, error)
- func ExtractInboxIDFromName(name string) (int32, error)
- func ExtractInstanceSettingKeyFromName(name string) (string, error)
- func ExtractMemoReactionIDFromName(name string) (string, int32, error)
- func ExtractMemoUIDFromName(name string) (string, error)
- func ExtractSpaceInvitationTokensFromName(name string) (string, string, error)
- func ExtractSpaceMemberTokensFromName(name string) (string, string, error)
- func ExtractSpaceUIDFromName(name string) (string, error)
- func ExtractUserIDFromName(name string) (int32, error)
- func GetNameParentTokens(name string, tokenPrefixes ...string) ([]string, error)
- func IsAuthBootstrapMethod(procedure string) bool
- func IsPublicMethod(procedure string) bool
- func RegisterSSERoutes(router sseRouteRegistrar, hub *SSEHub, storeInstance *store.Store, ...)
- func ResolveUserByName(ctx context.Context, stores *store.Store, name string) (*store.User, error)
- func SetResponseHeader(ctx context.Context, key, value string) error
- func ValidateAndGenerateSpaceUID(provided string) (string, error)
- func ValidateAndGenerateUID(provided string) (string, error)
- func WithHeaderCarrier(ctx context.Context) context.Context
- type APIV1Service
- func (s *APIV1Service) AcceptSpaceInvitation(ctx context.Context, request *v1pb.AcceptSpaceInvitationRequest) (*v1pb.SpaceMember, error)
- func (s *APIV1Service) BatchDeleteAttachments(ctx context.Context, request *v1pb.BatchDeleteAttachmentsRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) BatchGetInstanceSettings(ctx context.Context, request *v1pb.BatchGetInstanceSettingsRequest) (*v1pb.BatchGetInstanceSettingsResponse, error)
- func (s *APIV1Service) BatchGetLinkMetadata(ctx context.Context, request *v1pb.BatchGetLinkMetadataRequest) (*v1pb.BatchGetLinkMetadataResponse, error)
- func (s *APIV1Service) BatchGetUsers(ctx context.Context, request *v1pb.BatchGetUsersRequest) (*v1pb.BatchGetUsersResponse, error)
- func (s *APIV1Service) Check(ctx context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (s *APIV1Service) CloseUploads()
- func (s *APIV1Service) CreateAttachment(ctx context.Context, request *v1pb.CreateAttachmentRequest) (*v1pb.Attachment, error)
- func (s *APIV1Service) CreateIdentityProvider(ctx context.Context, request *v1pb.CreateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) CreateLinkedIdentity(ctx context.Context, request *v1pb.CreateLinkedIdentityRequest) (*v1pb.LinkedIdentity, 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) CreateMemoShare(ctx context.Context, request *v1pb.CreateMemoShareRequest) (*v1pb.MemoShare, error)
- func (s *APIV1Service) CreateMemoView(ctx context.Context, request *v1pb.CreateMemoViewRequest) (*v1pb.MemoView, error)
- func (s *APIV1Service) CreatePersonalAccessToken(ctx context.Context, request *v1pb.CreatePersonalAccessTokenRequest) (*v1pb.CreatePersonalAccessTokenResponse, error)
- func (s *APIV1Service) CreateSpace(ctx context.Context, request *v1pb.CreateSpaceRequest) (*v1pb.Space, error)
- func (s *APIV1Service) CreateSpaceInvitation(ctx context.Context, request *v1pb.CreateSpaceInvitationRequest) (*v1pb.SpaceInvitation, error)
- func (s *APIV1Service) CreateUser(ctx context.Context, request *v1pb.CreateUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) CreateUserWebhook(ctx context.Context, request *v1pb.CreateUserWebhookRequest) (*v1pb.UserWebhook, error)
- func (s *APIV1Service) DeclineSpaceInvitation(ctx context.Context, request *v1pb.DeclineSpaceInvitationRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteAttachment(ctx context.Context, request *v1pb.DeleteAttachmentRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteLinkedIdentity(ctx context.Context, request *v1pb.DeleteLinkedIdentityRequest) (*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) DeleteMemoShare(ctx context.Context, request *v1pb.DeleteMemoShareRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteMemoView(ctx context.Context, request *v1pb.DeleteMemoViewRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeletePersonalAccessToken(ctx context.Context, request *v1pb.DeletePersonalAccessTokenRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteSpace(ctx context.Context, request *v1pb.DeleteSpaceRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteSpaceInvitation(ctx context.Context, request *v1pb.DeleteSpaceInvitationRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteSpaceMember(ctx context.Context, request *v1pb.DeleteSpaceMemberRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteUserNotification(ctx context.Context, request *v1pb.DeleteUserNotificationRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DeleteUserWebhook(ctx context.Context, request *v1pb.DeleteUserWebhookRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) DispatchMemoCommentCreatedWebhook(ctx context.Context, comment, relatedMemo *store.Memo, ...) 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) ExportMemos(ctx context.Context, request *v1pb.ExportMemosRequest) (*httpbody.HttpBody, error)
- func (s *APIV1Service) GetAttachment(ctx context.Context, request *v1pb.GetAttachmentRequest) (*v1pb.Attachment, error)
- func (s *APIV1Service) GetAttachmentBlob(ctx context.Context, attachment *store.Attachment) ([]byte, error)
- func (s *APIV1Service) GetCurrentUser(ctx context.Context, _ *v1pb.GetCurrentUserRequest) (*v1pb.GetCurrentUserResponse, error)
- func (s *APIV1Service) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) GetInstanceAdmin(ctx context.Context) (*v1pb.User, error)
- func (s *APIV1Service) GetInstanceProfile(ctx context.Context, _ *v1pb.GetInstanceProfileRequest) (*v1pb.InstanceProfile, error)
- func (s *APIV1Service) GetInstanceSetting(ctx context.Context, request *v1pb.GetInstanceSettingRequest) (*v1pb.InstanceSetting, error)
- func (s *APIV1Service) GetInstanceStats(ctx context.Context, _ *v1pb.GetInstanceStatsRequest) (*v1pb.InstanceStats, error)
- func (s *APIV1Service) GetLinkMetadata(ctx context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error)
- func (s *APIV1Service) GetLinkedIdentity(ctx context.Context, request *v1pb.GetLinkedIdentityRequest) (*v1pb.LinkedIdentity, error)
- func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) GetMemoView(ctx context.Context, request *v1pb.GetMemoViewRequest) (*v1pb.MemoView, error)
- func (s *APIV1Service) GetSharedMemo(ctx context.Context, request *v1pb.GetSharedMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) GetSpace(ctx context.Context, request *v1pb.GetSpaceRequest) (*v1pb.Space, error)
- func (s *APIV1Service) GetSpaceInvitation(ctx context.Context, request *v1pb.GetSpaceInvitationRequest) (*v1pb.SpaceInvitation, error)
- func (s *APIV1Service) GetSpaceMember(ctx context.Context, request *v1pb.GetSpaceMemberRequest) (*v1pb.SpaceMember, error)
- func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) GetUserSetting(ctx context.Context, request *v1pb.GetUserSettingRequest) (*v1pb.UserSetting, error)
- func (s *APIV1Service) GetUserStats(ctx context.Context, request *v1pb.GetUserStatsRequest) (*v1pb.UserStats, error)
- func (s *APIV1Service) GetUserWebhookSigningSecret(ctx context.Context, request *v1pb.GetUserWebhookSigningSecretRequest) (*v1pb.GetUserWebhookSigningSecretResponse, error)
- func (s *APIV1Service) ImportMemoExport(ctx context.Context, user *store.User, archive *memoexport.File, ...) (*v1pb.MemoImportReport, error)
- func (s *APIV1Service) ImportMemos(ctx context.Context, request *v1pb.ImportMemosRequest) (*v1pb.ImportMemosResponse, error)
- func (s *APIV1Service) ListAllUserStats(ctx context.Context, request *v1pb.ListAllUserStatsRequest) (*v1pb.ListAllUserStatsResponse, error)
- func (s *APIV1Service) ListAttachments(ctx context.Context, request *v1pb.ListAttachmentsRequest) (*v1pb.ListAttachmentsResponse, error)
- func (s *APIV1Service) ListIdentityProviders(ctx context.Context, _ *v1pb.ListIdentityProvidersRequest) (*v1pb.ListIdentityProvidersResponse, error)
- func (s *APIV1Service) ListLinkedIdentities(ctx context.Context, request *v1pb.ListLinkedIdentitiesRequest) (*v1pb.ListLinkedIdentitiesResponse, error)
- func (s *APIV1Service) ListMemoAttachments(ctx context.Context, request *v1pb.ListMemoAttachmentsRequest) (*v1pb.ListMemoAttachmentsResponse, 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) ListMemoShares(ctx context.Context, request *v1pb.ListMemoSharesRequest) (*v1pb.ListMemoSharesResponse, error)
- func (s *APIV1Service) ListMemoViews(ctx context.Context, request *v1pb.ListMemoViewsRequest) (*v1pb.ListMemoViewsResponse, error)
- func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosRequest) (*v1pb.ListMemosResponse, error)
- func (s *APIV1Service) ListPersonalAccessTokens(ctx context.Context, request *v1pb.ListPersonalAccessTokensRequest) (*v1pb.ListPersonalAccessTokensResponse, error)
- func (s *APIV1Service) ListSpaceInvitations(ctx context.Context, request *v1pb.ListSpaceInvitationsRequest) (*v1pb.ListSpaceInvitationsResponse, error)
- func (s *APIV1Service) ListSpaceMembers(ctx context.Context, request *v1pb.ListSpaceMembersRequest) (*v1pb.ListSpaceMembersResponse, error)
- func (s *APIV1Service) ListSpaces(ctx context.Context, request *v1pb.ListSpacesRequest) (*v1pb.ListSpacesResponse, error)
- func (s *APIV1Service) ListUserNotifications(ctx context.Context, request *v1pb.ListUserNotificationsRequest) (*v1pb.ListUserNotificationsResponse, error)
- func (s *APIV1Service) ListUserSettings(ctx context.Context, request *v1pb.ListUserSettingsRequest) (*v1pb.ListUserSettingsResponse, error)
- func (s *APIV1Service) ListUserSpaceInvitations(ctx context.Context, request *v1pb.ListUserSpaceInvitationsRequest) (*v1pb.ListUserSpaceInvitationsResponse, error)
- func (s *APIV1Service) ListUserWebhooks(ctx context.Context, request *v1pb.ListUserWebhooksRequest) (*v1pb.ListUserWebhooksResponse, error)
- func (s *APIV1Service) ListUsers(ctx context.Context, request *v1pb.ListUsersRequest) (*v1pb.ListUsersResponse, error)
- func (s *APIV1Service) PlanMemoImport(ctx context.Context, user *store.User, archive *memoexport.File) (*v1pb.MemoImportPlan, error)
- func (s *APIV1Service) RefreshToken(ctx context.Context, _ *v1pb.RefreshTokenRequest) (*v1pb.RefreshTokenResponse, error)
- func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error
- func (s *APIV1Service) SetMemoAttachments(ctx context.Context, request *v1pb.SetMemoAttachmentsRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) SetMemoRelations(ctx context.Context, request *v1pb.SetMemoRelationsRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest) (*v1pb.SignInResponse, error)
- func (s *APIV1Service) SignOut(ctx context.Context, _ *v1pb.SignOutRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) TestInstanceEmailSetting(ctx context.Context, request *v1pb.TestInstanceEmailSettingRequest) (*emptypb.Empty, error)
- func (s *APIV1Service) Transcribe(ctx context.Context, request *v1pb.TranscribeRequest) (*v1pb.TranscribeResponse, error)
- func (s *APIV1Service) UpdateAttachment(ctx context.Context, request *v1pb.UpdateAttachmentRequest) (*v1pb.Attachment, error)
- func (s *APIV1Service) UpdateIdentityProvider(ctx context.Context, request *v1pb.UpdateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
- func (s *APIV1Service) UpdateInstanceSetting(ctx context.Context, request *v1pb.UpdateInstanceSettingRequest) (*v1pb.InstanceSetting, error)
- func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoRequest) (*v1pb.Memo, error)
- func (s *APIV1Service) UpdateMemoView(ctx context.Context, request *v1pb.UpdateMemoViewRequest) (*v1pb.MemoView, error)
- func (s *APIV1Service) UpdateSpace(ctx context.Context, request *v1pb.UpdateSpaceRequest) (*v1pb.Space, error)
- func (s *APIV1Service) UpdateSpaceMember(ctx context.Context, request *v1pb.UpdateSpaceMemberRequest) (*v1pb.SpaceMember, error)
- func (s *APIV1Service) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRequest) (*v1pb.User, error)
- func (s *APIV1Service) UpdateUserNotification(ctx context.Context, request *v1pb.UpdateUserNotificationRequest) (*v1pb.UserNotification, error)
- func (s *APIV1Service) UpdateUserSetting(ctx context.Context, request *v1pb.UpdateUserSettingRequest) (*v1pb.UserSetting, error)
- func (s *APIV1Service) UpdateUserWebhook(ctx context.Context, request *v1pb.UpdateUserWebhookRequest) (*v1pb.UserWebhook, error)
- func (s *APIV1Service) UploadAttachment(ctx context.Context, request *v1pb.UploadAttachmentRequest) (*v1pb.UploadAttachmentResponse, error)
- func (s *APIV1Service) UpsertMemoReaction(ctx context.Context, request *v1pb.UpsertMemoReactionRequest) (*v1pb.Reaction, error)
- func (s *APIV1Service) WriteMemoExport(ctx context.Context, user *store.User, w io.Writer) error
- type AuthInterceptor
- type Authorizer
- func (a *Authorizer) Authenticate(ctx context.Context, authHeader string) *auth.AuthResult
- func (a *Authorizer) CheckAccess(ctx context.Context, procedure string, result *auth.AuthResult) error
- func (a *Authorizer) Throttle(ctx context.Context, _ string, result *auth.AuthResult) error
- func (a *Authorizer) WithRateLimiter(limiter ratelimit.Limiter) *Authorizer
- type ConnectServiceHandler
- func (s *ConnectServiceHandler) AcceptSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.AcceptSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceMember], error)
- func (s *ConnectServiceHandler) BatchDeleteAttachments(ctx context.Context, req *connect.Request[v1pb.BatchDeleteAttachmentsRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) BatchGetInstanceSettings(ctx context.Context, ...) (*connect.Response[v1pb.BatchGetInstanceSettingsResponse], error)
- func (s *ConnectServiceHandler) BatchGetLinkMetadata(ctx context.Context, req *connect.Request[v1pb.BatchGetLinkMetadataRequest]) (*connect.Response[v1pb.BatchGetLinkMetadataResponse], error)
- func (s *ConnectServiceHandler) BatchGetUsers(ctx context.Context, req *connect.Request[v1pb.BatchGetUsersRequest]) (*connect.Response[v1pb.BatchGetUsersResponse], error)
- func (s *ConnectServiceHandler) CreateAttachment(ctx context.Context, req *connect.Request[v1pb.CreateAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
- func (s *ConnectServiceHandler) CreateIdentityProvider(ctx context.Context, req *connect.Request[v1pb.CreateIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
- func (s *ConnectServiceHandler) CreateLinkedIdentity(ctx context.Context, req *connect.Request[v1pb.CreateLinkedIdentityRequest]) (*connect.Response[v1pb.LinkedIdentity], error)
- func (s *ConnectServiceHandler) CreateMemo(ctx context.Context, req *connect.Request[v1pb.CreateMemoRequest]) (*connect.Response[v1pb.Memo], error)
- func (s *ConnectServiceHandler) CreateMemoComment(ctx context.Context, req *connect.Request[v1pb.CreateMemoCommentRequest]) (*connect.Response[v1pb.Memo], error)
- func (s *ConnectServiceHandler) CreateMemoShare(ctx context.Context, req *connect.Request[v1pb.CreateMemoShareRequest]) (*connect.Response[v1pb.MemoShare], error)
- func (s *ConnectServiceHandler) CreateMemoView(ctx context.Context, req *connect.Request[v1pb.CreateMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
- func (s *ConnectServiceHandler) CreatePersonalAccessToken(ctx context.Context, ...) (*connect.Response[v1pb.CreatePersonalAccessTokenResponse], error)
- func (s *ConnectServiceHandler) CreateSpace(ctx context.Context, req *connect.Request[v1pb.CreateSpaceRequest]) (*connect.Response[v1pb.Space], error)
- func (s *ConnectServiceHandler) CreateSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.CreateSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceInvitation], error)
- func (s *ConnectServiceHandler) CreateUser(ctx context.Context, req *connect.Request[v1pb.CreateUserRequest]) (*connect.Response[v1pb.User], error)
- func (s *ConnectServiceHandler) CreateUserWebhook(ctx context.Context, req *connect.Request[v1pb.CreateUserWebhookRequest]) (*connect.Response[v1pb.UserWebhook], error)
- func (s *ConnectServiceHandler) DeclineSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.DeclineSpaceInvitationRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteAttachment(ctx context.Context, req *connect.Request[v1pb.DeleteAttachmentRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteIdentityProvider(ctx context.Context, req *connect.Request[v1pb.DeleteIdentityProviderRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteLinkedIdentity(ctx context.Context, req *connect.Request[v1pb.DeleteLinkedIdentityRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteMemo(ctx context.Context, req *connect.Request[v1pb.DeleteMemoRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteMemoReaction(ctx context.Context, req *connect.Request[v1pb.DeleteMemoReactionRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteMemoShare(ctx context.Context, req *connect.Request[v1pb.DeleteMemoShareRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteMemoView(ctx context.Context, req *connect.Request[v1pb.DeleteMemoViewRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeletePersonalAccessToken(ctx context.Context, ...) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteSpace(ctx context.Context, req *connect.Request[v1pb.DeleteSpaceRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.DeleteSpaceInvitationRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteSpaceMember(ctx context.Context, req *connect.Request[v1pb.DeleteSpaceMemberRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteUser(ctx context.Context, req *connect.Request[v1pb.DeleteUserRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteUserNotification(ctx context.Context, req *connect.Request[v1pb.DeleteUserNotificationRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) DeleteUserWebhook(ctx context.Context, req *connect.Request[v1pb.DeleteUserWebhookRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) ExportMemos(ctx context.Context, req *connect.Request[v1pb.ExportMemosRequest]) (*connect.Response[httpbody.HttpBody], error)
- func (s *ConnectServiceHandler) GetAttachment(ctx context.Context, req *connect.Request[v1pb.GetAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
- func (s *ConnectServiceHandler) GetCurrentUser(ctx context.Context, req *connect.Request[v1pb.GetCurrentUserRequest]) (*connect.Response[v1pb.GetCurrentUserResponse], error)
- func (s *ConnectServiceHandler) GetIdentityProvider(ctx context.Context, req *connect.Request[v1pb.GetIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
- func (s *ConnectServiceHandler) GetInstanceProfile(ctx context.Context, req *connect.Request[v1pb.GetInstanceProfileRequest]) (*connect.Response[v1pb.InstanceProfile], error)
- func (s *ConnectServiceHandler) GetInstanceSetting(ctx context.Context, req *connect.Request[v1pb.GetInstanceSettingRequest]) (*connect.Response[v1pb.InstanceSetting], error)
- func (s *ConnectServiceHandler) GetInstanceStats(ctx context.Context, req *connect.Request[v1pb.GetInstanceStatsRequest]) (*connect.Response[v1pb.InstanceStats], error)
- func (s *ConnectServiceHandler) GetLinkMetadata(ctx context.Context, req *connect.Request[v1pb.GetLinkMetadataRequest]) (*connect.Response[v1pb.LinkMetadata], error)
- func (s *ConnectServiceHandler) GetLinkedIdentity(ctx context.Context, req *connect.Request[v1pb.GetLinkedIdentityRequest]) (*connect.Response[v1pb.LinkedIdentity], error)
- func (s *ConnectServiceHandler) GetMemo(ctx context.Context, req *connect.Request[v1pb.GetMemoRequest]) (*connect.Response[v1pb.Memo], error)
- func (s *ConnectServiceHandler) GetMemoView(ctx context.Context, req *connect.Request[v1pb.GetMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
- func (s *ConnectServiceHandler) GetSharedMemo(ctx context.Context, req *connect.Request[v1pb.GetSharedMemoRequest]) (*connect.Response[v1pb.Memo], error)
- func (s *ConnectServiceHandler) GetSpace(ctx context.Context, req *connect.Request[v1pb.GetSpaceRequest]) (*connect.Response[v1pb.Space], error)
- func (s *ConnectServiceHandler) GetSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.GetSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceInvitation], error)
- func (s *ConnectServiceHandler) GetSpaceMember(ctx context.Context, req *connect.Request[v1pb.GetSpaceMemberRequest]) (*connect.Response[v1pb.SpaceMember], error)
- func (s *ConnectServiceHandler) GetUser(ctx context.Context, req *connect.Request[v1pb.GetUserRequest]) (*connect.Response[v1pb.User], error)
- func (s *ConnectServiceHandler) GetUserSetting(ctx context.Context, req *connect.Request[v1pb.GetUserSettingRequest]) (*connect.Response[v1pb.UserSetting], error)
- func (s *ConnectServiceHandler) GetUserStats(ctx context.Context, req *connect.Request[v1pb.GetUserStatsRequest]) (*connect.Response[v1pb.UserStats], error)
- func (s *ConnectServiceHandler) GetUserWebhookSigningSecret(ctx context.Context, ...) (*connect.Response[v1pb.GetUserWebhookSigningSecretResponse], error)
- func (s *ConnectServiceHandler) ImportMemos(ctx context.Context, req *connect.Request[v1pb.ImportMemosRequest]) (*connect.Response[v1pb.ImportMemosResponse], error)
- func (s *ConnectServiceHandler) ListAllUserStats(ctx context.Context, req *connect.Request[v1pb.ListAllUserStatsRequest]) (*connect.Response[v1pb.ListAllUserStatsResponse], error)
- func (s *ConnectServiceHandler) ListAttachments(ctx context.Context, req *connect.Request[v1pb.ListAttachmentsRequest]) (*connect.Response[v1pb.ListAttachmentsResponse], error)
- func (s *ConnectServiceHandler) ListIdentityProviders(ctx context.Context, req *connect.Request[v1pb.ListIdentityProvidersRequest]) (*connect.Response[v1pb.ListIdentityProvidersResponse], error)
- func (s *ConnectServiceHandler) ListLinkedIdentities(ctx context.Context, req *connect.Request[v1pb.ListLinkedIdentitiesRequest]) (*connect.Response[v1pb.ListLinkedIdentitiesResponse], error)
- func (s *ConnectServiceHandler) ListMemoAttachments(ctx context.Context, req *connect.Request[v1pb.ListMemoAttachmentsRequest]) (*connect.Response[v1pb.ListMemoAttachmentsResponse], error)
- func (s *ConnectServiceHandler) ListMemoComments(ctx context.Context, req *connect.Request[v1pb.ListMemoCommentsRequest]) (*connect.Response[v1pb.ListMemoCommentsResponse], error)
- func (s *ConnectServiceHandler) ListMemoReactions(ctx context.Context, req *connect.Request[v1pb.ListMemoReactionsRequest]) (*connect.Response[v1pb.ListMemoReactionsResponse], error)
- func (s *ConnectServiceHandler) ListMemoRelations(ctx context.Context, req *connect.Request[v1pb.ListMemoRelationsRequest]) (*connect.Response[v1pb.ListMemoRelationsResponse], error)
- func (s *ConnectServiceHandler) ListMemoShares(ctx context.Context, req *connect.Request[v1pb.ListMemoSharesRequest]) (*connect.Response[v1pb.ListMemoSharesResponse], error)
- func (s *ConnectServiceHandler) ListMemoViews(ctx context.Context, req *connect.Request[v1pb.ListMemoViewsRequest]) (*connect.Response[v1pb.ListMemoViewsResponse], error)
- func (s *ConnectServiceHandler) ListMemos(ctx context.Context, req *connect.Request[v1pb.ListMemosRequest]) (*connect.Response[v1pb.ListMemosResponse], error)
- func (s *ConnectServiceHandler) ListPersonalAccessTokens(ctx context.Context, ...) (*connect.Response[v1pb.ListPersonalAccessTokensResponse], error)
- func (s *ConnectServiceHandler) ListSpaceInvitations(ctx context.Context, req *connect.Request[v1pb.ListSpaceInvitationsRequest]) (*connect.Response[v1pb.ListSpaceInvitationsResponse], error)
- func (s *ConnectServiceHandler) ListSpaceMembers(ctx context.Context, req *connect.Request[v1pb.ListSpaceMembersRequest]) (*connect.Response[v1pb.ListSpaceMembersResponse], error)
- func (s *ConnectServiceHandler) ListSpaces(ctx context.Context, req *connect.Request[v1pb.ListSpacesRequest]) (*connect.Response[v1pb.ListSpacesResponse], error)
- func (s *ConnectServiceHandler) ListUserNotifications(ctx context.Context, req *connect.Request[v1pb.ListUserNotificationsRequest]) (*connect.Response[v1pb.ListUserNotificationsResponse], error)
- func (s *ConnectServiceHandler) ListUserSettings(ctx context.Context, req *connect.Request[v1pb.ListUserSettingsRequest]) (*connect.Response[v1pb.ListUserSettingsResponse], error)
- func (s *ConnectServiceHandler) ListUserSpaceInvitations(ctx context.Context, ...) (*connect.Response[v1pb.ListUserSpaceInvitationsResponse], error)
- func (s *ConnectServiceHandler) ListUserWebhooks(ctx context.Context, req *connect.Request[v1pb.ListUserWebhooksRequest]) (*connect.Response[v1pb.ListUserWebhooksResponse], error)
- func (s *ConnectServiceHandler) ListUsers(ctx context.Context, req *connect.Request[v1pb.ListUsersRequest]) (*connect.Response[v1pb.ListUsersResponse], error)
- func (s *ConnectServiceHandler) RefreshToken(ctx context.Context, req *connect.Request[v1pb.RefreshTokenRequest]) (*connect.Response[v1pb.RefreshTokenResponse], error)
- func (s *ConnectServiceHandler) RegisterConnectHandlers(mux *http.ServeMux, opts ...connect.HandlerOption)
- func (s *ConnectServiceHandler) SetMemoAttachments(ctx context.Context, req *connect.Request[v1pb.SetMemoAttachmentsRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) SetMemoRelations(ctx context.Context, req *connect.Request[v1pb.SetMemoRelationsRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) SignIn(ctx context.Context, req *connect.Request[v1pb.SignInRequest]) (*connect.Response[v1pb.SignInResponse], error)
- func (s *ConnectServiceHandler) SignOut(ctx context.Context, req *connect.Request[v1pb.SignOutRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) TestInstanceEmailSetting(ctx context.Context, ...) (*connect.Response[emptypb.Empty], error)
- func (s *ConnectServiceHandler) Transcribe(ctx context.Context, req *connect.Request[v1pb.TranscribeRequest]) (*connect.Response[v1pb.TranscribeResponse], error)
- func (s *ConnectServiceHandler) UpdateAttachment(ctx context.Context, req *connect.Request[v1pb.UpdateAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
- func (s *ConnectServiceHandler) UpdateIdentityProvider(ctx context.Context, req *connect.Request[v1pb.UpdateIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
- func (s *ConnectServiceHandler) UpdateInstanceSetting(ctx context.Context, req *connect.Request[v1pb.UpdateInstanceSettingRequest]) (*connect.Response[v1pb.InstanceSetting], error)
- func (s *ConnectServiceHandler) UpdateMemo(ctx context.Context, req *connect.Request[v1pb.UpdateMemoRequest]) (*connect.Response[v1pb.Memo], error)
- func (s *ConnectServiceHandler) UpdateMemoView(ctx context.Context, req *connect.Request[v1pb.UpdateMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
- func (s *ConnectServiceHandler) UpdateSpace(ctx context.Context, req *connect.Request[v1pb.UpdateSpaceRequest]) (*connect.Response[v1pb.Space], error)
- func (s *ConnectServiceHandler) UpdateSpaceMember(ctx context.Context, req *connect.Request[v1pb.UpdateSpaceMemberRequest]) (*connect.Response[v1pb.SpaceMember], error)
- func (s *ConnectServiceHandler) UpdateUser(ctx context.Context, req *connect.Request[v1pb.UpdateUserRequest]) (*connect.Response[v1pb.User], error)
- func (s *ConnectServiceHandler) UpdateUserNotification(ctx context.Context, req *connect.Request[v1pb.UpdateUserNotificationRequest]) (*connect.Response[v1pb.UserNotification], error)
- func (s *ConnectServiceHandler) UpdateUserSetting(ctx context.Context, req *connect.Request[v1pb.UpdateUserSettingRequest]) (*connect.Response[v1pb.UserSetting], error)
- func (s *ConnectServiceHandler) UpdateUserWebhook(ctx context.Context, req *connect.Request[v1pb.UpdateUserWebhookRequest]) (*connect.Response[v1pb.UserWebhook], error)
- func (s *ConnectServiceHandler) UploadAttachment(ctx context.Context, req *connect.Request[v1pb.UploadAttachmentRequest]) (*connect.Response[v1pb.UploadAttachmentResponse], error)
- func (s *ConnectServiceHandler) UpsertMemoReaction(ctx context.Context, req *connect.Request[v1pb.UpsertMemoReactionRequest]) (*connect.Response[v1pb.Reaction], error)
- type HeaderCarrier
- type LoggingInterceptor
- func (*LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (*LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (in *LoggingInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type MetadataInterceptor
- func (*MetadataInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (*MetadataInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (*MetadataInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type RecoveryInterceptor
- func (*RecoveryInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (*RecoveryInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (in *RecoveryInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type SSEClient
- type SSEHub
Constants ¶
const ( // DefaultUploadSizeLimitBytes applies when no upload size limit is configured. DefaultUploadSizeLimitBytes = 32 << 20 MebiByte = 1024 * 1024 )
const ( // DefaultPageSize is the default page size for requests. DefaultPageSize = 50 // MaxPageSize is the maximum page size for requests. MaxPageSize = 1000 )
const ( InstanceSettingNamePrefix = "instance/settings/" UserNamePrefix = "users/" MemoNamePrefix = "memos/" AttachmentNamePrefix = "attachments/" ReactionNamePrefix = "reactions/" InboxNamePrefix = "inboxes/" IdentityProviderNamePrefix = "identity-providers/" WebhookNamePrefix = "webhooks/" SpaceNamePrefix = "spaces/" SpaceMemberNamePrefix = "members/" SpaceInvitationNamePrefix = "invitations/" )
const MaxAPIRequestBytes = 256 << 20
MaxAPIRequestBytes caps the size of a request body accepted by the API. The in-process MCP endpoint forwards every tool call through these same routes, so it derives its own limit from this constant to keep the two gates in lockstep.
Variables ¶
var AuthBootstrapMethods = map[string]struct{}{
"/memos.api.v1.AuthService/SignIn": {},
"/memos.api.v1.AuthService/RefreshToken": {},
"/memos.api.v1.InstanceService/GetInstanceProfile": {},
"/memos.api.v1.InstanceService/GetInstanceSetting": {},
"/memos.api.v1.InstanceService/BatchGetInstanceSettings": {},
"/memos.api.v1.IdentityProviderService/ListIdentityProviders": {},
"/memos.api.v1.UserService/CreateUser": {},
"/memos.api.v1.MemoService/GetSharedMemo": {},
}
AuthBootstrapMethods is the subset of PublicMethods that stays reachable by anonymous callers even when the instance access mode is PRIVATE.
It is the minimum required to render the sign-in page, authenticate, and follow share links, and register when instance settings permit it. Every entry here MUST also exist in PublicMethods.
var ErrUnauthenticated = errors.New("authentication required")
ErrUnauthenticated is returned by the Authorizer when a request must be rejected for lack of valid credentials. Each transport maps it to its own status code (Connect: CodeUnauthenticated, gRPC-Gateway: HTTP 401).
var PublicMethods = map[string]struct{}{
"/memos.api.v1.AuthService/SignIn": {},
"/memos.api.v1.AuthService/RefreshToken": {},
"/memos.api.v1.InstanceService/GetInstanceProfile": {},
"/memos.api.v1.InstanceService/GetInstanceSetting": {},
"/memos.api.v1.InstanceService/BatchGetInstanceSettings": {},
"/memos.api.v1.UserService/CreateUser": {},
"/memos.api.v1.UserService/GetUser": {},
"/memos.api.v1.UserService/BatchGetUsers": {},
"/memos.api.v1.UserService/GetUserAvatar": {},
"/memos.api.v1.UserService/GetUserStats": {},
"/memos.api.v1.UserService/ListAllUserStats": {},
"/memos.api.v1.IdentityProviderService/ListIdentityProviders": {},
"/memos.api.v1.MemoService/GetMemo": {},
"/memos.api.v1.MemoService/ListMemos": {},
"/memos.api.v1.MemoService/ListMemoComments": {},
"/memos.api.v1.MemoService/ListMemoAttachments": {},
"/memos.api.v1.MemoService/ListMemoReactions": {},
"/memos.api.v1.MemoService/ListMemoRelations": {},
"/memos.api.v1.MemoService/GetLinkMetadata": {},
"/memos.api.v1.MemoService/BatchGetLinkMetadata": {},
"/memos.api.v1.AttachmentService/GetAttachment": {},
"/memos.api.v1.MemoService/GetSharedMemo": {},
}
PublicMethods defines API endpoints that don't require authentication. All other endpoints require a valid session or access token.
This is the SINGLE SOURCE OF TRUTH for public endpoints. Both Connect interceptor and gRPC-Gateway interceptor use this map.
Format: Full gRPC procedure path as returned by req.Spec().Procedure (Connect) or info.FullMethod (gRPC interceptor).
Functions ¶
func BuildUserName ¶
BuildUserName returns the canonical public resource name for a user.
func ExtractAttachmentUIDFromName ¶
ExtractAttachmentUIDFromName returns the attachment UID from a resource name.
func ExtractInboxIDFromName ¶
ExtractInboxIDFromName returns the inbox ID from a resource name.
func ExtractMemoReactionIDFromName ¶
ExtractMemoReactionIDFromName returns the memo UID and reaction ID from a resource name. e.g., "memos/abc/reactions/123" -> ("abc", 123).
func ExtractMemoUIDFromName ¶
ExtractMemoUIDFromName returns the memo UID from a resource name. e.g., "memos/uuid" -> "uuid".
func ExtractSpaceInvitationTokensFromName ¶
ExtractSpaceInvitationTokensFromName returns the Space UID and invitee username from a SpaceInvitation resource name.
func ExtractSpaceMemberTokensFromName ¶
ExtractSpaceMemberTokensFromName returns the Space UID and username from a SpaceMember resource name.
func ExtractSpaceUIDFromName ¶
ExtractSpaceUIDFromName returns the UID from a Space resource name.
func ExtractUserIDFromName ¶
ExtractUserIDFromName returns the uid from a resource name.
func GetNameParentTokens ¶
GetNameParentTokens returns the tokens from a resource name.
func IsAuthBootstrapMethod ¶
IsAuthBootstrapMethod reports whether an anonymous request to procedure is one of the fixed endpoints allowed while the instance is private.
func IsPublicMethod ¶
IsPublicMethod checks if a procedure path is public (no authentication required). Returns true for public methods, false for protected methods.
func RegisterSSERoutes ¶
func RegisterSSERoutes(router sseRouteRegistrar, hub *SSEHub, storeInstance *store.Store, secret string)
RegisterSSERoutes registers the SSE endpoint on the given Echo router.
func ResolveUserByName ¶
ResolveUserByName resolves a username-based user resource name to a store user.
func SetResponseHeader ¶
SetResponseHeader sets a header in the response.
This function works for both gRPC and Connect protocols:
- For gRPC: Uses grpc.SetHeader to set headers in gRPC metadata
- For Connect: Stores in HeaderCarrier for Connect wrapper to apply later
The protocol is automatically detected based on whether a HeaderCarrier exists in the context (injected by Connect wrappers).
func ValidateAndGenerateSpaceUID ¶
ValidateAndGenerateSpaceUID validates a user-provided Space UID or generates a UUID v4. Custom UIDs use the same format as other public-resource UIDs.
func ValidateAndGenerateUID ¶
ValidateAndGenerateUID validates a user-provided UID or generates a new one. If provided is empty, a new shortuuid is generated. If provided is non-empty, it is validated against identifier.UIDMatcher.
Types ¶
type APIV1Service ¶
type APIV1Service struct {
v1pb.UnimplementedInstanceServiceServer
v1pb.UnimplementedAuthServiceServer
v1pb.UnimplementedUserServiceServer
v1pb.UnimplementedMemoServiceServer
v1pb.UnimplementedSpaceServiceServer
v1pb.UnimplementedAttachmentServiceServer
v1pb.UnimplementedAIServiceServer
v1pb.UnimplementedIdentityProviderServiceServer
Secret string
Profile *profile.Profile
Store *store.Store
MarkdownService markdown.Service
SSEHub *SSEHub
NotificationEmailSender notification.EmailSender
// RateLimiter bounds request rates; nil disables every limit.
RateLimiter ratelimit.Limiter
// Challenge verifies proof-of-humanity tokens on signup and password
// sign-in; nil means no challenge is configured.
Challenge ratelimit.Challenge
// SignupPolicy decides whether a self-service registration may proceed;
// nil allows every registration.
SignupPolicy ratelimit.SignupPolicy
// contains filtered or unexported fields
}
func NewAPIV1Service ¶
NewAPIV1Service creates an API v1 service with its shared dependencies.
func (*APIV1Service) AcceptSpaceInvitation ¶
func (s *APIV1Service) AcceptSpaceInvitation(ctx context.Context, request *v1pb.AcceptSpaceInvitationRequest) (*v1pb.SpaceMember, error)
AcceptSpaceInvitation activates the invited user's membership with the role selected by the administrator who created the invitation.
func (*APIV1Service) BatchDeleteAttachments ¶
func (s *APIV1Service) BatchDeleteAttachments(ctx context.Context, request *v1pb.BatchDeleteAttachmentsRequest) (*emptypb.Empty, error)
func (*APIV1Service) BatchGetInstanceSettings ¶
func (s *APIV1Service) BatchGetInstanceSettings(ctx context.Context, request *v1pb.BatchGetInstanceSettingsRequest) (*v1pb.BatchGetInstanceSettingsResponse, error)
BatchGetInstanceSettings returns multiple instance settings in request order.
func (*APIV1Service) BatchGetLinkMetadata ¶
func (s *APIV1Service) BatchGetLinkMetadata(ctx context.Context, request *v1pb.BatchGetLinkMetadataRequest) (*v1pb.BatchGetLinkMetadataResponse, error)
BatchGetLinkMetadata gets metadata for links.
func (*APIV1Service) BatchGetUsers ¶
func (s *APIV1Service) BatchGetUsers(ctx context.Context, request *v1pb.BatchGetUsersRequest) (*v1pb.BatchGetUsersResponse, error)
func (*APIV1Service) Check ¶
func (s *APIV1Service) Check(ctx context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (*APIV1Service) CloseUploads ¶
func (s *APIV1Service) CloseUploads()
CloseUploads stops every upload manager and removes pending upload files. Call it after draining HTTP requests during server shutdown.
func (*APIV1Service) CreateAttachment ¶
func (s *APIV1Service) CreateAttachment(ctx context.Context, request *v1pb.CreateAttachmentRequest) (*v1pb.Attachment, error)
func (*APIV1Service) CreateIdentityProvider ¶
func (s *APIV1Service) CreateIdentityProvider(ctx context.Context, request *v1pb.CreateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) CreateLinkedIdentity ¶
func (s *APIV1Service) CreateLinkedIdentity(ctx context.Context, request *v1pb.CreateLinkedIdentityRequest) (*v1pb.LinkedIdentity, 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)
CreateMemoComment creates a comment on an existing memo.
func (*APIV1Service) CreateMemoShare ¶
func (s *APIV1Service) CreateMemoShare(ctx context.Context, request *v1pb.CreateMemoShareRequest) (*v1pb.MemoShare, error)
CreateMemoShare creates an opaque share link for a memo. Only the memo's creator may call this.
func (*APIV1Service) CreateMemoView ¶
func (s *APIV1Service) CreateMemoView(ctx context.Context, request *v1pb.CreateMemoViewRequest) (*v1pb.MemoView, error)
CreateMemoView creates a saved memo view for a user.
func (*APIV1Service) CreatePersonalAccessToken ¶
func (s *APIV1Service) CreatePersonalAccessToken(ctx context.Context, request *v1pb.CreatePersonalAccessTokenRequest) (*v1pb.CreatePersonalAccessTokenResponse, error)
CreatePersonalAccessToken creates a new Personal Access Token (PAT) for a user.
Use cases: - User manually creates token in settings for mobile app - User creates token for CLI tool - User creates token for third-party integration
Token properties: - Random string with memos_pat_ prefix - SHA-256 hash stored in database - Optional expiration time (can be never-expiring) - User-provided description for identification
Security considerations: - Full token is only shown ONCE (in this response) - User should copy and store it securely - Token can be revoked by deleting it from settings
Authentication: Required (session cookie or access token) Authorization: User can only create tokens for themselves.
func (*APIV1Service) CreateSpace ¶
func (s *APIV1Service) CreateSpace(ctx context.Context, request *v1pb.CreateSpaceRequest) (*v1pb.Space, error)
CreateSpace creates a space with the caller as its first administrator.
func (*APIV1Service) CreateSpaceInvitation ¶
func (s *APIV1Service) CreateSpaceInvitation(ctx context.Context, request *v1pb.CreateSpaceInvitationRequest) (*v1pb.SpaceInvitation, error)
CreateSpaceInvitation creates a pending invitation without granting any Space access to the invitee.
func (*APIV1Service) CreateUser ¶
func (s *APIV1Service) CreateUser(ctx context.Context, request *v1pb.CreateUserRequest) (*v1pb.User, error)
func (*APIV1Service) CreateUserWebhook ¶
func (s *APIV1Service) CreateUserWebhook(ctx context.Context, request *v1pb.CreateUserWebhookRequest) (*v1pb.UserWebhook, error)
func (*APIV1Service) DeclineSpaceInvitation ¶
func (s *APIV1Service) DeclineSpaceInvitation(ctx context.Context, request *v1pb.DeclineSpaceInvitationRequest) (*emptypb.Empty, error)
DeclineSpaceInvitation deletes the authenticated invitee's pending invitation without ever creating a membership.
func (*APIV1Service) DeleteAttachment ¶
func (s *APIV1Service) DeleteAttachment(ctx context.Context, request *v1pb.DeleteAttachmentRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteIdentityProvider ¶
func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteLinkedIdentity ¶
func (s *APIV1Service) DeleteLinkedIdentity(ctx context.Context, request *v1pb.DeleteLinkedIdentityRequest) (*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) DeleteMemoShare ¶
func (s *APIV1Service) DeleteMemoShare(ctx context.Context, request *v1pb.DeleteMemoShareRequest) (*emptypb.Empty, error)
DeleteMemoShare revokes a share link. Only the memo's creator may call this.
func (*APIV1Service) DeleteMemoView ¶
func (s *APIV1Service) DeleteMemoView(ctx context.Context, request *v1pb.DeleteMemoViewRequest) (*emptypb.Empty, error)
DeleteMemoView deletes a saved memo view by resource name.
func (*APIV1Service) DeletePersonalAccessToken ¶
func (s *APIV1Service) DeletePersonalAccessToken(ctx context.Context, request *v1pb.DeletePersonalAccessTokenRequest) (*emptypb.Empty, error)
DeletePersonalAccessToken revokes a Personal Access Token.
This endpoint: 1. Removes the token from the user's access tokens list 2. Immediately invalidates the token (subsequent API calls with it will fail)
Use cases: - User revokes a compromised token - User removes token for unused app/device - User cleans up old tokens
Authentication: Required (session cookie or access token) Authorization: User can only delete their own tokens.
func (*APIV1Service) DeleteSpace ¶
func (s *APIV1Service) DeleteSpace(ctx context.Context, request *v1pb.DeleteSpaceRequest) (*emptypb.Empty, error)
DeleteSpace permanently deletes the Space and every memo directly placed in it. The result deliberately exposes no memo inventory to the administrator.
func (*APIV1Service) DeleteSpaceInvitation ¶
func (s *APIV1Service) DeleteSpaceInvitation(ctx context.Context, request *v1pb.DeleteSpaceInvitationRequest) (*emptypb.Empty, error)
DeleteSpaceInvitation revokes a pending invitation. Only an active Space administrator can revoke it.
func (*APIV1Service) DeleteSpaceMember ¶
func (s *APIV1Service) DeleteSpaceMember(ctx context.Context, request *v1pb.DeleteSpaceMemberRequest) (*emptypb.Empty, error)
DeleteSpaceMember removes a membership or lets a member leave a space.
func (*APIV1Service) DeleteUser ¶
func (s *APIV1Service) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRequest) (*emptypb.Empty, error)
func (*APIV1Service) DeleteUserNotification ¶
func (s *APIV1Service) DeleteUserNotification(ctx context.Context, request *v1pb.DeleteUserNotificationRequest) (*emptypb.Empty, error)
DeleteUserNotification permanently deletes a notification. Only the notification owner can delete their notifications.
func (*APIV1Service) DeleteUserWebhook ¶
func (s *APIV1Service) DeleteUserWebhook(ctx context.Context, request *v1pb.DeleteUserWebhookRequest) (*emptypb.Empty, error)
func (*APIV1Service) DispatchMemoCommentCreatedWebhook ¶
func (s *APIV1Service) DispatchMemoCommentCreatedWebhook( ctx context.Context, comment, relatedMemo *store.Memo, relatedMemoCreatorID int32, ) error
DispatchMemoCommentCreatedWebhook dispatches webhook to the related memo owner when a comment is created.
func (*APIV1Service) DispatchMemoCreatedWebhook ¶
DispatchMemoCreatedWebhook dispatches a webhook when a 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) ExportMemos ¶
func (s *APIV1Service) ExportMemos(ctx context.Context, request *v1pb.ExportMemosRequest) (*httpbody.HttpBody, error)
ExportMemos writes the caller's Memos export file into the response body.
func (*APIV1Service) GetAttachment ¶
func (s *APIV1Service) GetAttachment(ctx context.Context, request *v1pb.GetAttachmentRequest) (*v1pb.Attachment, error)
func (*APIV1Service) GetAttachmentBlob ¶
func (s *APIV1Service) GetAttachmentBlob(ctx context.Context, attachment *store.Attachment) ([]byte, error)
GetAttachmentBlob reads an attachment from its configured storage.
func (*APIV1Service) GetCurrentUser ¶
func (s *APIV1Service) GetCurrentUser(ctx context.Context, _ *v1pb.GetCurrentUserRequest) (*v1pb.GetCurrentUserResponse, error)
GetCurrentUser returns the authenticated user's information. Validates the access token and returns user details.
Authentication: Required (access token). Returns: User information.
func (*APIV1Service) GetIdentityProvider ¶
func (s *APIV1Service) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) GetInstanceAdmin ¶
func (*APIV1Service) GetInstanceProfile ¶
func (s *APIV1Service) GetInstanceProfile(ctx context.Context, _ *v1pb.GetInstanceProfileRequest) (*v1pb.InstanceProfile, error)
GetInstanceProfile returns the instance profile.
func (*APIV1Service) GetInstanceSetting ¶
func (s *APIV1Service) GetInstanceSetting(ctx context.Context, request *v1pb.GetInstanceSettingRequest) (*v1pb.InstanceSetting, error)
func (*APIV1Service) GetInstanceStats ¶
func (s *APIV1Service) GetInstanceStats(ctx context.Context, _ *v1pb.GetInstanceStatsRequest) (*v1pb.InstanceStats, error)
GetInstanceStats returns resource usage statistics. Admin only.
func (*APIV1Service) GetLinkMetadata ¶
func (s *APIV1Service) GetLinkMetadata(ctx context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error)
GetLinkMetadata gets metadata for a link.
func (*APIV1Service) GetLinkedIdentity ¶
func (s *APIV1Service) GetLinkedIdentity(ctx context.Context, request *v1pb.GetLinkedIdentityRequest) (*v1pb.LinkedIdentity, error)
func (*APIV1Service) GetMemo ¶
func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error)
func (*APIV1Service) GetMemoView ¶
func (s *APIV1Service) GetMemoView(ctx context.Context, request *v1pb.GetMemoViewRequest) (*v1pb.MemoView, error)
GetMemoView returns a saved memo view by resource name.
func (*APIV1Service) GetSharedMemo ¶
func (s *APIV1Service) GetSharedMemo(ctx context.Context, request *v1pb.GetSharedMemoRequest) (*v1pb.Memo, error)
GetSharedMemo resolves a share token to its memo. No authentication required. Returns NOT_FOUND for invalid or expired tokens (no information leakage).
func (*APIV1Service) GetSpace ¶
func (s *APIV1Service) GetSpace(ctx context.Context, request *v1pb.GetSpaceRequest) (*v1pb.Space, error)
GetSpace gets a space visible to the caller through membership.
func (*APIV1Service) GetSpaceInvitation ¶
func (s *APIV1Service) GetSpaceInvitation(ctx context.Context, request *v1pb.GetSpaceInvitationRequest) (*v1pb.SpaceInvitation, error)
GetSpaceInvitation gets a pending invitation for its invitee or a Space administrator.
func (*APIV1Service) GetSpaceMember ¶
func (s *APIV1Service) GetSpaceMember(ctx context.Context, request *v1pb.GetSpaceMemberRequest) (*v1pb.SpaceMember, error)
GetSpaceMember gets one membership visible to another member of the space.
func (*APIV1Service) GetUser ¶
func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error)
func (*APIV1Service) GetUserSetting ¶
func (s *APIV1Service) GetUserSetting(ctx context.Context, request *v1pb.GetUserSettingRequest) (*v1pb.UserSetting, error)
func (*APIV1Service) GetUserStats ¶
func (s *APIV1Service) GetUserStats(ctx context.Context, request *v1pb.GetUserStatsRequest) (*v1pb.UserStats, error)
func (*APIV1Service) GetUserWebhookSigningSecret ¶
func (s *APIV1Service) GetUserWebhookSigningSecret(ctx context.Context, request *v1pb.GetUserWebhookSigningSecretRequest) (*v1pb.GetUserWebhookSigningSecretResponse, error)
GetUserWebhookSigningSecret reveals the signing secret for a single webhook. This is the only endpoint that returns the secret value; it is gated to the webhook owner and the secret is never included in list/create/update responses.
func (*APIV1Service) ImportMemoExport ¶
func (s *APIV1Service) ImportMemoExport(ctx context.Context, user *store.User, archive *memoexport.File, policy v1pb.ImportMemosRequest_ConflictPolicy) (*v1pb.MemoImportReport, error)
ImportMemoExport applies an opened archive to the importing user's memos following the documented import semantics. The user in ctx must be the same as user.
func (*APIV1Service) ImportMemos ¶
func (s *APIV1Service) ImportMemos(ctx context.Context, request *v1pb.ImportMemosRequest) (*v1pb.ImportMemosResponse, error)
ImportMemos stages an archive in chunks and, on the finishing call, plans or imports it. See the proto comment for the protocol.
func (*APIV1Service) ListAllUserStats ¶
func (s *APIV1Service) ListAllUserStats(ctx context.Context, request *v1pb.ListAllUserStatsRequest) (*v1pb.ListAllUserStatsResponse, error)
func (*APIV1Service) ListAttachments ¶
func (s *APIV1Service) ListAttachments(ctx context.Context, request *v1pb.ListAttachmentsRequest) (*v1pb.ListAttachmentsResponse, error)
func (*APIV1Service) ListIdentityProviders ¶
func (s *APIV1Service) ListIdentityProviders(ctx context.Context, _ *v1pb.ListIdentityProvidersRequest) (*v1pb.ListIdentityProvidersResponse, error)
func (*APIV1Service) ListLinkedIdentities ¶
func (s *APIV1Service) ListLinkedIdentities(ctx context.Context, request *v1pb.ListLinkedIdentitiesRequest) (*v1pb.ListLinkedIdentitiesResponse, error)
func (*APIV1Service) ListMemoAttachments ¶
func (s *APIV1Service) ListMemoAttachments(ctx context.Context, request *v1pb.ListMemoAttachmentsRequest) (*v1pb.ListMemoAttachmentsResponse, 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) ListMemoShares ¶
func (s *APIV1Service) ListMemoShares(ctx context.Context, request *v1pb.ListMemoSharesRequest) (*v1pb.ListMemoSharesResponse, error)
ListMemoShares lists all share links for a memo. Only the memo's creator may call this.
func (*APIV1Service) ListMemoViews ¶
func (s *APIV1Service) ListMemoViews(ctx context.Context, request *v1pb.ListMemoViewsRequest) (*v1pb.ListMemoViewsResponse, error)
ListMemoViews lists the saved memo views owned by a user.
func (*APIV1Service) ListMemos ¶
func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosRequest) (*v1pb.ListMemosResponse, error)
func (*APIV1Service) ListPersonalAccessTokens ¶
func (s *APIV1Service) ListPersonalAccessTokens(ctx context.Context, request *v1pb.ListPersonalAccessTokensRequest) (*v1pb.ListPersonalAccessTokensResponse, error)
func (*APIV1Service) ListSpaceInvitations ¶
func (s *APIV1Service) ListSpaceInvitations(ctx context.Context, request *v1pb.ListSpaceInvitationsRequest) (*v1pb.ListSpaceInvitationsResponse, error)
ListSpaceInvitations lists pending invitations after requiring an active Space administrator.
func (*APIV1Service) ListSpaceMembers ¶
func (s *APIV1Service) ListSpaceMembers(ctx context.Context, request *v1pb.ListSpaceMembersRequest) (*v1pb.ListSpaceMembersResponse, error)
ListSpaceMembers lists memberships after authorizing the caller's own membership before applying pagination.
func (*APIV1Service) ListSpaces ¶
func (s *APIV1Service) ListSpaces(ctx context.Context, request *v1pb.ListSpacesRequest) (*v1pb.ListSpacesResponse, error)
ListSpaces lists only spaces with a membership for the caller.
func (*APIV1Service) ListUserNotifications ¶
func (s *APIV1Service) ListUserNotifications(ctx context.Context, request *v1pb.ListUserNotificationsRequest) (*v1pb.ListUserNotificationsResponse, error)
func (*APIV1Service) ListUserSettings ¶
func (s *APIV1Service) ListUserSettings(ctx context.Context, request *v1pb.ListUserSettingsRequest) (*v1pb.ListUserSettingsResponse, error)
func (*APIV1Service) ListUserSpaceInvitations ¶
func (s *APIV1Service) ListUserSpaceInvitations(ctx context.Context, request *v1pb.ListUserSpaceInvitationsRequest) (*v1pb.ListUserSpaceInvitationsResponse, error)
ListUserSpaceInvitations lists the authenticated user's received pending invitations. A user cannot enumerate another user's invitations.
func (*APIV1Service) ListUserWebhooks ¶
func (s *APIV1Service) ListUserWebhooks(ctx context.Context, request *v1pb.ListUserWebhooksRequest) (*v1pb.ListUserWebhooksResponse, error)
func (*APIV1Service) ListUsers ¶
func (s *APIV1Service) ListUsers(ctx context.Context, request *v1pb.ListUsersRequest) (*v1pb.ListUsersResponse, error)
func (*APIV1Service) PlanMemoImport ¶
func (s *APIV1Service) PlanMemoImport(ctx context.Context, user *store.User, archive *memoexport.File) (*v1pb.MemoImportPlan, error)
PlanMemoImport classifies every record of an archive against the instance without writing anything.
func (*APIV1Service) RefreshToken ¶
func (s *APIV1Service) RefreshToken(ctx context.Context, _ *v1pb.RefreshTokenRequest) (*v1pb.RefreshTokenResponse, error)
RefreshToken exchanges a valid refresh token for a new access token.
This endpoint implements refresh token rotation with sliding window sessions: 1. Extracts the refresh token from the HttpOnly cookie (memos_refresh) 2. Validates the refresh token against the database (checking expiry and revocation) 3. Rotates the refresh token: generates a new one with fresh 30-day expiry 4. Generates a new short-lived access token (15 minutes) 5. Sets the new refresh token as HttpOnly cookie 6. Returns the new access token and its expiry time
Token rotation provides: - Sliding window sessions: active users stay logged in indefinitely - Better security: stolen refresh tokens become invalid after legitimate refresh
Authentication: Requires valid refresh token in cookie (public endpoint) Returns: New access token and expiry timestamp.
func (*APIV1Service) RegisterGateway ¶
RegisterGateway registers the gRPC-Gateway and Connect handlers with the given Echo instance.
func (*APIV1Service) SetMemoAttachments ¶
func (s *APIV1Service) SetMemoAttachments(ctx context.Context, request *v1pb.SetMemoAttachmentsRequest) (*emptypb.Empty, error)
func (*APIV1Service) SetMemoRelations ¶
func (s *APIV1Service) SetMemoRelations(ctx context.Context, request *v1pb.SetMemoRelationsRequest) (*emptypb.Empty, error)
func (*APIV1Service) SignIn ¶
func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest) (*v1pb.SignInResponse, error)
SignIn authenticates a user with credentials and returns tokens. On success, returns an access token and sets a refresh token cookie.
Supports two authentication methods: 1. Password-based authentication (username + password). 2. SSO authentication (OAuth2 authorization code).
Authentication: Not required (public endpoint). Returns: User info, access token, and token expiry.
func (*APIV1Service) SignOut ¶
func (s *APIV1Service) SignOut(ctx context.Context, _ *v1pb.SignOutRequest) (*emptypb.Empty, error)
SignOut terminates the user's authentication. Revokes the refresh token and clears the authentication cookie.
Authentication: Required (access token). Returns: Empty response on success.
func (*APIV1Service) TestInstanceEmailSetting ¶
func (s *APIV1Service) TestInstanceEmailSetting(ctx context.Context, request *v1pb.TestInstanceEmailSettingRequest) (*emptypb.Empty, error)
func (*APIV1Service) Transcribe ¶
func (s *APIV1Service) Transcribe(ctx context.Context, request *v1pb.TranscribeRequest) (*v1pb.TranscribeResponse, error)
Transcribe transcribes an audio file using an instance AI provider.
func (*APIV1Service) UpdateAttachment ¶
func (s *APIV1Service) UpdateAttachment(ctx context.Context, request *v1pb.UpdateAttachmentRequest) (*v1pb.Attachment, error)
func (*APIV1Service) UpdateIdentityProvider ¶
func (s *APIV1Service) UpdateIdentityProvider(ctx context.Context, request *v1pb.UpdateIdentityProviderRequest) (*v1pb.IdentityProvider, error)
func (*APIV1Service) UpdateInstanceSetting ¶
func (s *APIV1Service) UpdateInstanceSetting(ctx context.Context, request *v1pb.UpdateInstanceSettingRequest) (*v1pb.InstanceSetting, error)
func (*APIV1Service) UpdateMemo ¶
func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoRequest) (*v1pb.Memo, error)
UpdateMemo updates an existing memo.
func (*APIV1Service) UpdateMemoView ¶
func (s *APIV1Service) UpdateMemoView(ctx context.Context, request *v1pb.UpdateMemoViewRequest) (*v1pb.MemoView, error)
UpdateMemoView updates the selected fields of a saved memo view.
func (*APIV1Service) UpdateSpace ¶
func (s *APIV1Service) UpdateSpace(ctx context.Context, request *v1pb.UpdateSpaceRequest) (*v1pb.Space, error)
UpdateSpace updates Space metadata.
func (*APIV1Service) UpdateSpaceMember ¶
func (s *APIV1Service) UpdateSpaceMember(ctx context.Context, request *v1pb.UpdateSpaceMemberRequest) (*v1pb.SpaceMember, error)
UpdateSpaceMember changes a member's role in a Space.
func (*APIV1Service) UpdateUser ¶
func (s *APIV1Service) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRequest) (*v1pb.User, error)
func (*APIV1Service) UpdateUserNotification ¶
func (s *APIV1Service) UpdateUserNotification(ctx context.Context, request *v1pb.UpdateUserNotificationRequest) (*v1pb.UserNotification, error)
UpdateUserNotification updates a notification's status (e.g., marking as read/archived). Only the notification owner can update their notifications.
func (*APIV1Service) UpdateUserSetting ¶
func (s *APIV1Service) UpdateUserSetting(ctx context.Context, request *v1pb.UpdateUserSettingRequest) (*v1pb.UserSetting, error)
func (*APIV1Service) UpdateUserWebhook ¶
func (s *APIV1Service) UpdateUserWebhook(ctx context.Context, request *v1pb.UpdateUserWebhookRequest) (*v1pb.UserWebhook, error)
func (*APIV1Service) UploadAttachment ¶
func (s *APIV1Service) UploadAttachment(ctx context.Context, request *v1pb.UploadAttachmentRequest) (*v1pb.UploadAttachmentResponse, error)
UploadAttachment accepts bounded unary chunks. A call carrying a spec opens a new upload; a call carrying an upload ID continues one. Either kind may write data and finalize.
func (*APIV1Service) UpsertMemoReaction ¶
func (s *APIV1Service) UpsertMemoReaction(ctx context.Context, request *v1pb.UpsertMemoReactionRequest) (*v1pb.Reaction, error)
func (*APIV1Service) WriteMemoExport ¶
WriteMemoExport writes a Memos export file holding every memo the user created, including comments and archived memos, and the attachments linked to them. Nothing another user created is included.
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
AuthInterceptor enforces authentication and anonymous-access policy for Connect handlers by delegating to the shared Authorizer. Role-based authorization (admin checks) remains in the service layer.
func NewAuthInterceptor ¶
func NewAuthInterceptor(authorizer *Authorizer) *AuthInterceptor
NewAuthInterceptor creates a new auth interceptor backed by the shared Authorizer.
func (*AuthInterceptor) WrapStreamingClient ¶
func (*AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*AuthInterceptor) WrapStreamingHandler ¶
func (*AuthInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
Authorizer is the single source of truth for method-level access control.
It authenticates a request from its Authorization header and decides whether the (possibly anonymous) caller may reach a given RPC procedure. The Connect interceptor and the gRPC-Gateway middleware share one Authorizer so both transports enforce identical rules.
Role-based authorization (admin checks) stays in the service layer; this type governs only authentication and anonymous access.
func NewAuthorizer ¶
func NewAuthorizer(store *store.Store, secret string) *Authorizer
NewAuthorizer creates an Authorizer backed by the given store and token secret.
func (*Authorizer) Authenticate ¶
func (a *Authorizer) Authenticate(ctx context.Context, authHeader string) *auth.AuthResult
Authenticate resolves the caller from the Authorization header, returning nil for an anonymous request. It never enforces policy — pair it with CheckAccess.
func (*Authorizer) CheckAccess ¶
func (a *Authorizer) CheckAccess(ctx context.Context, procedure string, result *auth.AuthResult) error
CheckAccess enforces method-level access policy for procedure given the authentication result (nil = anonymous). It returns nil when the request is permitted and ErrUnauthenticated otherwise.
Policy:
- Authenticated caller (access token or PAT): always permitted here.
- Anonymous + protected method: denied.
- Anonymous + auth-bootstrap method: permitted on every instance.
- Anonymous + other public method: permitted only when the stored access mode is PUBLIC.
func (*Authorizer) Throttle ¶
func (a *Authorizer) Throttle(ctx context.Context, _ string, result *auth.AuthResult) error
Throttle enforces the catch-all budget for a request that CheckAccess has already permitted: the authenticated budget keyed by user, or the anonymous budget keyed by client address. Every request costs one unit; batch handlers add their item count afterwards. It returns a RESOURCE_EXHAUSTED status when the budget is spent.
func (*Authorizer) WithRateLimiter ¶
func (a *Authorizer) WithRateLimiter(limiter ratelimit.Limiter) *Authorizer
WithRateLimiter enables the catch-all request budgets. A nil limiter leaves every request unbounded.
type ConnectServiceHandler ¶
type ConnectServiceHandler struct {
*APIV1Service
}
ConnectServiceHandler wraps APIV1Service to implement Connect handler interfaces. It adapts the existing gRPC service implementations to work with Connect's request/response wrapper types.
This wrapper pattern allows us to: - Reuse existing gRPC service implementations - Support both native gRPC and Connect protocols - Maintain a single source of truth for business logic.
func NewConnectServiceHandler ¶
func NewConnectServiceHandler(svc *APIV1Service) *ConnectServiceHandler
NewConnectServiceHandler creates a new Connect service handler.
func (*ConnectServiceHandler) AcceptSpaceInvitation ¶
func (s *ConnectServiceHandler) AcceptSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.AcceptSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceMember], error)
func (*ConnectServiceHandler) BatchDeleteAttachments ¶
func (*ConnectServiceHandler) BatchGetInstanceSettings ¶
func (s *ConnectServiceHandler) BatchGetInstanceSettings(ctx context.Context, req *connect.Request[v1pb.BatchGetInstanceSettingsRequest]) (*connect.Response[v1pb.BatchGetInstanceSettingsResponse], error)
func (*ConnectServiceHandler) BatchGetLinkMetadata ¶
func (s *ConnectServiceHandler) BatchGetLinkMetadata(ctx context.Context, req *connect.Request[v1pb.BatchGetLinkMetadataRequest]) (*connect.Response[v1pb.BatchGetLinkMetadataResponse], error)
func (*ConnectServiceHandler) BatchGetUsers ¶
func (s *ConnectServiceHandler) BatchGetUsers(ctx context.Context, req *connect.Request[v1pb.BatchGetUsersRequest]) (*connect.Response[v1pb.BatchGetUsersResponse], error)
func (*ConnectServiceHandler) CreateAttachment ¶
func (s *ConnectServiceHandler) CreateAttachment(ctx context.Context, req *connect.Request[v1pb.CreateAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
func (*ConnectServiceHandler) CreateIdentityProvider ¶
func (s *ConnectServiceHandler) CreateIdentityProvider(ctx context.Context, req *connect.Request[v1pb.CreateIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
func (*ConnectServiceHandler) CreateLinkedIdentity ¶
func (s *ConnectServiceHandler) CreateLinkedIdentity(ctx context.Context, req *connect.Request[v1pb.CreateLinkedIdentityRequest]) (*connect.Response[v1pb.LinkedIdentity], error)
func (*ConnectServiceHandler) CreateMemo ¶
func (*ConnectServiceHandler) CreateMemoComment ¶
func (*ConnectServiceHandler) CreateMemoShare ¶
func (*ConnectServiceHandler) CreateMemoView ¶
func (s *ConnectServiceHandler) CreateMemoView(ctx context.Context, req *connect.Request[v1pb.CreateMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
CreateMemoView creates a saved memo view for a user.
func (*ConnectServiceHandler) CreatePersonalAccessToken ¶
func (s *ConnectServiceHandler) CreatePersonalAccessToken(ctx context.Context, req *connect.Request[v1pb.CreatePersonalAccessTokenRequest]) (*connect.Response[v1pb.CreatePersonalAccessTokenResponse], error)
func (*ConnectServiceHandler) CreateSpace ¶
func (*ConnectServiceHandler) CreateSpaceInvitation ¶
func (s *ConnectServiceHandler) CreateSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.CreateSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceInvitation], error)
func (*ConnectServiceHandler) CreateUser ¶
func (*ConnectServiceHandler) CreateUserWebhook ¶
func (s *ConnectServiceHandler) CreateUserWebhook(ctx context.Context, req *connect.Request[v1pb.CreateUserWebhookRequest]) (*connect.Response[v1pb.UserWebhook], error)
func (*ConnectServiceHandler) DeclineSpaceInvitation ¶
func (*ConnectServiceHandler) DeleteAttachment ¶
func (*ConnectServiceHandler) DeleteIdentityProvider ¶
func (*ConnectServiceHandler) DeleteLinkedIdentity ¶
func (*ConnectServiceHandler) DeleteMemo ¶
func (*ConnectServiceHandler) DeleteMemoReaction ¶
func (*ConnectServiceHandler) DeleteMemoShare ¶
func (*ConnectServiceHandler) DeleteMemoView ¶
func (s *ConnectServiceHandler) DeleteMemoView(ctx context.Context, req *connect.Request[v1pb.DeleteMemoViewRequest]) (*connect.Response[emptypb.Empty], error)
DeleteMemoView deletes a saved memo view by resource name.
func (*ConnectServiceHandler) DeletePersonalAccessToken ¶
func (*ConnectServiceHandler) DeleteSpace ¶
func (*ConnectServiceHandler) DeleteSpaceInvitation ¶
func (*ConnectServiceHandler) DeleteSpaceMember ¶
func (*ConnectServiceHandler) DeleteUser ¶
func (*ConnectServiceHandler) DeleteUserNotification ¶
func (*ConnectServiceHandler) DeleteUserWebhook ¶
func (*ConnectServiceHandler) ExportMemos ¶
func (*ConnectServiceHandler) GetAttachment ¶
func (s *ConnectServiceHandler) GetAttachment(ctx context.Context, req *connect.Request[v1pb.GetAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
func (*ConnectServiceHandler) GetCurrentUser ¶
func (s *ConnectServiceHandler) GetCurrentUser(ctx context.Context, req *connect.Request[v1pb.GetCurrentUserRequest]) (*connect.Response[v1pb.GetCurrentUserResponse], error)
func (*ConnectServiceHandler) GetIdentityProvider ¶
func (s *ConnectServiceHandler) GetIdentityProvider(ctx context.Context, req *connect.Request[v1pb.GetIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
func (*ConnectServiceHandler) GetInstanceProfile ¶
func (s *ConnectServiceHandler) GetInstanceProfile(ctx context.Context, req *connect.Request[v1pb.GetInstanceProfileRequest]) (*connect.Response[v1pb.InstanceProfile], error)
func (*ConnectServiceHandler) GetInstanceSetting ¶
func (s *ConnectServiceHandler) GetInstanceSetting(ctx context.Context, req *connect.Request[v1pb.GetInstanceSettingRequest]) (*connect.Response[v1pb.InstanceSetting], error)
func (*ConnectServiceHandler) GetInstanceStats ¶
func (s *ConnectServiceHandler) GetInstanceStats(ctx context.Context, req *connect.Request[v1pb.GetInstanceStatsRequest]) (*connect.Response[v1pb.InstanceStats], error)
func (*ConnectServiceHandler) GetLinkMetadata ¶
func (s *ConnectServiceHandler) GetLinkMetadata(ctx context.Context, req *connect.Request[v1pb.GetLinkMetadataRequest]) (*connect.Response[v1pb.LinkMetadata], error)
func (*ConnectServiceHandler) GetLinkedIdentity ¶
func (s *ConnectServiceHandler) GetLinkedIdentity(ctx context.Context, req *connect.Request[v1pb.GetLinkedIdentityRequest]) (*connect.Response[v1pb.LinkedIdentity], error)
func (*ConnectServiceHandler) GetMemoView ¶
func (s *ConnectServiceHandler) GetMemoView(ctx context.Context, req *connect.Request[v1pb.GetMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
GetMemoView returns a saved memo view by resource name.
func (*ConnectServiceHandler) GetSharedMemo ¶
func (*ConnectServiceHandler) GetSpaceInvitation ¶
func (s *ConnectServiceHandler) GetSpaceInvitation(ctx context.Context, req *connect.Request[v1pb.GetSpaceInvitationRequest]) (*connect.Response[v1pb.SpaceInvitation], error)
func (*ConnectServiceHandler) GetSpaceMember ¶
func (s *ConnectServiceHandler) GetSpaceMember(ctx context.Context, req *connect.Request[v1pb.GetSpaceMemberRequest]) (*connect.Response[v1pb.SpaceMember], error)
func (*ConnectServiceHandler) GetUserSetting ¶
func (s *ConnectServiceHandler) GetUserSetting(ctx context.Context, req *connect.Request[v1pb.GetUserSettingRequest]) (*connect.Response[v1pb.UserSetting], error)
func (*ConnectServiceHandler) GetUserStats ¶
func (*ConnectServiceHandler) GetUserWebhookSigningSecret ¶
func (s *ConnectServiceHandler) GetUserWebhookSigningSecret(ctx context.Context, req *connect.Request[v1pb.GetUserWebhookSigningSecretRequest]) (*connect.Response[v1pb.GetUserWebhookSigningSecretResponse], error)
func (*ConnectServiceHandler) ImportMemos ¶
func (s *ConnectServiceHandler) ImportMemos(ctx context.Context, req *connect.Request[v1pb.ImportMemosRequest]) (*connect.Response[v1pb.ImportMemosResponse], error)
func (*ConnectServiceHandler) ListAllUserStats ¶
func (s *ConnectServiceHandler) ListAllUserStats(ctx context.Context, req *connect.Request[v1pb.ListAllUserStatsRequest]) (*connect.Response[v1pb.ListAllUserStatsResponse], error)
func (*ConnectServiceHandler) ListAttachments ¶
func (s *ConnectServiceHandler) ListAttachments(ctx context.Context, req *connect.Request[v1pb.ListAttachmentsRequest]) (*connect.Response[v1pb.ListAttachmentsResponse], error)
func (*ConnectServiceHandler) ListIdentityProviders ¶
func (s *ConnectServiceHandler) ListIdentityProviders(ctx context.Context, req *connect.Request[v1pb.ListIdentityProvidersRequest]) (*connect.Response[v1pb.ListIdentityProvidersResponse], error)
func (*ConnectServiceHandler) ListLinkedIdentities ¶
func (s *ConnectServiceHandler) ListLinkedIdentities(ctx context.Context, req *connect.Request[v1pb.ListLinkedIdentitiesRequest]) (*connect.Response[v1pb.ListLinkedIdentitiesResponse], error)
func (*ConnectServiceHandler) ListMemoAttachments ¶
func (s *ConnectServiceHandler) ListMemoAttachments(ctx context.Context, req *connect.Request[v1pb.ListMemoAttachmentsRequest]) (*connect.Response[v1pb.ListMemoAttachmentsResponse], error)
func (*ConnectServiceHandler) ListMemoComments ¶
func (s *ConnectServiceHandler) ListMemoComments(ctx context.Context, req *connect.Request[v1pb.ListMemoCommentsRequest]) (*connect.Response[v1pb.ListMemoCommentsResponse], error)
func (*ConnectServiceHandler) ListMemoReactions ¶
func (s *ConnectServiceHandler) ListMemoReactions(ctx context.Context, req *connect.Request[v1pb.ListMemoReactionsRequest]) (*connect.Response[v1pb.ListMemoReactionsResponse], error)
func (*ConnectServiceHandler) ListMemoRelations ¶
func (s *ConnectServiceHandler) ListMemoRelations(ctx context.Context, req *connect.Request[v1pb.ListMemoRelationsRequest]) (*connect.Response[v1pb.ListMemoRelationsResponse], error)
func (*ConnectServiceHandler) ListMemoShares ¶
func (s *ConnectServiceHandler) ListMemoShares(ctx context.Context, req *connect.Request[v1pb.ListMemoSharesRequest]) (*connect.Response[v1pb.ListMemoSharesResponse], error)
func (*ConnectServiceHandler) ListMemoViews ¶
func (s *ConnectServiceHandler) ListMemoViews(ctx context.Context, req *connect.Request[v1pb.ListMemoViewsRequest]) (*connect.Response[v1pb.ListMemoViewsResponse], error)
ListMemoViews lists the saved memo views owned by a user.
func (*ConnectServiceHandler) ListMemos ¶
func (s *ConnectServiceHandler) ListMemos(ctx context.Context, req *connect.Request[v1pb.ListMemosRequest]) (*connect.Response[v1pb.ListMemosResponse], error)
func (*ConnectServiceHandler) ListPersonalAccessTokens ¶
func (s *ConnectServiceHandler) ListPersonalAccessTokens(ctx context.Context, req *connect.Request[v1pb.ListPersonalAccessTokensRequest]) (*connect.Response[v1pb.ListPersonalAccessTokensResponse], error)
func (*ConnectServiceHandler) ListSpaceInvitations ¶
func (s *ConnectServiceHandler) ListSpaceInvitations(ctx context.Context, req *connect.Request[v1pb.ListSpaceInvitationsRequest]) (*connect.Response[v1pb.ListSpaceInvitationsResponse], error)
func (*ConnectServiceHandler) ListSpaceMembers ¶
func (s *ConnectServiceHandler) ListSpaceMembers(ctx context.Context, req *connect.Request[v1pb.ListSpaceMembersRequest]) (*connect.Response[v1pb.ListSpaceMembersResponse], error)
func (*ConnectServiceHandler) ListSpaces ¶
func (s *ConnectServiceHandler) ListSpaces(ctx context.Context, req *connect.Request[v1pb.ListSpacesRequest]) (*connect.Response[v1pb.ListSpacesResponse], error)
func (*ConnectServiceHandler) ListUserNotifications ¶
func (s *ConnectServiceHandler) ListUserNotifications(ctx context.Context, req *connect.Request[v1pb.ListUserNotificationsRequest]) (*connect.Response[v1pb.ListUserNotificationsResponse], error)
func (*ConnectServiceHandler) ListUserSettings ¶
func (s *ConnectServiceHandler) ListUserSettings(ctx context.Context, req *connect.Request[v1pb.ListUserSettingsRequest]) (*connect.Response[v1pb.ListUserSettingsResponse], error)
func (*ConnectServiceHandler) ListUserSpaceInvitations ¶
func (s *ConnectServiceHandler) ListUserSpaceInvitations(ctx context.Context, req *connect.Request[v1pb.ListUserSpaceInvitationsRequest]) (*connect.Response[v1pb.ListUserSpaceInvitationsResponse], error)
func (*ConnectServiceHandler) ListUserWebhooks ¶
func (s *ConnectServiceHandler) ListUserWebhooks(ctx context.Context, req *connect.Request[v1pb.ListUserWebhooksRequest]) (*connect.Response[v1pb.ListUserWebhooksResponse], error)
func (*ConnectServiceHandler) ListUsers ¶
func (s *ConnectServiceHandler) ListUsers(ctx context.Context, req *connect.Request[v1pb.ListUsersRequest]) (*connect.Response[v1pb.ListUsersResponse], error)
func (*ConnectServiceHandler) RefreshToken ¶
func (s *ConnectServiceHandler) RefreshToken(ctx context.Context, req *connect.Request[v1pb.RefreshTokenRequest]) (*connect.Response[v1pb.RefreshTokenResponse], error)
func (*ConnectServiceHandler) RegisterConnectHandlers ¶
func (s *ConnectServiceHandler) RegisterConnectHandlers(mux *http.ServeMux, opts ...connect.HandlerOption)
RegisterConnectHandlers registers all Connect service handlers on the given mux.
func (*ConnectServiceHandler) SetMemoAttachments ¶
func (*ConnectServiceHandler) SetMemoRelations ¶
func (*ConnectServiceHandler) SignIn ¶
func (s *ConnectServiceHandler) SignIn(ctx context.Context, req *connect.Request[v1pb.SignInRequest]) (*connect.Response[v1pb.SignInResponse], error)
func (*ConnectServiceHandler) TestInstanceEmailSetting ¶
func (*ConnectServiceHandler) Transcribe ¶
func (s *ConnectServiceHandler) Transcribe(ctx context.Context, req *connect.Request[v1pb.TranscribeRequest]) (*connect.Response[v1pb.TranscribeResponse], error)
func (*ConnectServiceHandler) UpdateAttachment ¶
func (s *ConnectServiceHandler) UpdateAttachment(ctx context.Context, req *connect.Request[v1pb.UpdateAttachmentRequest]) (*connect.Response[v1pb.Attachment], error)
func (*ConnectServiceHandler) UpdateIdentityProvider ¶
func (s *ConnectServiceHandler) UpdateIdentityProvider(ctx context.Context, req *connect.Request[v1pb.UpdateIdentityProviderRequest]) (*connect.Response[v1pb.IdentityProvider], error)
func (*ConnectServiceHandler) UpdateInstanceSetting ¶
func (s *ConnectServiceHandler) UpdateInstanceSetting(ctx context.Context, req *connect.Request[v1pb.UpdateInstanceSettingRequest]) (*connect.Response[v1pb.InstanceSetting], error)
func (*ConnectServiceHandler) UpdateMemo ¶
func (*ConnectServiceHandler) UpdateMemoView ¶
func (s *ConnectServiceHandler) UpdateMemoView(ctx context.Context, req *connect.Request[v1pb.UpdateMemoViewRequest]) (*connect.Response[v1pb.MemoView], error)
UpdateMemoView updates the selected fields of a saved memo view.
func (*ConnectServiceHandler) UpdateSpace ¶
func (*ConnectServiceHandler) UpdateSpaceMember ¶
func (s *ConnectServiceHandler) UpdateSpaceMember(ctx context.Context, req *connect.Request[v1pb.UpdateSpaceMemberRequest]) (*connect.Response[v1pb.SpaceMember], error)
func (*ConnectServiceHandler) UpdateUser ¶
func (*ConnectServiceHandler) UpdateUserNotification ¶
func (s *ConnectServiceHandler) UpdateUserNotification(ctx context.Context, req *connect.Request[v1pb.UpdateUserNotificationRequest]) (*connect.Response[v1pb.UserNotification], error)
func (*ConnectServiceHandler) UpdateUserSetting ¶
func (s *ConnectServiceHandler) UpdateUserSetting(ctx context.Context, req *connect.Request[v1pb.UpdateUserSettingRequest]) (*connect.Response[v1pb.UserSetting], error)
func (*ConnectServiceHandler) UpdateUserWebhook ¶
func (s *ConnectServiceHandler) UpdateUserWebhook(ctx context.Context, req *connect.Request[v1pb.UpdateUserWebhookRequest]) (*connect.Response[v1pb.UserWebhook], error)
func (*ConnectServiceHandler) UploadAttachment ¶
func (s *ConnectServiceHandler) UploadAttachment(ctx context.Context, req *connect.Request[v1pb.UploadAttachmentRequest]) (*connect.Response[v1pb.UploadAttachmentResponse], error)
func (*ConnectServiceHandler) UpsertMemoReaction ¶
type HeaderCarrier ¶
type HeaderCarrier struct {
// contains filtered or unexported fields
}
HeaderCarrier stores headers that need to be set in the response.
Problem: The codebase supports two protocols simultaneously:
- Native gRPC: Uses grpc.SetHeader() to set response headers
- Connect-RPC: Uses connect.Response.Header().Set() to set response headers
Solution: HeaderCarrier provides a protocol-agnostic way to set headers.
- Service methods call SetResponseHeader() regardless of protocol
- For gRPC requests: SetResponseHeader uses grpc.SetHeader directly
- For Connect requests: SetResponseHeader stores headers in HeaderCarrier
- Connect wrappers extract headers from HeaderCarrier and apply to response
This allows service methods to work with both protocols without knowing which one is being used.
func GetHeaderCarrier ¶
func GetHeaderCarrier(ctx context.Context) *HeaderCarrier
GetHeaderCarrier retrieves the header carrier from the context. Returns nil if no carrier is present.
func (*HeaderCarrier) All ¶
func (h *HeaderCarrier) All() map[string]string
All returns all headers.
func (*HeaderCarrier) Get ¶
func (h *HeaderCarrier) Get(key string) string
Get retrieves a header from the carrier.
func (*HeaderCarrier) Set ¶
func (h *HeaderCarrier) Set(key, value string)
Set adds a header to the carrier.
type LoggingInterceptor ¶
type LoggingInterceptor struct {
// contains filtered or unexported fields
}
LoggingInterceptor logs Connect RPC requests with appropriate log levels.
Log levels: - INFO: Successful requests and expected client errors (not found, permission denied, etc.) - ERROR: Server errors (internal, unavailable, etc.)
func NewLoggingInterceptor ¶
func NewLoggingInterceptor(logStacktrace bool) *LoggingInterceptor
NewLoggingInterceptor creates a new logging interceptor.
func (*LoggingInterceptor) WrapStreamingClient ¶
func (*LoggingInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*LoggingInterceptor) WrapStreamingHandler ¶
func (*LoggingInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type MetadataInterceptor ¶
type MetadataInterceptor struct{}
MetadataInterceptor converts Connect HTTP headers to gRPC metadata.
This ensures service methods can use metadata.FromIncomingContext() to access headers like User-Agent, X-Forwarded-For, etc., regardless of whether the request came via Connect RPC or gRPC-Gateway.
func NewMetadataInterceptor ¶
func NewMetadataInterceptor() *MetadataInterceptor
NewMetadataInterceptor creates a new metadata interceptor.
func (*MetadataInterceptor) WrapStreamingClient ¶
func (*MetadataInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*MetadataInterceptor) WrapStreamingHandler ¶
func (*MetadataInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type RecoveryInterceptor ¶
type RecoveryInterceptor struct {
// contains filtered or unexported fields
}
RecoveryInterceptor recovers from panics in Connect handlers and returns an internal error.
func NewRecoveryInterceptor ¶
func NewRecoveryInterceptor(logStacktrace bool) *RecoveryInterceptor
NewRecoveryInterceptor creates a new recovery interceptor.
func (*RecoveryInterceptor) WrapStreamingClient ¶
func (*RecoveryInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*RecoveryInterceptor) WrapStreamingHandler ¶
func (*RecoveryInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type SSEClient ¶
type SSEClient struct {
// contains filtered or unexported fields
}
SSEClient represents a single SSE connection.
type SSEHub ¶
type SSEHub struct {
// contains filtered or unexported fields
}
SSEHub manages SSE client connections and broadcasts events. It is safe for concurrent use.
func (*SSEHub) Subscribe ¶
Subscribe registers a new client and returns it. The caller must call Unsubscribe when done.
func (*SSEHub) Unsubscribe ¶
Unsubscribe removes a client and closes its channels.
Source Files
¶
- acl_config.go
- ai_service.go
- attachment_media_metadata.go
- attachment_motion.go
- attachment_service.go
- attachment_service_image.go
- attachment_service_storage.go
- attachment_upload.go
- auth_service.go
- auth_service_session.go
- auth_service_sso.go
- authz.go
- common.go
- connect_handler.go
- connect_interceptors.go
- connect_services.go
- filter_access.go
- gateway_route_resolver.go
- header_carrier.go
- health_service.go
- idp_service.go
- instance_service.go
- instance_service_converters.go
- instance_service_validation.go
- instance_stats.go
- memo_access.go
- memo_attachment_service.go
- memo_batch_helpers.go
- memo_create_helpers.go
- memo_mention_helpers.go
- memo_relation_service.go
- memo_service.go
- memo_service_comments.go
- memo_service_converter.go
- memo_service_filter.go
- memo_service_link_metadata.go
- memo_service_query.go
- memo_service_webhooks.go
- memo_share_service.go
- memo_update_helpers.go
- memo_view_icon.go
- notification_email.go
- ratelimit.go
- reaction_service.go
- resource_name.go
- space_service.go
- space_service_converters.go
- space_service_notifications.go
- sse_handler.go
- sse_hub.go
- sso_username.go
- upload_session.go
- user_resource_name.go
- user_service.go
- user_service_access_tokens.go
- user_service_converters.go
- user_service_filter.go
- user_service_identities.go
- user_service_memo_export.go
- user_service_memo_import.go
- user_service_memo_transfer.go
- user_service_memo_views.go
- user_service_notifications.go
- user_service_settings.go
- user_service_stats.go
- user_service_webhooks.go
- v1.go