Documentation
¶
Index ¶
- type CliCredential
- type Comment
- type CommentMention
- type CommentNotificationOutbox
- type CommentPlacement
- type CommentReaction
- type CreateCLICredentialParams
- type DBTX
- type DeclineOwnershipTransferParams
- type DeleteCommentReactionParams
- type DeleteDocumentKVParams
- type DeleteFolderSubtreeParams
- type DeletePinParams
- type DeleteStaleDocumentPresenceEventsParams
- type Document
- type DocumentAccessNotificationOutbox
- type DocumentAccessRequest
- type DocumentAccessRequestNotificationOutbox
- type DocumentKv
- type DocumentKvEvent
- type DocumentLabel
- type DocumentNotificationMute
- type DocumentWorkspaceEntry
- type FindChildFolderIDByTitleParams
- type FindRootFoldersByTitleParams
- type FindRootFoldersByTitleRow
- type Folder
- type FolderWorkspaceEntry
- type GetCommentForReplyRow
- type GetCommentForUpdateRow
- type GetCommentRow
- type GetDocumentOwnerRow
- type GetDocumentRow
- type GetDocumentVersionForUpdateRow
- type GetFolderOwnershipParams
- type GetFolderOwnershipRow
- type GetFolderRow
- type GetGitHubConnectionRow
- type GetMentionServiceAccountRow
- type GetMentionUserRow
- type GetOwnershipTransferForUpdateRow
- type GetServiceAccountByNameRow
- type GetServiceAccountRow
- type GetSignedInUserByEmailRow
- type GetUserByEmailRow
- type GetUserByGoogleSubRow
- type GetUserByIDRow
- type GetVersionRow
- type GithubConnection
- type GithubRepoAccess
- type GoogleGroup
- type GoogleGroupMembership
- type GoogleGroupSyncState
- type HiddenFeaturedItem
- type HideFeaturedItemParams
- type InsertCommentMentionParams
- type InsertCommentParams
- type InsertCommentReplyParams
- type InsertDocumentKVEventParams
- type InsertDocumentLabelParams
- type InsertDocumentParams
- type InsertFolderParams
- type InsertInitialVersionParams
- type InsertOwnershipTransferParams
- type InsertPlaceholderUserParams
- type InsertServiceAccountKeyParams
- type InsertServiceAccountParams
- type InsertVersionParams
- type IsFolderAncestorOfParams
- type ListAccessibleDocumentsByLabelParams
- type ListAccessibleDocumentsByLabelRow
- type ListCLICredentialsRow
- type ListChildFoldersRow
- type ListCommentMentionsRow
- type ListCommentReactionsRow
- type ListCommentsParams
- type ListCommentsRow
- type ListDocumentInheritedGrantsRow
- type ListDocumentKVEventsAfterParams
- type ListDocumentKVRow
- type ListDocumentsParams
- type ListDocumentsRow
- type ListFolderAccessChainParams
- type ListFolderAccessChainRow
- type ListFolderAncestorsParams
- type ListFolderAncestorsRow
- type ListFolderDocumentsRow
- type ListFolderSubtreeOrphansParams
- type ListFolderSubtreeOrphansRow
- type ListGitHubAuthorAccessParams
- type ListGitHubAuthorAccessRow
- type ListGrantsForResourcesRow
- type ListHiddenFeaturedItemsParams
- type ListOwnershipTransfersRow
- type ListPinsParams
- type ListPinsRow
- type ListRecentDocumentPresenceEventsParams
- type ListResourceAncestorsParams
- type ListResourceAncestorsRow
- type ListResourceGrantsRow
- type ListRootFolderEntriesParams
- type ListRootFolderEntriesRow
- type ListServiceAccountKeysRow
- type ListServiceAccountsRow
- type ListUnindexedVersionsParams
- type ListUnindexedVersionsRow
- type ListVersionsRow
- type MoveDocumentToFolderParams
- type MoveDocumentToRootParams
- type NotificationPreference
- type OauthState
- type OwnershipTransfer
- type Pin
- type PutCommentReactionParams
- type PutPinParams
- type Queries
- func (q *Queries) AcceptOwnershipTransfer(ctx context.Context, id string) (string, error)
- func (q *Queries) AcquireFolderTreeLock(ctx context.Context, lockID int64) error
- func (q *Queries) CreateCLICredential(ctx context.Context, arg CreateCLICredentialParams) error
- func (q *Queries) DeclineOwnershipTransfer(ctx context.Context, arg DeclineOwnershipTransferParams) (string, error)
- func (q *Queries) DeleteComment(ctx context.Context, id string) error
- func (q *Queries) DeleteCommentMentions(ctx context.Context, commentID string) error
- func (q *Queries) DeleteCommentReaction(ctx context.Context, arg DeleteCommentReactionParams) error
- func (q *Queries) DeleteDocument(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeleteDocumentKV(ctx context.Context, arg DeleteDocumentKVParams) error
- func (q *Queries) DeleteDocumentLabels(ctx context.Context, documentID string) error
- func (q *Queries) DeleteFolderSubtree(ctx context.Context, arg DeleteFolderSubtreeParams) (int64, error)
- func (q *Queries) DeleteGitHubConnection(ctx context.Context, userID string) (int64, error)
- func (q *Queries) DeletePin(ctx context.Context, arg DeletePinParams) error
- func (q *Queries) DeleteStaleDocumentPresenceEvents(ctx context.Context, arg DeleteStaleDocumentPresenceEventsParams) error
- func (q *Queries) DisableServiceAccount(ctx context.Context, id string) error
- func (q *Queries) EnableServiceAccount(ctx context.Context, id string) error
- func (q *Queries) FindChildFolderIDByTitle(ctx context.Context, arg FindChildFolderIDByTitleParams) (string, error)
- func (q *Queries) FindRootFoldersByTitle(ctx context.Context, arg FindRootFoldersByTitleParams) ([]FindRootFoldersByTitleRow, error)
- func (q *Queries) FolderOrAncestorsHaveGrants(ctx context.Context, folderID string) (bool, error)
- func (q *Queries) GetComment(ctx context.Context, id string) (GetCommentRow, error)
- func (q *Queries) GetCommentForReply(ctx context.Context, id string) (GetCommentForReplyRow, error)
- func (q *Queries) GetCommentForUpdate(ctx context.Context, id string) (GetCommentForUpdateRow, error)
- func (q *Queries) GetDocument(ctx context.Context, id string) (GetDocumentRow, error)
- func (q *Queries) GetDocumentKVRevision(ctx context.Context, documentID string) (int64, error)
- func (q *Queries) GetDocumentOwner(ctx context.Context, id string) (GetDocumentOwnerRow, error)
- func (q *Queries) GetDocumentVersionForUpdate(ctx context.Context, documentID string) (GetDocumentVersionForUpdateRow, error)
- func (q *Queries) GetFolder(ctx context.Context, id string) (GetFolderRow, error)
- func (q *Queries) GetFolderDepth(ctx context.Context, folderID string) (int32, error)
- func (q *Queries) GetFolderOwnership(ctx context.Context, arg GetFolderOwnershipParams) (GetFolderOwnershipRow, error)
- func (q *Queries) GetFolderSubtreeHeight(ctx context.Context, folderID string) (int32, error)
- func (q *Queries) GetGitHubConnection(ctx context.Context, userID string) (GetGitHubConnectionRow, error)
- func (q *Queries) GetMentionServiceAccount(ctx context.Context, id string) (GetMentionServiceAccountRow, error)
- func (q *Queries) GetMentionUser(ctx context.Context, id string) (GetMentionUserRow, error)
- func (q *Queries) GetOwnershipTransferForUpdate(ctx context.Context, id string) (GetOwnershipTransferForUpdateRow, error)
- func (q *Queries) GetServiceAccount(ctx context.Context, id string) (GetServiceAccountRow, error)
- func (q *Queries) GetServiceAccountByName(ctx context.Context, name string) (GetServiceAccountByNameRow, error)
- func (q *Queries) GetSignedInUserByEmail(ctx context.Context, email string) (GetSignedInUserByEmailRow, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error)
- func (q *Queries) GetUserByGoogleSub(ctx context.Context, googleSub pgtype.Text) (GetUserByGoogleSubRow, error)
- func (q *Queries) GetUserByID(ctx context.Context, id string) (GetUserByIDRow, error)
- func (q *Queries) GetUserIDByEmail(ctx context.Context, email string) (string, error)
- func (q *Queries) GetVersion(ctx context.Context, id string) (GetVersionRow, error)
- func (q *Queries) GetVersionBlobKey(ctx context.Context, id string) (string, error)
- func (q *Queries) HideFeaturedItem(ctx context.Context, arg HideFeaturedItemParams) error
- func (q *Queries) InsertComment(ctx context.Context, arg InsertCommentParams) (pgtype.Timestamptz, error)
- func (q *Queries) InsertCommentMention(ctx context.Context, arg InsertCommentMentionParams) error
- func (q *Queries) InsertCommentReply(ctx context.Context, arg InsertCommentReplyParams) (pgtype.Timestamptz, error)
- func (q *Queries) InsertDocument(ctx context.Context, arg InsertDocumentParams) error
- func (q *Queries) InsertDocumentKVEvent(ctx context.Context, arg InsertDocumentKVEventParams) error
- func (q *Queries) InsertDocumentLabel(ctx context.Context, arg InsertDocumentLabelParams) error
- func (q *Queries) InsertFolder(ctx context.Context, arg InsertFolderParams) error
- func (q *Queries) InsertInitialVersion(ctx context.Context, arg InsertInitialVersionParams) (pgtype.Timestamptz, error)
- func (q *Queries) InsertOwnershipTransfer(ctx context.Context, arg InsertOwnershipTransferParams) error
- func (q *Queries) InsertPlaceholderUser(ctx context.Context, arg InsertPlaceholderUserParams) error
- func (q *Queries) InsertServiceAccount(ctx context.Context, arg InsertServiceAccountParams) error
- func (q *Queries) InsertServiceAccountKey(ctx context.Context, arg InsertServiceAccountKeyParams) error
- func (q *Queries) InsertVersion(ctx context.Context, arg InsertVersionParams) (pgtype.Timestamptz, error)
- func (q *Queries) IsFolderAncestorOf(ctx context.Context, arg IsFolderAncestorOfParams) (bool, error)
- func (q *Queries) ListAccessibleDocumentsByLabel(ctx context.Context, arg ListAccessibleDocumentsByLabelParams) ([]ListAccessibleDocumentsByLabelRow, error)
- func (q *Queries) ListCLICredentials(ctx context.Context, userID string) ([]ListCLICredentialsRow, error)
- func (q *Queries) ListChildFolders(ctx context.Context, parentFolderID string) ([]ListChildFoldersRow, error)
- func (q *Queries) ListCommentMentions(ctx context.Context, commentIds []string) ([]ListCommentMentionsRow, error)
- func (q *Queries) ListCommentReactions(ctx context.Context, commentIds []string) ([]ListCommentReactionsRow, error)
- func (q *Queries) ListComments(ctx context.Context, arg ListCommentsParams) ([]ListCommentsRow, error)
- func (q *Queries) ListDocumentInheritedGrants(ctx context.Context, documentID string) ([]ListDocumentInheritedGrantsRow, error)
- func (q *Queries) ListDocumentKV(ctx context.Context, documentID string) ([]ListDocumentKVRow, error)
- func (q *Queries) ListDocumentKVEventsAfter(ctx context.Context, arg ListDocumentKVEventsAfterParams) ([]DocumentKvEvent, error)
- func (q *Queries) ListDocumentLabels(ctx context.Context, documentID string) ([]string, error)
- func (q *Queries) ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]ListDocumentsRow, error)
- func (q *Queries) ListFolderAccessChain(ctx context.Context, arg ListFolderAccessChainParams) ([]ListFolderAccessChainRow, error)
- func (q *Queries) ListFolderAncestors(ctx context.Context, arg ListFolderAncestorsParams) ([]ListFolderAncestorsRow, error)
- func (q *Queries) ListFolderDocuments(ctx context.Context, folderID string) ([]ListFolderDocumentsRow, error)
- func (q *Queries) ListFolderSubtreeOrphans(ctx context.Context, arg ListFolderSubtreeOrphansParams) ([]ListFolderSubtreeOrphansRow, error)
- func (q *Queries) ListGitHubAuthorAccess(ctx context.Context, arg ListGitHubAuthorAccessParams) ([]ListGitHubAuthorAccessRow, error)
- func (q *Queries) ListGrantsForResources(ctx context.Context, resourceIds []string) ([]ListGrantsForResourcesRow, error)
- func (q *Queries) ListHiddenFeaturedItems(ctx context.Context, arg ListHiddenFeaturedItemsParams) ([]string, error)
- func (q *Queries) ListOwnershipTransfers(ctx context.Context, fromUserID string) ([]ListOwnershipTransfersRow, error)
- func (q *Queries) ListPins(ctx context.Context, arg ListPinsParams) ([]ListPinsRow, error)
- func (q *Queries) ListRecentDocumentPresenceEvents(ctx context.Context, arg ListRecentDocumentPresenceEventsParams) ([]DocumentKvEvent, error)
- func (q *Queries) ListResourceAncestors(ctx context.Context, arg ListResourceAncestorsParams) ([]ListResourceAncestorsRow, error)
- func (q *Queries) ListResourceGrants(ctx context.Context, resourceID string) ([]ListResourceGrantsRow, error)
- func (q *Queries) ListRootFolderEntries(ctx context.Context, arg ListRootFolderEntriesParams) ([]ListRootFolderEntriesRow, error)
- func (q *Queries) ListServiceAccountKeys(ctx context.Context, serviceAccountID string) ([]ListServiceAccountKeysRow, error)
- func (q *Queries) ListServiceAccounts(ctx context.Context, ownerUserID string) ([]ListServiceAccountsRow, error)
- func (q *Queries) ListUnindexedVersions(ctx context.Context, arg ListUnindexedVersionsParams) ([]ListUnindexedVersionsRow, error)
- func (q *Queries) ListVersions(ctx context.Context, documentID string) ([]ListVersionsRow, error)
- func (q *Queries) LockDocumentForKV(ctx context.Context, id string) (string, error)
- func (q *Queries) MoveDocumentToFolder(ctx context.Context, arg MoveDocumentToFolderParams) (int64, error)
- func (q *Queries) MoveDocumentToRoot(ctx context.Context, arg MoveDocumentToRootParams) error
- func (q *Queries) NotifyDocumentKVEvent(ctx context.Context, documentID string) error
- func (q *Queries) PutCommentReaction(ctx context.Context, arg PutCommentReactionParams) error
- func (q *Queries) PutPin(ctx context.Context, arg PutPinParams) error
- func (q *Queries) RecordFolderWorkspaceEntry(ctx context.Context, arg RecordFolderWorkspaceEntryParams) error
- func (q *Queries) RecordWorkspaceEntry(ctx context.Context, arg RecordWorkspaceEntryParams) error
- func (q *Queries) ResolveCLIToken(ctx context.Context, tokenHash string) (ResolveCLITokenRow, error)
- func (q *Queries) ResolveServiceAccountToken(ctx context.Context, tokenHash string) (ResolveServiceAccountTokenRow, error)
- func (q *Queries) RevokeCLICredential(ctx context.Context, arg RevokeCLICredentialParams) error
- func (q *Queries) RevokeResourceGrant(ctx context.Context, arg RevokeResourceGrantParams) (int64, error)
- func (q *Queries) RevokeServiceAccountKey(ctx context.Context, arg RevokeServiceAccountKeyParams) error
- func (q *Queries) RootFolderTitleTaken(ctx context.Context, arg RootFolderTitleTakenParams) (bool, error)
- func (q *Queries) SearchDocuments(ctx context.Context, arg SearchDocumentsParams) ([]SearchDocumentsRow, error)
- func (q *Queries) SearchFoldersByTitle(ctx context.Context, arg SearchFoldersByTitleParams) ([]SearchFoldersByTitleRow, error)
- func (q *Queries) SearchUsersByEmail(ctx context.Context, lower string) ([]SearchUsersByEmailRow, error)
- func (q *Queries) ServiceAccountExists(ctx context.Context, id string) (bool, error)
- func (q *Queries) SetVersionSearchText(ctx context.Context, arg SetVersionSearchTextParams) error
- func (q *Queries) TouchCLIToken(ctx context.Context, tokenHash string) error
- func (q *Queries) TouchServiceAccountToken(ctx context.Context, tokenHash string) error
- func (q *Queries) UpdateCommentBody(ctx context.Context, arg UpdateCommentBodyParams) error
- func (q *Queries) UpdateCommentStatus(ctx context.Context, arg UpdateCommentStatusParams) error
- func (q *Queries) UpdateDocumentCurrentVersion(ctx context.Context, arg UpdateDocumentCurrentVersionParams) error
- func (q *Queries) UpdateDocumentTitle(ctx context.Context, arg UpdateDocumentTitleParams) error
- func (q *Queries) UpdateFolderParent(ctx context.Context, arg UpdateFolderParentParams) error
- func (q *Queries) UpdateFolderTitle(ctx context.Context, arg UpdateFolderTitleParams) error
- func (q *Queries) UpdateFolderTitleAndParent(ctx context.Context, arg UpdateFolderTitleAndParentParams) error
- func (q *Queries) UpdateResourceGrantRole(ctx context.Context, arg UpdateResourceGrantRoleParams) (UpdateResourceGrantRoleRow, error)
- func (q *Queries) UpdateServiceAccountName(ctx context.Context, arg UpdateServiceAccountNameParams) error
- func (q *Queries) UpdateServiceAccountOwner(ctx context.Context, arg UpdateServiceAccountOwnerParams) error
- func (q *Queries) UpsertDocumentKV(ctx context.Context, arg UpsertDocumentKVParams) error
- func (q *Queries) UpsertGitHubConnection(ctx context.Context, arg UpsertGitHubConnectionParams) error
- func (q *Queries) UpsertGitHubRepoAccess(ctx context.Context, arg UpsertGitHubRepoAccessParams) error
- func (q *Queries) UpsertGoogleUser(ctx context.Context, arg UpsertGoogleUserParams) error
- func (q *Queries) UpsertResourceGrant(ctx context.Context, arg UpsertResourceGrantParams) (string, error)
- func (q *Queries) UpsertUser(ctx context.Context, arg UpsertUserParams) error
- func (q *Queries) UserExists(ctx context.Context, id string) (bool, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RecordFolderWorkspaceEntryParams
- type RecordWorkspaceEntryParams
- type ResolveCLITokenRow
- type ResolveServiceAccountTokenRow
- type ResourceGrant
- type RevokeCLICredentialParams
- type RevokeResourceGrantParams
- type RevokeServiceAccountKeyParams
- type RootFolderTitleTakenParams
- type SearchDocumentsParams
- type SearchDocumentsRow
- type SearchFoldersByTitleParams
- type SearchFoldersByTitleRow
- type SearchUsersByEmailRow
- type ServiceAccount
- type ServiceAccountKey
- type SetVersionSearchTextParams
- type UpdateCommentBodyParams
- type UpdateCommentStatusParams
- type UpdateDocumentCurrentVersionParams
- type UpdateDocumentTitleParams
- type UpdateFolderParentParams
- type UpdateFolderTitleAndParentParams
- type UpdateFolderTitleParams
- type UpdateResourceGrantRoleParams
- type UpdateResourceGrantRoleRow
- type UpdateServiceAccountNameParams
- type UpdateServiceAccountOwnerParams
- type UpsertDocumentKVParams
- type UpsertGitHubConnectionParams
- type UpsertGitHubRepoAccessParams
- type UpsertGoogleUserParams
- type UpsertResourceGrantParams
- type UpsertUserParams
- type User
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CliCredential ¶
type CliCredential struct {
ID string
UserID string
Name string
TokenHash string
LastUsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}
type Comment ¶
type Comment struct {
ID string
DocumentID string
CreatedOnVersionID string
AuthorType string
AuthorID string
AuthorEmail string
AuthorName string
Body string
SelectedText string
AnchorJson []byte
Status string
CreatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
ParentCommentID pgtype.Text
RootCommentID string
}
type CommentMention ¶
type CommentMention struct {
CommentID string
PrincipalType string
PrincipalID string
// Zero-based offset in UTF-16 code units, matching JavaScript string indexes.
OffsetUtf16 int32
// Mention length in UTF-16 code units, matching JavaScript string indexes.
LengthUtf16 int32
// Internal snapshot of the exact visible @label, used to preserve valid mentions across principal renames.
LabelText string
}
Structured principals mentioned in comment bodies. Mention metadata grants no access; future notification delivery must re-check effective document access and apply rate limits.
type CommentNotificationOutbox ¶
type CommentNotificationOutbox struct {
CommentID string
RecipientID string
Reason string
Attempts int32
AvailableAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type CommentPlacement ¶
type CommentReaction ¶
type CommentReaction struct {
CommentID string
PrincipalType string
PrincipalID string
// Stable ASCII slug from a fixed set, not a literal emoji character, so the value is URL-safe and each client chooses its own glyph. The CHECK keeps an old pod or a direct SQL writer from storing a slug clients cannot render.
Emoji string
CreatedAt pgtype.Timestamptz
}
Lightweight acknowledgements on comments and replies. One row per (comment, principal, emoji); the primary key makes adding a reaction idempotent and removing one a primary-key delete.
type DeleteDocumentKVParams ¶
type DeletePinParams ¶
type DocumentAccessRequest ¶
type DocumentAccessRequest struct {
DocumentID string
RequesterType string
RequesterID string
RequestedAt pgtype.Timestamptz
}
type DocumentAccessRequestNotificationOutbox ¶
type DocumentAccessRequestNotificationOutbox struct {
DocumentID string
RequesterType string
RequesterID string
RequesterLabel string
RecipientID string
Attempts int32
AvailableAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type DocumentKv ¶
type DocumentKvEvent ¶
type DocumentLabel ¶
type DocumentWorkspaceEntry ¶
type DocumentWorkspaceEntry struct {
DocumentID string
PrincipalType string
PrincipalID string
AddedAt pgtype.Timestamptz
}
type Folder ¶
type Folder struct {
ID string
Title string
OwnerType string
OwnerID string
ParentFolderID pgtype.Text
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type FolderWorkspaceEntry ¶
type FolderWorkspaceEntry struct {
FolderID string
PrincipalType string
PrincipalID string
AddedAt pgtype.Timestamptz
LastOpenedAt pgtype.Timestamptz
}
type GetCommentForReplyRow ¶
type GetCommentForReplyRow struct {
ID string
DocumentID string
CreatedOnVersionID string
AuthorType string
AuthorID string
AuthorEmail string
AuthorName string
Body string
SelectedText string
AnchorJson []byte
Status string
ParentCommentID pgtype.Text
RootCommentID string
CreatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
}
type GetCommentForUpdateRow ¶
type GetCommentForUpdateRow struct {
ID string
DocumentID string
CreatedOnVersionID string
AuthorType string
AuthorID string
AuthorEmail string
AuthorName string
Body string
SelectedText string
AnchorJson []byte
Status string
ParentCommentID pgtype.Text
RootCommentID string
CreatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
}
type GetCommentRow ¶
type GetCommentRow struct {
ID string
DocumentID string
CreatedOnVersionID string
AuthorType string
AuthorID string
AuthorEmail string
AuthorName string
Body string
SelectedText string
AnchorJson []byte
Status string
ParentCommentID pgtype.Text
RootCommentID string
CreatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
}
type GetDocumentOwnerRow ¶
type GetDocumentRow ¶
type GetFolderOwnershipRow ¶
type GetFolderRow ¶
type GetGitHubConnectionRow ¶
type GetMentionUserRow ¶
type GetServiceAccountRow ¶
type GetUserByEmailRow ¶
type GetUserByGoogleSubRow ¶
type GetUserByIDRow ¶
type GetVersionRow ¶
type GithubConnection ¶
type GithubConnection struct {
UserID string
GithubUserID int64
Login string
AvatarUrl string
AccessTokenCiphertext []byte
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type GithubRepoAccess ¶
type GoogleGroup ¶
type GoogleGroup struct {
ID string
CustomerID string
Email string
DisplayName string
LastVerifiedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type GoogleGroupMembership ¶
type GoogleGroupMembership struct {
UserID string
GroupID string
SyncedAt pgtype.Timestamptz
}
type GoogleGroupSyncState ¶
type GoogleGroupSyncState struct {
UserID string
LastAttemptAt pgtype.Timestamptz
LastSuccessAt pgtype.Timestamptz
LastErrorCode string
}
type HiddenFeaturedItem ¶
type HiddenFeaturedItem struct {
PrincipalType string
PrincipalID string
ResourceID string
HiddenAt pgtype.Timestamptz
}
type HideFeaturedItemParams ¶
type InsertCommentParams ¶
type InsertDocumentParams ¶
type InsertFolderParams ¶
type InsertVersionParams ¶
type ListCLICredentialsRow ¶
type ListChildFoldersRow ¶
type ListCommentMentionsRow ¶
type ListCommentReactionsRow ¶
type ListCommentsParams ¶
type ListCommentsRow ¶
type ListCommentsRow struct {
ID string
DocumentID string
CreatedOnVersionID string
AuthorType string
AuthorID string
AuthorEmail string
AuthorName string
Body string
SelectedText string
AnchorJson []byte
Status string
ParentCommentID pgtype.Text
RootCommentID string
CreatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
}
type ListDocumentKVRow ¶
type ListDocumentsParams ¶
type ListDocumentsRow ¶
type ListFolderAncestorsRow ¶
type ListFolderDocumentsRow ¶
type ListGitHubAuthorAccessParams ¶
type ListGitHubAuthorAccessParams struct {
Owner string
Repo string
FreshAfter pgtype.Timestamptz
DocumentID string
}
type ListPinsParams ¶
type ListPinsRow ¶
type ListResourceGrantsRow ¶
type ListServiceAccountsRow ¶
type ListVersionsRow ¶
type NotificationPreference ¶
type OauthState ¶
type OauthState struct {
ID string
Kind string
StateJson []byte
ExpiresAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type OwnershipTransfer ¶
type OwnershipTransfer struct {
ID string
ServiceAccountID string
FromUserID string
ToUserID string
InitiatedAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
Status string
}
type PutPinParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AcceptOwnershipTransfer ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) AcquireFolderTreeLock ¶
Serializes folder-structure mutations (create under a parent, re-parent, delete, move documents) for the rest of the transaction. Cycle and depth invariants are check-then-write and cannot be expressed as constraints, so concurrent tree mutations must not interleave. Folder trees are small and mutations rare; one global transaction-scoped advisory lock keeps this simple and obviously correct.
func (*Queries) CreateCLICredential ¶
func (q *Queries) CreateCLICredential(ctx context.Context, arg CreateCLICredentialParams) error
func (*Queries) DeclineOwnershipTransfer ¶
func (*Queries) DeleteComment ¶
func (*Queries) DeleteCommentMentions ¶
func (*Queries) DeleteCommentReaction ¶
func (q *Queries) DeleteCommentReaction(ctx context.Context, arg DeleteCommentReactionParams) error
func (*Queries) DeleteDocument ¶
func (*Queries) DeleteDocumentKV ¶
func (q *Queries) DeleteDocumentKV(ctx context.Context, arg DeleteDocumentKVParams) error
func (*Queries) DeleteDocumentLabels ¶
func (*Queries) DeleteFolderSubtree ¶
func (q *Queries) DeleteFolderSubtree(ctx context.Context, arg DeleteFolderSubtreeParams) (int64, error)
Deletes the folder and every folder below it that the same principal owns. The walk stops at folders that other principals own.
func (*Queries) DeleteGitHubConnection ¶
func (*Queries) DeletePin ¶
func (q *Queries) DeletePin(ctx context.Context, arg DeletePinParams) error
func (*Queries) DeleteStaleDocumentPresenceEvents ¶
func (q *Queries) DeleteStaleDocumentPresenceEvents(ctx context.Context, arg DeleteStaleDocumentPresenceEventsParams) error
func (*Queries) DisableServiceAccount ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) EnableServiceAccount ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) FindChildFolderIDByTitle ¶
func (*Queries) FindRootFoldersByTitle ¶
func (q *Queries) FindRootFoldersByTitle(ctx context.Context, arg FindRootFoldersByTitleParams) ([]FindRootFoldersByTitleRow, error)
Resolves the first segment of a folder path: root folders with the given title that the principal owns or can reach through a grant. Owned folders sort first so an owned folder wins over a same-named shared one. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) FolderOrAncestorsHaveGrants ¶
Whether the folder or any of its ancestors carries an active grant, i.e. placing content inside it may broaden who can see that content.
func (*Queries) GetComment ¶
func (*Queries) GetCommentForReply ¶
func (*Queries) GetCommentForUpdate ¶
func (*Queries) GetDocument ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetDocumentKVRevision ¶
Live events share the KV revision sequence, so the high-water mark spans both the KV rows and the event log.
func (*Queries) GetDocumentOwner ¶
func (*Queries) GetDocumentVersionForUpdate ¶
func (*Queries) GetFolder ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetFolderDepth ¶
Number of folders on the path from @folder_id up to its root (0 when the folder does not exist).
func (*Queries) GetFolderOwnership ¶
func (q *Queries) GetFolderOwnership(ctx context.Context, arg GetFolderOwnershipParams) (GetFolderOwnershipRow, error)
func (*Queries) GetFolderSubtreeHeight ¶
Height of the subtree rooted at @folder_id, counting the folder itself.
func (*Queries) GetGitHubConnection ¶
func (*Queries) GetMentionServiceAccount ¶
func (q *Queries) GetMentionServiceAccount(ctx context.Context, id string) (GetMentionServiceAccountRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetMentionUser ¶
func (*Queries) GetOwnershipTransferForUpdate ¶
func (q *Queries) GetOwnershipTransferForUpdate(ctx context.Context, id string) (GetOwnershipTransferForUpdateRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetServiceAccount ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetServiceAccountByName ¶
func (q *Queries) GetServiceAccountByName(ctx context.Context, name string) (GetServiceAccountByNameRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetSignedInUserByEmail ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByGoogleSub ¶
func (*Queries) GetUserByID ¶
func (*Queries) GetUserIDByEmail ¶
func (*Queries) GetVersion ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) GetVersionBlobKey ¶
func (*Queries) HideFeaturedItem ¶
func (q *Queries) HideFeaturedItem(ctx context.Context, arg HideFeaturedItemParams) error
func (*Queries) InsertComment ¶
func (q *Queries) InsertComment(ctx context.Context, arg InsertCommentParams) (pgtype.Timestamptz, error)
func (*Queries) InsertCommentMention ¶
func (q *Queries) InsertCommentMention(ctx context.Context, arg InsertCommentMentionParams) error
func (*Queries) InsertCommentReply ¶
func (q *Queries) InsertCommentReply(ctx context.Context, arg InsertCommentReplyParams) (pgtype.Timestamptz, error)
func (*Queries) InsertDocument ¶
func (q *Queries) InsertDocument(ctx context.Context, arg InsertDocumentParams) error
func (*Queries) InsertDocumentKVEvent ¶
func (q *Queries) InsertDocumentKVEvent(ctx context.Context, arg InsertDocumentKVEventParams) error
func (*Queries) InsertDocumentLabel ¶
func (q *Queries) InsertDocumentLabel(ctx context.Context, arg InsertDocumentLabelParams) error
func (*Queries) InsertFolder ¶
func (q *Queries) InsertFolder(ctx context.Context, arg InsertFolderParams) error
func (*Queries) InsertInitialVersion ¶
func (q *Queries) InsertInitialVersion(ctx context.Context, arg InsertInitialVersionParams) (pgtype.Timestamptz, error)
func (*Queries) InsertOwnershipTransfer ¶
func (q *Queries) InsertOwnershipTransfer(ctx context.Context, arg InsertOwnershipTransferParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) InsertPlaceholderUser ¶
func (q *Queries) InsertPlaceholderUser(ctx context.Context, arg InsertPlaceholderUserParams) error
func (*Queries) InsertServiceAccount ¶
func (q *Queries) InsertServiceAccount(ctx context.Context, arg InsertServiceAccountParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) InsertServiceAccountKey ¶
func (q *Queries) InsertServiceAccountKey(ctx context.Context, arg InsertServiceAccountKeyParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) InsertVersion ¶
func (q *Queries) InsertVersion(ctx context.Context, arg InsertVersionParams) (pgtype.Timestamptz, error)
func (*Queries) IsFolderAncestorOf ¶
func (q *Queries) IsFolderAncestorOf(ctx context.Context, arg IsFolderAncestorOfParams) (bool, error)
Reports whether @folder_id appears on the ancestor chain that starts at @start_id (inclusive). Used to reject re-parenting that would create a cycle.
func (*Queries) ListAccessibleDocumentsByLabel ¶
func (q *Queries) ListAccessibleDocumentsByLabel(ctx context.Context, arg ListAccessibleDocumentsByLabelParams) ([]ListAccessibleDocumentsByLabelRow, error)
func (*Queries) ListCLICredentials ¶
func (*Queries) ListChildFolders ¶
func (q *Queries) ListChildFolders(ctx context.Context, parentFolderID string) ([]ListChildFoldersRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListCommentMentions ¶
func (q *Queries) ListCommentMentions(ctx context.Context, commentIds []string) ([]ListCommentMentionsRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListCommentReactions ¶
func (q *Queries) ListCommentReactions(ctx context.Context, commentIds []string) ([]ListCommentReactionsRow, error)
Ordering by created_at before emoji lets the JSON layer aggregate in first-reaction order, so the emoji a thread used first stays leftmost.
func (*Queries) ListComments ¶
func (q *Queries) ListComments(ctx context.Context, arg ListCommentsParams) ([]ListCommentsRow, error)
func (*Queries) ListDocumentInheritedGrants ¶
func (q *Queries) ListDocumentInheritedGrants(ctx context.Context, documentID string) ([]ListDocumentInheritedGrantsRow, error)
All active grants on a document and on every folder above it. The caller folds these (plus ownership) into the principal's effective role.
func (*Queries) ListDocumentKV ¶
func (*Queries) ListDocumentKVEventsAfter ¶
func (q *Queries) ListDocumentKVEventsAfter(ctx context.Context, arg ListDocumentKVEventsAfterParams) ([]DocumentKvEvent, error)
func (*Queries) ListDocumentLabels ¶
func (*Queries) ListDocuments ¶
func (q *Queries) ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]ListDocumentsRow, error)
A document appears in a principal's workspace when they:
- own it, or
- hold an explicit (user/service-account) grant for it, or
- have opened it (a workspace entry exists) AND it is still broadly shared via an active "anyone" grant.
A bare "anyone" grant alone does NOT list the document: broad access grants access via discovery/link, it does not place the document in every user's workspace until they open it. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListFolderAccessChain ¶
func (q *Queries) ListFolderAccessChain(ctx context.Context, arg ListFolderAccessChainParams) ([]ListFolderAccessChainRow, error)
A folder's ancestor chain (root first, the folder itself last) annotated with the principal's access at each level, resolved in one round trip. A grant on a folder applies to it and everything below it, so the strongest grant for chain element X is taken over X and all of X's ancestors (chain elements with depth >= X's). Rank order mirrors repo.MaxRole: owner=4, editor=3, commenter=2, viewer=1.
func (*Queries) ListFolderAncestors ¶
func (q *Queries) ListFolderAncestors(ctx context.Context, arg ListFolderAncestorsParams) ([]ListFolderAncestorsRow, error)
Breadcrumbs for a folder: its ancestors starting from @folder_id upwards, returned root-first.
func (*Queries) ListFolderDocuments ¶
func (q *Queries) ListFolderDocuments(ctx context.Context, folderID string) ([]ListFolderDocumentsRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListFolderSubtreeOrphans ¶
func (q *Queries) ListFolderSubtreeOrphans(ctx context.Context, arg ListFolderSubtreeOrphansParams) ([]ListFolderSubtreeOrphansRow, error)
The folders that other principals own directly inside the folders that DeleteFolderSubtree removes. Like Google Drive, a folder delete keeps them.
func (*Queries) ListGitHubAuthorAccess ¶
func (q *Queries) ListGitHubAuthorAccess(ctx context.Context, arg ListGitHubAuthorAccessParams) ([]ListGitHubAuthorAccessRow, error)
One row for each principal who created a version of the document. user_id is the user whose GitHub access counts for the author: the author, or the owner of a service account, because the owner controls its keys. The row also has that user's sealed GitHub token (NULL when not connected) and the cached access answer (NULL when missing, older than fresh_after, or older than the user's last GitHub connection).
func (*Queries) ListGrantsForResources ¶
func (q *Queries) ListGrantsForResources(ctx context.Context, resourceIds []string) ([]ListGrantsForResourcesRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListHiddenFeaturedItems ¶
func (*Queries) ListOwnershipTransfers ¶
func (q *Queries) ListOwnershipTransfers(ctx context.Context, fromUserID string) ([]ListOwnershipTransfersRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListPins ¶
func (q *Queries) ListPins(ctx context.Context, arg ListPinsParams) ([]ListPinsRow, error)
func (*Queries) ListRecentDocumentPresenceEvents ¶
func (q *Queries) ListRecentDocumentPresenceEvents(ctx context.Context, arg ListRecentDocumentPresenceEventsParams) ([]DocumentKvEvent, error)
func (*Queries) ListResourceAncestors ¶
func (q *Queries) ListResourceAncestors(ctx context.Context, arg ListResourceAncestorsParams) ([]ListResourceAncestorsRow, error)
The resource itself plus every folder above it, with titles and owners, for the effective-access report. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListResourceGrants ¶
func (q *Queries) ListResourceGrants(ctx context.Context, resourceID string) ([]ListResourceGrantsRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListRootFolderEntries ¶
func (q *Queries) ListRootFolderEntries(ctx context.Context, arg ListRootFolderEntriesParams) ([]ListRootFolderEntriesRow, error)
A principal's folder workspace: root folders they own or hold an explicit grant on, root folders they opened that are still shared with "anyone", and shared subfolders they opened whose ancestors they have no workspace entry for (so a folder deep in someone else's tree surfaces at the top level). nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListServiceAccountKeys ¶
func (q *Queries) ListServiceAccountKeys(ctx context.Context, serviceAccountID string) ([]ListServiceAccountKeysRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListServiceAccounts ¶
func (q *Queries) ListServiceAccounts(ctx context.Context, ownerUserID string) ([]ListServiceAccountsRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) ListUnindexedVersions ¶
func (q *Queries) ListUnindexedVersions(ctx context.Context, arg ListUnindexedVersionsParams) ([]ListUnindexedVersionsRow, error)
Locks the rows, so that servers that index at the same time skip each other's versions. Only current versions are searched.
func (*Queries) ListVersions ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) LockDocumentForKV ¶
Serializes revision allocation. NO KEY UPDATE still excludes every other allocator but, unlike FOR UPDATE, does not wait on foreign-key checks from concurrent comment and version writes.
func (*Queries) MoveDocumentToFolder ¶
func (*Queries) MoveDocumentToRoot ¶
func (q *Queries) MoveDocumentToRoot(ctx context.Context, arg MoveDocumentToRootParams) error
func (*Queries) NotifyDocumentKVEvent ¶
func (*Queries) PutCommentReaction ¶
func (q *Queries) PutCommentReaction(ctx context.Context, arg PutCommentReactionParams) error
func (*Queries) RecordFolderWorkspaceEntry ¶
func (q *Queries) RecordFolderWorkspaceEntry(ctx context.Context, arg RecordFolderWorkspaceEntryParams) error
func (*Queries) RecordWorkspaceEntry ¶
func (q *Queries) RecordWorkspaceEntry(ctx context.Context, arg RecordWorkspaceEntryParams) error
Records that a principal has opened a document, so a broadly-shared ("anyone") document joins their workspace listing after first open. Idempotent.
func (*Queries) ResolveCLIToken ¶
func (*Queries) ResolveServiceAccountToken ¶
func (q *Queries) ResolveServiceAccountToken(ctx context.Context, tokenHash string) (ResolveServiceAccountTokenRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) RevokeCLICredential ¶
func (q *Queries) RevokeCLICredential(ctx context.Context, arg RevokeCLICredentialParams) error
func (*Queries) RevokeResourceGrant ¶
func (*Queries) RevokeServiceAccountKey ¶
func (q *Queries) RevokeServiceAccountKey(ctx context.Context, arg RevokeServiceAccountKeyParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) RootFolderTitleTaken ¶
func (*Queries) SearchDocuments ¶
func (q *Queries) SearchDocuments(ctx context.Context, arg SearchDocumentsParams) ([]SearchDocumentsRow, error)
@match_query and @exclude_query are tsquery text. A document matches when its title or current text matches. Title words rank higher. Snippets are made after LIMIT, because ts_headline reads the whole text.
func (*Queries) SearchFoldersByTitle ¶
func (q *Queries) SearchFoldersByTitle(ctx context.Context, arg SearchFoldersByTitleParams) ([]SearchFoldersByTitleRow, error)
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) SearchUsersByEmail ¶
func (*Queries) ServiceAccountExists ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) SetVersionSearchText ¶
func (q *Queries) SetVersionSearchText(ctx context.Context, arg SetVersionSearchTextParams) error
func (*Queries) TouchCLIToken ¶
func (*Queries) TouchServiceAccountToken ¶
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) UpdateCommentBody ¶
func (q *Queries) UpdateCommentBody(ctx context.Context, arg UpdateCommentBodyParams) error
func (*Queries) UpdateCommentStatus ¶
func (q *Queries) UpdateCommentStatus(ctx context.Context, arg UpdateCommentStatusParams) error
func (*Queries) UpdateDocumentCurrentVersion ¶
func (q *Queries) UpdateDocumentCurrentVersion(ctx context.Context, arg UpdateDocumentCurrentVersionParams) error
func (*Queries) UpdateDocumentTitle ¶
func (q *Queries) UpdateDocumentTitle(ctx context.Context, arg UpdateDocumentTitleParams) error
func (*Queries) UpdateFolderParent ¶
func (q *Queries) UpdateFolderParent(ctx context.Context, arg UpdateFolderParentParams) error
func (*Queries) UpdateFolderTitle ¶
func (q *Queries) UpdateFolderTitle(ctx context.Context, arg UpdateFolderTitleParams) error
func (*Queries) UpdateFolderTitleAndParent ¶
func (q *Queries) UpdateFolderTitleAndParent(ctx context.Context, arg UpdateFolderTitleAndParentParams) error
func (*Queries) UpdateResourceGrantRole ¶
func (q *Queries) UpdateResourceGrantRole(ctx context.Context, arg UpdateResourceGrantRoleParams) (UpdateResourceGrantRoleRow, error)
func (*Queries) UpdateServiceAccountName ¶
func (q *Queries) UpdateServiceAccountName(ctx context.Context, arg UpdateServiceAccountNameParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) UpdateServiceAccountOwner ¶
func (q *Queries) UpdateServiceAccountOwner(ctx context.Context, arg UpdateServiceAccountOwnerParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential. nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) UpsertDocumentKV ¶
func (q *Queries) UpsertDocumentKV(ctx context.Context, arg UpsertDocumentKVParams) error
func (*Queries) UpsertGitHubConnection ¶
func (q *Queries) UpsertGitHubConnection(ctx context.Context, arg UpsertGitHubConnectionParams) error
func (*Queries) UpsertGitHubRepoAccess ¶
func (q *Queries) UpsertGitHubRepoAccess(ctx context.Context, arg UpsertGitHubRepoAccessParams) error
Selecting from github_connections skips the write when the user disconnected GitHub during the check.
func (*Queries) UpsertGoogleUser ¶
func (q *Queries) UpsertGoogleUser(ctx context.Context, arg UpsertGoogleUserParams) error
nosemgrep: detected-google-gcm-service-account - slashdocs-native principal type/table, not a Google credential.
func (*Queries) UpsertResourceGrant ¶
func (q *Queries) UpsertResourceGrant(ctx context.Context, arg UpsertResourceGrantParams) (string, error)
A revoked grant for the same (resource, principal) is resurrected by the conflict clause, keeping its ORIGINAL id; return the persisted id so callers never hand out an id that was never written.
func (*Queries) UpsertUser ¶
func (q *Queries) UpsertUser(ctx context.Context, arg UpsertUserParams) error
func (*Queries) UserExists ¶
type ResolveCLITokenRow ¶
type ResourceGrant ¶
type SearchDocumentsParams ¶
type SearchDocumentsRow ¶
type SearchFoldersByTitleRow ¶
type SearchUsersByEmailRow ¶
type ServiceAccount ¶
type ServiceAccount struct {
ID string
Name string
OwnerUserID string
CreatedByUserID string
CreatedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
}
type ServiceAccountKey ¶
type ServiceAccountKey struct {
ID string
ServiceAccountID string
Name string
TokenHash string
LastUsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}