Documentation
¶
Index ¶
- Variables
- func Migrate(ctx context.Context, pool *pgxpool.Pool) error
- func Open(ctx context.Context, dsn string) (*pgxpool.Pool, error)
- type Delivery
- type DeliveryTx
- func (tx *DeliveryTx) DisableInstallation(ctx context.Context, githubID int64, status string) error
- func (tx *DeliveryTx) DisableRepository(ctx context.Context, githubID int64, errorCode string) error
- func (tx *DeliveryTx) EnqueueIndex(ctx context.Context, request IndexRequest) error
- func (tx *DeliveryTx) RenameRepository(ctx context.Context, githubID int64, owner, name, cloneURL, webURL string) error
- func (tx *DeliveryTx) RepositoryForPush(ctx context.Context, installationID, githubID int64) (repository.Repository, error)
- func (tx *DeliveryTx) UpdateRepositorySize(ctx context.Context, repositoryID, sizeBytes int64) error
- type EnrichmentStatus
- type GraphJob
- type GraphPublication
- type GraphReplacement
- type GraphSource
- type GraphUpload
- type IndexJob
- type IndexRequest
- type InstallationUpdate
- type RepositoryUpdate
- type Store
- func (s *Store) APIPrincipal(ctx context.Context, tokenHash [32]byte, now time.Time) (authn.Principal, error)
- func (s *Store) ActiveGraphJobIDs(ctx context.Context) (map[int64]struct{}, error)
- func (s *Store) ActiveJobIDs(ctx context.Context) (map[int64]struct{}, error)
- func (s *Store) AdminDeliveries(ctx context.Context, installationID int64, repositoryIDs []int64, limit int) ([]admin.Delivery, bool, error)
- func (s *Store) AdminGitHub(ctx context.Context, installationID int64, repositoryIDs []int64, ...) (admin.GitHub, error)
- func (s *Store) AdminGroup(ctx context.Context, id int64) (admin.Group, error)
- func (s *Store) AdminGroups(ctx context.Context, limit int) ([]admin.Group, bool, error)
- func (s *Store) AdminJobs(ctx context.Context, installationID int64, repositoryIDs []int64, limit int, ...) ([]admin.Job, bool, error)
- func (s *Store) AdminOverview(ctx context.Context, installationID int64, repositoryIDs []int64) (admin.Overview, error)
- func (s *Store) AdminRepositories(ctx context.Context, installationID int64, repositoryIDs []int64, limit int, ...) ([]admin.Repository, bool, error)
- func (s *Store) AdminRepository(ctx context.Context, installationID int64, repositoryIDs []int64, ...) (repository.Repository, error)
- func (s *Store) AdminSCIPDependencies(ctx context.Context, installationID int64, repositoryIDs []int64, limit int) ([]admin.SCIPDependency, bool, error)
- func (s *Store) AdminSCIPUploads(ctx context.Context, installationID int64, repositoryIDs []int64, limit int) ([]admin.SCIPUpload, bool, error)
- func (s *Store) AdminUser(ctx context.Context, id int64) (admin.User, error)
- func (s *Store) AdminUsers(ctx context.Context, limit int) ([]admin.User, bool, error)
- func (s *Store) AggregateStats(ctx context.Context, snapshot graphquery.QuerySnapshot) (graphprotocol.GraphStats, error)
- func (s *Store) AllAuthorizedRepositories(ctx context.Context, names []string) ([]repository.Repository, error)
- func (s *Store) AllowOAuthRequest(ctx context.Context, remoteAddr, endpoint string, now time.Time) (bool, error)
- func (s *Store) AnyAuthorizedRepository(ctx context.Context, repositoryID int64) (repository.Repository, error)
- func (s *Store) AppendAudit(ctx context.Context, event audit.Event) error
- func (s *Store) ApplyDelivery(ctx context.Context, delivery Delivery, ...) (bool, error)
- func (s *Store) AuditEvents(ctx context.Context, limit int) ([]audit.Event, bool, error)
- func (s *Store) AuthorizedRepositories(ctx context.Context, installationID int64, repositoryIDs []int64, ...) ([]repository.Repository, error)
- func (s *Store) AuthorizedRepository(ctx context.Context, installationID int64, repositoryIDs []int64, ...) (repository.Repository, error)
- func (s *Store) BindFederatedUser(ctx context.Context, issuer, subject, externalID string) (int64, error)
- func (s *Store) ClaimGraph(ctx context.Context, owner string) (GraphJob, error)
- func (s *Store) ClaimIndex(ctx context.Context, owner string) (IndexJob, error)
- func (s *Store) ClassifyFiles(ctx context.Context, q graphquery.FileClassificationQuery) ([]graphquery.FileClassificationRow, error)
- func (s *Store) ClearLoginFailures(ctx context.Context, accountKey, sourceKey [32]byte) error
- func (s *Store) CompleteGraph(ctx context.Context, id int64, owner string, artifact graphartifact.Artifact) error
- func (s *Store) CompleteIndex(ctx context.Context, id int64, owner string, enrichment ...EnrichmentStatus) error
- func (s *Store) ConsumeLoginAttempt(ctx context.Context, key [32]byte, now time.Time) (bool, time.Time, error)
- func (s *Store) ConsumeLoginFlow(ctx context.Context, stateHash, browserHash [32]byte, provider string, ...) (authn.LoginFlow, error)
- func (s *Store) CountFiles(ctx context.Context, q graphquery.FileQuery) (int64, error)
- func (s *Store) CountGeneratedFiles(ctx context.Context, snapshots []graphquery.QuerySnapshot) (generated, total int64, err error)
- func (s *Store) CreateAPIToken(ctx context.Context, token authn.APITokenRecord) (int64, error)
- func (s *Store) CreateAPITokenAudited(ctx context.Context, token authn.APITokenRecord, event audit.Event) (int64, error)
- func (s *Store) CreateFederatedSessionAudited(ctx context.Context, identity authn.Identity, session authn.SessionRecord, ...) error
- func (s *Store) CreateGroup(ctx context.Context, group scim.Group) (created scim.Group, err error)
- func (s *Store) CreateGroupAudited(ctx context.Context, group scim.Group, events []audit.Event) (scim.Group, error)
- func (s *Store) CreateLoginFlow(ctx context.Context, flow authn.LoginFlow) error
- func (s *Store) CreateOAuthAuthorizationRequest(ctx context.Context, request authn.OAuthAuthorizationRequest) error
- func (s *Store) CreateOAuthClient(ctx context.Context, client authn.OAuthClient) error
- func (s *Store) CreateOAuthGrant(ctx context.Context, grant authn.OAuthGrant) (int64, error)
- func (s *Store) CreatePasswordSession(ctx context.Context, userID int64, expected authn.PasswordCredential, ...) error
- func (s *Store) CreateSession(ctx context.Context, session authn.SessionRecord) error
- func (s *Store) CreateSessionAudited(ctx context.Context, session authn.SessionRecord, event audit.Event) error
- func (s *Store) CreateUser(ctx context.Context, user scim.User) (created scim.User, err error)
- func (s *Store) CreateUserAudited(ctx context.Context, user scim.User, events []audit.Event) (scim.User, error)
- func (s *Store) DeleteExpiredAuth(ctx context.Context, now time.Time) (flows, sessions int64, err error)
- func (s *Store) DeleteExpiredOAuth(ctx context.Context, now time.Time) (requests, grants, clients int64, err error)
- func (s *Store) DeleteGroup(ctx context.Context, id int64) (err error)
- func (s *Store) DeleteGroupAudited(ctx context.Context, id int64, events []audit.Event) error
- func (s *Store) DeleteOAuthAuthorizationRequest(ctx context.Context, id [32]byte) error
- func (s *Store) DeleteUser(ctx context.Context, id int64) (err error)
- func (s *Store) DeleteUserAudited(ctx context.Context, id int64, events []audit.Event) error
- func (s *Store) DesiredSHA(ctx context.Context, id int64) (string, error)
- func (s *Store) DisableInstallation(ctx context.Context, githubID int64, status string) error
- func (s *Store) EnqueueAdminIndex(ctx context.Context, r admin.IndexRequest) error
- func (s *Store) EnqueueIndex(ctx context.Context, request IndexRequest) error
- func (s *Store) EntityGenerations(ctx context.Context, snapshots []graphquery.QuerySnapshot) ([]graphprotocol.Generation, error)
- func (s *Store) EntityNeighbors(ctx context.Context, q graphquery.EntityNeighborQuery) ([]graphquery.EntityNeighbor, error)
- func (s *Store) ExchangeOAuthCode(ctx context.Context, codeID [32]byte, grant authn.OAuthGrant) (int64, error)
- func (s *Store) FailGraph(ctx context.Context, id int64, owner, errorCode string, retry bool) error
- func (s *Store) FailIndex(ctx context.Context, id int64, owner, errorCode string, retry bool) error
- func (s *Store) GraphArtifact(ctx context.Context, repositoryID, uploadID int64) (graphartifact.Artifact, error)
- func (s *Store) GraphManifests(ctx context.Context) ([]graphartifact.Manifest, error)
- func (s *Store) GraphQueueDepths(ctx context.Context) (map[string]int64, error)
- func (s *Store) GraphRepositories(ctx context.Context, principal authn.Principal) ([]repository.Repository, error)
- func (s *Store) GraphStatus(ctx context.Context, repositoryID int64) (api.GraphStatus, error)
- func (s *Store) Group(ctx context.Context, id int64) (scim.Group, error)
- func (s *Store) Health(ctx context.Context) error
- func (s *Store) InstallationIDs(ctx context.Context) ([]int64, error)
- func (s *Store) IssueOAuthCode(ctx context.Context, pendingID, codeID, sessionHash [32]byte, userID int64, ...) error
- func (s *Store) ListAPITokens(ctx context.Context, userID int64) ([]authn.APITokenMetadata, error)
- func (s *Store) ListGroups(ctx context.Context, filter scim.Filter, page scim.Page) ([]scim.Group, int, error)
- func (s *Store) ListOAuthGrants(ctx context.Context, userID, afterID int64, limit int) ([]authn.OAuthGrantMetadata, bool, error)
- func (s *Store) ListUsers(ctx context.Context, filter scim.Filter, page scim.Page) ([]scim.User, int, error)
- func (s *Store) LoadGraph(ctx context.Context, uploadID int64) (graphartifact.Artifact, error)
- func (s *Store) LoadGraphV2(ctx context.Context, repositoryID, uploadID int64) (*graphv2.Artifact, error)
- func (s *Store) Locations(ctx context.Context, principal authn.Principal, ...) ([]scipgraph.Location, bool, error)
- func (s *Store) Manifests(ctx context.Context) (map[int64]graphartifact.Manifest, error)
- func (s *Store) Neighbors(ctx context.Context, query graphquery.NeighborQuery) ([]graphquery.Neighbor, error)
- func (s *Store) OAuthAuthorizationRequest(ctx context.Context, id [32]byte, phase string, now time.Time) (authn.OAuthAuthorizationRequest, error)
- func (s *Store) OAuthClient(ctx context.Context, id string, _ time.Time) (authn.OAuthClient, error)
- func (s *Store) OAuthGrantByRefresh(ctx context.Context, refreshHash [32]byte, now time.Time) (authn.OAuthGrant, error)
- func (s *Store) OAuthPrincipal(ctx context.Context, accessHash [32]byte, now time.Time) (authn.Principal, error)
- func (s *Store) OccurrenceAt(ctx context.Context, repositoryID int64, commit, path string, line int, ...) (scipgraph.StoredOccurrence, error)
- func (s *Store) PasswordCredential(ctx context.Context, userName string) (int64, authn.PasswordCredential, error)
- func (s *Store) PatchGroup(ctx context.Context, id int64, mutation scim.GroupMutation) (updated scim.Group, err error)
- func (s *Store) PatchGroupAudited(ctx context.Context, id int64, mutation scim.GroupMutation, ...) (scim.Group, error)
- func (s *Store) PatchUser(ctx context.Context, id int64, mutation scim.UserMutation) (updated scim.User, err error)
- func (s *Store) PatchUserAudited(ctx context.Context, id int64, mutation scim.UserMutation, ...) (scim.User, error)
- func (s *Store) Prune(ctx context.Context) (int64, int64, error)
- func (s *Store) PublishIndex(ctx context.Context, id int64, owner string) error
- func (s *Store) QueryAggregateNames(ctx context.Context, q graphquery.AggregateNamesQuery) ([]string, error)
- func (s *Store) QueryAnalysisEntities(ctx context.Context, query graphquery.AnalysisEntityQuery) ([]graphprotocol.Entity, error)
- func (s *Store) QueryAnalysisEvidence(ctx context.Context, query graphquery.AnalysisEvidenceQuery) ([]graphprotocol.Evidence, error)
- func (s *Store) QueryDiscovery(ctx context.Context, q graphquery.DiscoverySearch) ([]graphprotocol.DiscoveryMatch, error)
- func (s *Store) QueryEntities(ctx context.Context, q graphquery.EntityQuery) ([]graphprotocol.Entity, error)
- func (s *Store) QueryFan(ctx context.Context, q graphquery.AggregateFanQuery) ([]graphprotocol.AggregateCount, error)
- func (s *Store) QueryFileDependencyPairs(ctx context.Context, q graphquery.FileDependencyQuery) ([]graphquery.FileDependencyPairRow, error)
- func (s *Store) QueryFileNodes(ctx context.Context, snapshot graphquery.QuerySnapshot, paths []string) ([]graphprotocol.Entity, error)
- func (s *Store) QueryFiles(ctx context.Context, q graphquery.FileQuery) ([]graphprotocol.IndexedFile, error)
- func (s *Store) QueryModuleAggregation(ctx context.Context, q graphquery.AggregateModuleQuery) ([]graphquery.AggregateModuleRow, error)
- func (s *Store) QueryNodeMetrics(ctx context.Context, snapshot graphquery.QuerySnapshot, occurrence string) (graphprotocol.NodeMetrics, error)
- func (s *Store) QuerySegments(ctx context.Context, q graphquery.SegmentSearch) ([]graphprotocol.SegmentMatch, error)
- func (s *Store) QueryTopCallingFiles(ctx context.Context, q graphquery.AggregateLimitQuery) ([]graphprotocol.CallingFile, error)
- func (s *Store) QueryTopDependedOn(ctx context.Context, q graphquery.AggregateLimitQuery) ([]graphprotocol.DependedOn, error)
- func (s *Store) QueryUnresolvedReferences(ctx context.Context, q graphquery.AggregateUnresolvedQuery) ([]graphprotocol.UnresolvedReference, error)
- func (s *Store) QueueDepths(ctx context.Context) (map[string]int64, error)
- func (s *Store) ReapExpired(ctx context.Context, limit int) (int64, error)
- func (s *Store) ReapExpiredGraph(ctx context.Context, limit int) (int64, error)
- func (s *Store) RebuildGraphDiscovery(ctx context.Context, repositoryID, uploadID int64) error
- func (s *Store) ReconcileAdminRepositories(ctx context.Context, installationID int64, repositoryIDs []int64, ...) error
- func (s *Store) ReconcileInstallation(ctx context.Context, installation githubapp.Installation, ...) error
- func (s *Store) Record(ctx context.Context, event audit.Event) error
- func (s *Store) RenewGraphLease(ctx context.Context, id int64, owner string) error
- func (s *Store) RenewLease(ctx context.Context, id int64, owner string) error
- func (s *Store) ReplaceAdminGroupAccess(ctx context.Context, actorID, groupID int64, administrator bool, ...) error
- func (s *Store) ReplaceAdminGroupAccessAudited(ctx context.Context, actorID, groupID int64, administrator bool, ...) error
- func (s *Store) ReplaceAdminUserAccess(ctx context.Context, actorID, userID int64, administrator bool, ...) error
- func (s *Store) ReplaceAdminUserAccessAudited(ctx context.Context, actorID, userID int64, administrator bool, ...) error
- func (s *Store) ReplaceGitHubGrants(ctx context.Context, userID int64, repositoryIDs []int64) error
- func (s *Store) ReplaceGraph(ctx context.Context, repositoryID int64, source GraphSource, ...) (GraphReplacement, error)
- func (s *Store) ReplaceGraphV2(ctx context.Context, repositoryID int64, publication GraphPublication, ...) (GraphReplacement, error)
- func (s *Store) ReplaceGroup(ctx context.Context, id int64, group scim.Group) (updated scim.Group, err error)
- func (s *Store) ReplaceGroupAudited(ctx context.Context, id int64, group scim.Group, events []audit.Event) (scim.Group, error)
- func (s *Store) ReplacePackages(ctx context.Context, repositoryID int64, source string, ...) error
- func (s *Store) ReplaceSCIP(ctx context.Context, repositoryID int64, commit string, ...) error
- func (s *Store) ReplaceUser(ctx context.Context, id int64, user scim.User) (updated scim.User, err error)
- func (s *Store) ReplaceUserAudited(ctx context.Context, id int64, user scim.User, events []audit.Event) (scim.User, error)
- func (s *Store) RepositoryForIndex(ctx context.Context, id int64) (repository.Repository, error)
- func (s *Store) RetryAdminJob(ctx context.Context, installationID int64, repositoryIDs []int64, id int64) error
- func (s *Store) RevokeAPIToken(ctx context.Context, userID, tokenID int64) error
- func (s *Store) RevokeAPITokenAudited(ctx context.Context, userID, tokenID int64, event audit.Event) error
- func (s *Store) RevokeAdminUserCredentials(ctx context.Context, userID int64) error
- func (s *Store) RevokeAdminUserCredentialsAudited(ctx context.Context, userID int64, event audit.Event) error
- func (s *Store) RevokeOAuthGrant(ctx context.Context, grantID int64) error
- func (s *Store) RevokeOAuthGrantByToken(ctx context.Context, hash [32]byte, clientID string) (bool, error)
- func (s *Store) RevokeSession(ctx context.Context, tokenHash [32]byte) error
- func (s *Store) RevokeSessionAudited(ctx context.Context, tokenHash [32]byte) error
- func (s *Store) RevokeUserOAuthGrant(ctx context.Context, userID, grantID int64) error
- func (s *Store) RevokeUserOAuthGrantAudited(ctx context.Context, userID, grantID int64, event audit.Event) error
- func (s *Store) RotateOAuthGrant(ctx context.Context, refreshHash [32]byte, rotation authn.OAuthRotation) (authn.OAuthGrant, error)
- func (s *Store) RotatePasswordCredential(ctx context.Context, userID int64, ...) error
- func (s *Store) SCIPIndexCommit(ctx context.Context, repositoryID int64) (string, error)
- func (s *Store) SessionPrincipal(ctx context.Context, tokenHash [32]byte, now, idleUntil time.Time) (authn.Principal, error)
- func (s *Store) SetPasswordCredential(ctx context.Context, userID int64, credential authn.PasswordCredential, ...) error
- func (s *Store) SuspendAdminUser(ctx context.Context, actorID, userID int64, suspended bool) error
- func (s *Store) SuspendAdminUserAudited(ctx context.Context, actorID, userID int64, suspended bool, event audit.Event) error
- func (s *Store) Symbols(ctx context.Context, query graphquery.SymbolQuery) ([]graphprotocol.Symbol, error)
- func (s *Store) UpdateOAuthGrantGitHubToken(ctx context.Context, grantID int64, ciphertext []byte) error
- func (s *Store) UpsertBreakGlassAdmin(ctx context.Context, userName string, credential authn.PasswordCredential, ...) (int64, error)
- func (s *Store) UpsertInstallation(ctx context.Context, update InstallationUpdate) error
- func (s *Store) UpsertRepository(ctx context.Context, update RepositoryUpdate) (repository.Repository, error)
- func (s *Store) UpsertSearchNode(ctx context.Context, nodeID, baseURL string) error
- func (s *Store) User(ctx context.Context, id int64) (scim.User, error)
- func (s *Store) UserDisplayName(ctx context.Context, userID int64) (string, error)
- func (s *Store) UserPrincipal(ctx context.Context, userID int64, ceiling []int64) (authn.Principal, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrGraphPrecondition = errors.New("graph generation or indexed commit changed") ErrGraphProviderConflict = errors.New("graph provider change requires explicit replacement") )
var ( ErrInvalidSecurityPrincipal = errors.New("invalid security principal") ErrInvalidAuditLimit = errors.New("invalid audit limit") )
var ErrLeaseLost = errors.New("index job lease lost")
var ErrNoJob = errors.New("no index job available")
Functions ¶
Types ¶
type DeliveryTx ¶
type DeliveryTx struct {
// contains filtered or unexported fields
}
func (*DeliveryTx) DisableInstallation ¶
func (*DeliveryTx) DisableRepository ¶
func (*DeliveryTx) EnqueueIndex ¶
func (tx *DeliveryTx) EnqueueIndex(ctx context.Context, request IndexRequest) error
func (*DeliveryTx) RenameRepository ¶
func (*DeliveryTx) RepositoryForPush ¶
func (tx *DeliveryTx) RepositoryForPush(ctx context.Context, installationID, githubID int64) (repository.Repository, error)
func (*DeliveryTx) UpdateRepositorySize ¶
func (tx *DeliveryTx) UpdateRepositorySize(ctx context.Context, repositoryID, sizeBytes int64) error
type EnrichmentStatus ¶
type EnrichmentStatus struct {
Artifact *graphartifact.Artifact
ErrorCode string
}
type GraphPublication ¶
type GraphPublication struct {
Publisher string
Capabilities []string
ExpectedActiveID int64
AllowProviderChange bool
}
GraphPublication is trusted publication context, separate from producer facts. Zero ExpectedActiveID means no active generation, not an unconditional write. These storage APIs are deliberately absent from production upload interfaces.
type GraphReplacement ¶
type GraphReplacement struct {
Upload GraphUpload
Applied bool
}
type GraphSource ¶
type GraphSource string
const ( GraphSourceManaged GraphSource = "managed" GraphSourceExternal GraphSource = "external" GraphSourceSCIP GraphSource = "scip" )
type GraphUpload ¶
type GraphUpload struct {
ID, RepositoryID int64
Commit string
SchemaVersion, NodeCount, EdgeCount int
Source GraphSource
}
type IndexRequest ¶
type InstallationUpdate ¶
type RepositoryUpdate ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) APIPrincipal ¶
func (*Store) ActiveGraphJobIDs ¶
func (*Store) ActiveJobIDs ¶
func (*Store) AdminDeliveries ¶
func (*Store) AdminGitHub ¶
func (*Store) AdminGroup ¶
func (*Store) AdminGroups ¶
func (*Store) AdminOverview ¶
func (*Store) AdminRepositories ¶
func (s *Store) AdminRepositories(ctx context.Context, installationID int64, repositoryIDs []int64, limit int, cursor *admin.RepositoryCursor) ([]admin.Repository, bool, error)
AdminRepositories returns one page ordered by full name. The cursor is the last full name of the previous page; the keyset comparison keeps pages stable while repositories are added or renamed between requests.
func (*Store) AdminRepository ¶
func (s *Store) AdminRepository(ctx context.Context, installationID int64, repositoryIDs []int64, githubID int64) (repository.Repository, error)
func (*Store) AdminSCIPDependencies ¶
func (*Store) AdminSCIPUploads ¶
func (*Store) AdminUsers ¶
func (*Store) AggregateStats ¶
func (s *Store) AggregateStats(ctx context.Context, snapshot graphquery.QuerySnapshot) (graphprotocol.GraphStats, error)
func (*Store) AllAuthorizedRepositories ¶
func (s *Store) AllAuthorizedRepositories(ctx context.Context, names []string) ([]repository.Repository, error)
func (*Store) AllowOAuthRequest ¶
func (s *Store) AllowOAuthRequest(ctx context.Context, remoteAddr, endpoint string, now time.Time) (bool, error)
AllowOAuthRequest shares fixed-minute budgets across every server instance. Only the socket peer's canonical IP contributes to the source budget.
func (*Store) AnyAuthorizedRepository ¶
func (s *Store) AnyAuthorizedRepository(ctx context.Context, repositoryID int64) (repository.Repository, error)
func (*Store) AppendAudit ¶
func (*Store) ApplyDelivery ¶
func (*Store) AuditEvents ¶
func (*Store) AuthorizedRepositories ¶
func (s *Store) AuthorizedRepositories(ctx context.Context, installationID int64, repositoryIDs []int64, names []string) ([]repository.Repository, error)
func (*Store) AuthorizedRepository ¶
func (s *Store) AuthorizedRepository(ctx context.Context, installationID int64, repositoryIDs []int64, repositoryID int64) (repository.Repository, error)
func (*Store) BindFederatedUser ¶
func (*Store) ClaimGraph ¶
func (*Store) ClaimIndex ¶
func (*Store) ClassifyFiles ¶
func (s *Store) ClassifyFiles(ctx context.Context, q graphquery.FileClassificationQuery) ([]graphquery.FileClassificationRow, error)
func (*Store) ClearLoginFailures ¶
func (*Store) CompleteGraph ¶
func (*Store) CompleteIndex ¶
func (*Store) ConsumeLoginAttempt ¶
func (*Store) ConsumeLoginFlow ¶
func (*Store) CountFiles ¶
CountFiles aggregates only the same selected immutable uploads and filters as the bounded page. It never loads file payloads or whole artifacts.
func (*Store) CountGeneratedFiles ¶
func (s *Store) CountGeneratedFiles(ctx context.Context, snapshots []graphquery.QuerySnapshot) (generated, total int64, err error)
func (*Store) CreateAPIToken ¶
func (*Store) CreateAPITokenAudited ¶
func (*Store) CreateFederatedSessionAudited ¶
func (*Store) CreateGroup ¶
func (*Store) CreateGroupAudited ¶
func (*Store) CreateLoginFlow ¶
func (*Store) CreateOAuthAuthorizationRequest ¶
func (*Store) CreateOAuthClient ¶
func (*Store) CreateOAuthGrant ¶
func (*Store) CreatePasswordSession ¶
func (s *Store) CreatePasswordSession(ctx context.Context, userID int64, expected authn.PasswordCredential, session authn.SessionRecord, accountKey, sourceKey [32]byte) error
func (*Store) CreateSession ¶
func (*Store) CreateSessionAudited ¶
func (*Store) CreateUser ¶
func (*Store) CreateUserAudited ¶
func (*Store) DeleteExpiredAuth ¶
func (*Store) DeleteExpiredOAuth ¶
func (s *Store) DeleteExpiredOAuth(ctx context.Context, now time.Time) (requests, grants, clients int64, err error)
DeleteExpiredOAuth removes finished browser interactions, grants that have been dead for a week (kept briefly for audit correlation), and clients idle for ninety days.
func (*Store) DeleteGroupAudited ¶
func (*Store) DeleteOAuthAuthorizationRequest ¶
func (*Store) DeleteUserAudited ¶
func (*Store) DesiredSHA ¶
func (*Store) DisableInstallation ¶
func (*Store) EnqueueAdminIndex ¶
func (*Store) EnqueueIndex ¶
func (s *Store) EnqueueIndex(ctx context.Context, request IndexRequest) error
func (*Store) EntityGenerations ¶
func (s *Store) EntityGenerations(ctx context.Context, snapshots []graphquery.QuerySnapshot) ([]graphprotocol.Generation, error)
Payload CASE expressions return a sentinel for oversized facts. Do not turn them into WHERE filters: dropping facts would falsely report complete answers. Only the caller's authorized repository set is inspected. The repository's current indexed SHA and active generation are checked together in one query.
func (*Store) EntityNeighbors ¶
func (s *Store) EntityNeighbors(ctx context.Context, q graphquery.EntityNeighborQuery) ([]graphquery.EntityNeighbor, error)
func (*Store) ExchangeOAuthCode ¶
func (*Store) GraphArtifact ¶
func (*Store) GraphManifests ¶
func (*Store) GraphQueueDepths ¶
func (*Store) GraphRepositories ¶
func (s *Store) GraphRepositories(ctx context.Context, principal authn.Principal) ([]repository.Repository, error)
func (*Store) GraphStatus ¶
func (*Store) InstallationIDs ¶
func (*Store) IssueOAuthCode ¶
func (s *Store) IssueOAuthCode(ctx context.Context, pendingID, codeID, sessionHash [32]byte, userID int64, expiresAt, now time.Time) error
IssueOAuthCode atomically validates the consent session and re-keys a pending request as a code.
func (*Store) ListAPITokens ¶
func (*Store) ListGroups ¶
func (*Store) ListOAuthGrants ¶
func (*Store) LoadGraphV2 ¶
func (s *Store) LoadGraphV2(ctx context.Context, repositoryID, uploadID int64) (*graphv2.Artifact, error)
LoadGraphV2 loads an immutable generation, including retired generations. The caller must authorize the repository; this is not a public download API.
func (*Store) Neighbors ¶
func (s *Store) Neighbors(ctx context.Context, query graphquery.NeighborQuery) ([]graphquery.Neighbor, error)
func (*Store) OAuthAuthorizationRequest ¶
func (*Store) OAuthClient ¶
OAuthClient loads a client.
func (*Store) OAuthGrantByRefresh ¶
func (*Store) OAuthPrincipal ¶
func (s *Store) OAuthPrincipal(ctx context.Context, accessHash [32]byte, now time.Time) (authn.Principal, error)
OAuthPrincipal resolves a live access token with the user's repository read access, without delegating administrative or write privileges.
func (*Store) OccurrenceAt ¶
func (*Store) PasswordCredential ¶
func (*Store) PatchGroup ¶
func (*Store) PatchGroupAudited ¶
func (*Store) PatchUserAudited ¶
func (*Store) PublishIndex ¶
func (*Store) QueryAggregateNames ¶
func (s *Store) QueryAggregateNames(ctx context.Context, q graphquery.AggregateNamesQuery) ([]string, error)
func (*Store) QueryAnalysisEntities ¶
func (s *Store) QueryAnalysisEntities(ctx context.Context, query graphquery.AnalysisEntityQuery) ([]graphprotocol.Entity, error)
func (*Store) QueryAnalysisEvidence ¶
func (s *Store) QueryAnalysisEvidence(ctx context.Context, query graphquery.AnalysisEvidenceQuery) ([]graphprotocol.Evidence, error)
func (*Store) QueryDiscovery ¶
func (s *Store) QueryDiscovery(ctx context.Context, q graphquery.DiscoverySearch) ([]graphprotocol.DiscoveryMatch, error)
func (*Store) QueryEntities ¶
func (s *Store) QueryEntities(ctx context.Context, q graphquery.EntityQuery) ([]graphprotocol.Entity, error)
func (*Store) QueryFan ¶
func (s *Store) QueryFan(ctx context.Context, q graphquery.AggregateFanQuery) ([]graphprotocol.AggregateCount, error)
func (*Store) QueryFileDependencyPairs ¶
func (s *Store) QueryFileDependencyPairs(ctx context.Context, q graphquery.FileDependencyQuery) ([]graphquery.FileDependencyPairRow, error)
func (*Store) QueryFileNodes ¶
func (s *Store) QueryFileNodes(ctx context.Context, snapshot graphquery.QuerySnapshot, paths []string) ([]graphprotocol.Entity, error)
func (*Store) QueryFiles ¶
func (s *Store) QueryFiles(ctx context.Context, q graphquery.FileQuery) ([]graphprotocol.IndexedFile, error)
func (*Store) QueryModuleAggregation ¶
func (s *Store) QueryModuleAggregation(ctx context.Context, q graphquery.AggregateModuleQuery) ([]graphquery.AggregateModuleRow, error)
func (*Store) QueryNodeMetrics ¶
func (s *Store) QueryNodeMetrics(ctx context.Context, snapshot graphquery.QuerySnapshot, occurrence string) (graphprotocol.NodeMetrics, error)
func (*Store) QuerySegments ¶
func (s *Store) QuerySegments(ctx context.Context, q graphquery.SegmentSearch) ([]graphprotocol.SegmentMatch, error)
func (*Store) QueryTopCallingFiles ¶
func (s *Store) QueryTopCallingFiles(ctx context.Context, q graphquery.AggregateLimitQuery) ([]graphprotocol.CallingFile, error)
func (*Store) QueryTopDependedOn ¶
func (s *Store) QueryTopDependedOn(ctx context.Context, q graphquery.AggregateLimitQuery) ([]graphprotocol.DependedOn, error)
func (*Store) QueryUnresolvedReferences ¶
func (s *Store) QueryUnresolvedReferences(ctx context.Context, q graphquery.AggregateUnresolvedQuery) ([]graphprotocol.UnresolvedReference, error)
func (*Store) QueueDepths ¶
func (*Store) ReapExpired ¶
func (*Store) ReapExpiredGraph ¶
func (*Store) RebuildGraphDiscovery ¶
RebuildGraphDiscovery is an explicit offline maintenance operation. It may load a full validated artifact; the request path never calls it. Immutable generation identity prevents a replacement from changing the facts rebuilt.
func (*Store) ReconcileAdminRepositories ¶
func (*Store) ReconcileInstallation ¶
func (s *Store) ReconcileInstallation(ctx context.Context, installation githubapp.Installation, repositories []githubapp.Repository) error
func (*Store) RenewGraphLease ¶
func (*Store) RenewLease ¶
func (*Store) ReplaceAdminGroupAccess ¶
func (*Store) ReplaceAdminGroupAccessAudited ¶
func (*Store) ReplaceAdminUserAccess ¶
func (*Store) ReplaceAdminUserAccessAudited ¶
func (*Store) ReplaceGitHubGrants ¶
ReplaceGitHubGrants mirrors bindProviderUser's grant replacement for a refresh-time sync: unknown repository IDs are dropped by the join.
func (*Store) ReplaceGraph ¶
func (s *Store) ReplaceGraph(ctx context.Context, repositoryID int64, source GraphSource, artifact graphartifact.Artifact) (GraphReplacement, error)
func (*Store) ReplaceGraphV2 ¶
func (s *Store) ReplaceGraphV2(ctx context.Context, repositoryID int64, publication GraphPublication, artifact *graphv2.Artifact) (GraphReplacement, error)
func (*Store) ReplaceGroup ¶
func (*Store) ReplaceGroupAudited ¶
func (*Store) ReplacePackages ¶
func (*Store) ReplaceSCIP ¶
func (*Store) ReplaceUser ¶
func (*Store) ReplaceUserAudited ¶
func (*Store) RepositoryForIndex ¶
func (s *Store) RepositoryForIndex(ctx context.Context, id int64) (repository.Repository, error)
func (*Store) RetryAdminJob ¶
func (*Store) RevokeAPIToken ¶
func (*Store) RevokeAPITokenAudited ¶
func (*Store) RevokeAdminUserCredentials ¶
func (*Store) RevokeAdminUserCredentialsAudited ¶
func (*Store) RevokeOAuthGrant ¶
func (*Store) RevokeOAuthGrantByToken ¶
func (*Store) RevokeSession ¶
func (*Store) RevokeSessionAudited ¶
func (*Store) RevokeUserOAuthGrant ¶
func (*Store) RevokeUserOAuthGrantAudited ¶
func (*Store) RotateOAuthGrant ¶
func (s *Store) RotateOAuthGrant(ctx context.Context, refreshHash [32]byte, rotation authn.OAuthRotation) (authn.OAuthGrant, error)
RotateOAuthGrant implements refresh-token rotation with replay detection. Presenting any consumed refresh token after its rotation grace period revokes the grant and returns ErrOAuthReplay. Access use does not extend that grace.
func (*Store) RotatePasswordCredential ¶
func (*Store) SCIPIndexCommit ¶
func (*Store) SessionPrincipal ¶
func (*Store) SetPasswordCredential ¶
func (*Store) SuspendAdminUser ¶
func (*Store) SuspendAdminUserAudited ¶
func (*Store) Symbols ¶
func (s *Store) Symbols(ctx context.Context, query graphquery.SymbolQuery) ([]graphprotocol.Symbol, error)
func (*Store) UpdateOAuthGrantGitHubToken ¶
func (*Store) UpsertBreakGlassAdmin ¶
func (*Store) UpsertInstallation ¶
func (s *Store) UpsertInstallation(ctx context.Context, update InstallationUpdate) error
func (*Store) UpsertRepository ¶
func (s *Store) UpsertRepository(ctx context.Context, update RepositoryUpdate) (repository.Repository, error)
func (*Store) UpsertSearchNode ¶
func (*Store) UserDisplayName ¶
UserDisplayName renders "Display Name (user_name)" for the consent page.
Source Files
¶
- admin_identity.go
- auth.go
- delivery.go
- directory.go
- graph.go
- graph_aggregates.go
- graph_discovery.go
- graph_discovery_variants.go
- graph_entity.go
- graph_entity_impact.go
- graph_file_classification.go
- graph_file_dependencies.go
- graph_files.go
- graph_query.go
- graph_v2.go
- migrate.go
- oauth.go
- oauth_security.go
- queue.go
- repository.go
- scim_directory.go
- scip.go
- security.go
- store.go