Versions in this module Expand all Collapse all v0 v0.2.7 Aug 13, 2026 Changes in this version type DBStore + func (s *DBStore) ReconcileManagedProfiles(profiles []RunnerProfile) ([]ManagedProfileConflict, error) + type ManagedProfileConflict struct + ExistingManagedBy string + Name string type RunnerCatalogStore + ReconcileManagedProfiles func(profiles []RunnerProfile) ([]ManagedProfileConflict, error) type RunnerProfile + CatalogRevision int + DefaultTemplateName string + ManagedBy string + RequiredLabels []string v0.2.6 Jul 30, 2026 v0.2.5 Jul 30, 2026 Changes in this version + const AccountScopeTypeAccount + const AccountScopeTypeGitHubInstall + const AccountSecretTypeGitHubOAuthToken + const AccountSecretTypeSandboxAPIKey + const BackendMySQL + const BackendPostgres + const BackendSQLite + const SandboxServiceDefaultAudienceModeAll + const SandboxServiceDefaultAudienceModeSelected + const StatusCompleted + const StatusCreating + const StatusFailed + const StatusQueued + const StatusRunning + const StatusStopping + var ErrConflict = errors.New("state conflict") + var ErrNotFound = errors.New("state record not found") + var ErrRetryNotAllowed = errors.New("retry not allowed for current state") + var ErrSandboxServiceDefaultAPIKeyRequired = errors.New("sandbox service default api key is required") + type Account struct + CreatedAt time.Time + ID int64 + Role string + UpdatedAt time.Time + type AccountListItem struct + OAuthIdentities []OAuthIdentity + type AccountListOptions struct + Limit int + Offset int + Query string + Role string + type AccountPreference struct + CreatedAt time.Time + ID int64 + Key string + Namespace string + ScopeID int64 + ScopeType string + UpdatedAt time.Time + ValueJSON string + type AccountPreferenceStore interface + GetAccountPreference func(scopeType string, scopeID int64, namespace, key string) (AccountPreference, error) + UpsertAccountPreference func(preference AccountPreference) (AccountPreference, error) + UpsertAccountPreferenceAndDeleteSecret func(preference AccountPreference, secret AccountSecret) (AccountPreference, error) + UpsertAccountPreferenceAndSecret func(preference AccountPreference, secret *AccountSecret) (AccountPreference, *AccountSecret, error) + type AccountRoleUpdate struct + AccountID int64 + ActorAccountID int64 + AuditActor string + Role string + type AccountSecret struct + CreatedAt time.Time + EncryptedValue string + ID int64 + KeyType string + ScopeID int64 + ScopeType string + UpdatedAt time.Time + type AccountSecretStore interface + DeleteAccountSecret func(scopeType string, scopeID int64, keyType string) error + GetAccountSecret func(scopeType string, scopeID int64, keyType string) (AccountSecret, error) + UpsertAccountSecret func(secret AccountSecret) (AccountSecret, error) + type AccountStats struct + AdminAccounts int64 + OAuthIdentities int64 + TotalAccounts int64 + UserAccounts int64 + type AuditEvent struct + Action string + Actor string + CreatedAt time.Time + ID int64 + PayloadJSON string + ResourceID string + ResourceType string + type AuditStore interface + AppendAuditEvent func(event AuditEvent) (AuditEvent, error) + ListAuditEvents func(limit int) ([]AuditEvent, error) + type DBStore struct + func (s *DBStore) AccountScopeForPersonalGitHubInstallation(installationID int64) (int64, bool, error) + func (s *DBStore) ActiveCount() (int, error) + func (s *DBStore) ActiveCountForProfile(name string) (int, error) + func (s *DBStore) AppendAuditEvent(event AuditEvent) (AuditEvent, error) + func (s *DBStore) AppendLog(id, name string, data []byte) + func (s *DBStore) ClaimNextRunnable(workerID string, now time.Time, leaseTTL time.Duration) (RunnerRequest, RunnerState, bool, error) + func (s *DBStore) CreateRequest(req RunnerRequest, payload []byte) (bool, RunnerState, error) + func (s *DBStore) DeleteAccountSecret(scopeType string, scopeID int64, keyType string) error + func (s *DBStore) DeleteGitHubInstallation(accountID, id int64) error + func (s *DBStore) DeleteProfile(name string) error + func (s *DBStore) DeleteRepositoryPolicy(id int64) error + func (s *DBStore) DeleteRunnerGroup(name string) error + func (s *DBStore) DeleteSandboxServiceDefaultAPIKey() error + func (s *DBStore) DeleteSandboxServiceDefaultAudience(id int64) error + func (s *DBStore) Ensure() error + func (s *DBStore) EnsureAccountForOAuthIdentity(identity OAuthIdentity, role string) (Account, OAuthIdentity, error) + func (s *DBStore) GetAccount(accountID int64) (Account, error) + func (s *DBStore) GetAccountByOAuthIdentity(provider, subject string) (Account, OAuthIdentity, error) + func (s *DBStore) GetAccountPreference(scopeType string, scopeID int64, namespace, key string) (AccountPreference, error) + func (s *DBStore) GetAccountSecret(scopeType string, scopeID int64, keyType string) (AccountSecret, error) + func (s *DBStore) GetAccountStats() (AccountStats, error) + func (s *DBStore) GetGitHubInstallationOwner(installationID int64) (GitHubInstallationAccount, error) + func (s *DBStore) GetOAuthIdentityForAccount(accountID int64, provider string) (OAuthIdentity, error) + func (s *DBStore) GetProfile(name string) (RunnerProfile, error) + func (s *DBStore) GetRepositoryPolicy(id int64) (RepositoryPolicy, error) + func (s *DBStore) GetRunnerGroup(name string) (RunnerGroup, error) + func (s *DBStore) GetSandboxServiceDefault() (SandboxServiceDefault, error) + func (s *DBStore) GitHubInstallationAccountForInstallation(installationID int64) (GitHubInstallationAccount, error) + func (s *DBStore) GitHubInstallationAccountForLogin(accountLogin string) (GitHubInstallationAccount, error) + func (s *DBStore) GitHubInstallationScopeForAccountLogin(accountLogin string) (int64, bool, error) + func (s *DBStore) InFlightCount() (int, error) + func (s *DBStore) InFlightCountForProfile(name string) (int, error) + func (s *DBStore) LinkOAuthIdentityToAccount(accountID int64, identity OAuthIdentity) (Account, OAuthIdentity, error) + func (s *DBStore) ListAccounts(options AccountListOptions) ([]AccountListItem, int64, error) + func (s *DBStore) ListActiveStates() ([]RunnerState, error) + func (s *DBStore) ListAuditEvents(limit int) ([]AuditEvent, error) + func (s *DBStore) ListFailedWorkflowJobStates(limit int) ([]RunnerState, error) + func (s *DBStore) ListGitHubInstallationAccounts() ([]GitHubInstallationAccount, error) + func (s *DBStore) ListGitHubInstallations(accountID int64) ([]GitHubInstallation, error) + func (s *DBStore) ListMismatchedCompletedStates(limit int) ([]RunnerState, error) + func (s *DBStore) ListProfiles() ([]RunnerProfile, error) + func (s *DBStore) ListRepositoryPolicies() ([]RepositoryPolicy, error) + func (s *DBStore) ListRunnerGroups() ([]RunnerGroup, error) + func (s *DBStore) ListSandboxServiceDefaultAudiences() ([]SandboxServiceDefaultAudience, error) + func (s *DBStore) ListStates() ([]RunnerState, error) + func (s *DBStore) ListStatesForGitHubInstallationRepositories(access []GitHubInstallationRepositoryAccess, limit, offset int) ([]RunnerState, int64, error) + func (s *DBStore) ListStatesForGitHubInstallations(installationIDs []int64, limit int) ([]RunnerState, error) + func (s *DBStore) ListStatesForRepositories(repositories []string, limit int) ([]RunnerState, error) + func (s *DBStore) ListStatesPage(limit, offset int) ([]RunnerState, int64, error) + func (s *DBStore) MatchProfile(repositoryFullName string, labels []string) (ProfileMatch, error) + func (s *DBStore) ReadLog(id, name string, maxBytes int64) ([]byte, error) + func (s *DBStore) ReadRequest(id string) (RunnerRequest, error) + func (s *DBStore) ReadState(id string) (RunnerState, error) + func (s *DBStore) ReleaseLease(id, workerID string) error + func (s *DBStore) RetryRequest(id string, now time.Time) (RunnerState, error) + func (s *DBStore) SandboxServiceDefaultAudienceContains(githubAccountID int64, accountType string) (bool, error) + func (s *DBStore) UpdateAccountRoleWithAudit(update AccountRoleUpdate) (Account, error) + func (s *DBStore) UpdateSandboxServiceDefaultPreservingAPIKey(defaultConfig SandboxServiceDefault) (SandboxServiceDefault, error) + func (s *DBStore) UpsertAccountForOAuthIdentity(identity OAuthIdentity, role string) (Account, OAuthIdentity, error) + func (s *DBStore) UpsertAccountPreference(preference AccountPreference) (AccountPreference, error) + func (s *DBStore) UpsertAccountPreferenceAndDeleteSecret(preference AccountPreference, secret AccountSecret) (AccountPreference, error) + func (s *DBStore) UpsertAccountPreferenceAndSecret(preference AccountPreference, secret *AccountSecret) (AccountPreference, *AccountSecret, error) + func (s *DBStore) UpsertAccountSecret(secret AccountSecret) (AccountSecret, error) + func (s *DBStore) UpsertGitHubInstallation(installation GitHubInstallation) (GitHubInstallation, error) + func (s *DBStore) UpsertGitHubInstallationOwner(installationID int64, owner GitHubInstallationAccount) (GitHubInstallationAccount, error) + func (s *DBStore) UpsertProfile(profile RunnerProfile) (RunnerProfile, error) + func (s *DBStore) UpsertRepositoryPolicy(policy RepositoryPolicy) (RepositoryPolicy, error) + func (s *DBStore) UpsertRunnerGroup(group RunnerGroup) (RunnerGroup, error) + func (s *DBStore) UpsertSandboxServiceDefault(defaultConfig SandboxServiceDefault) (SandboxServiceDefault, error) + func (s *DBStore) UpsertSandboxServiceDefaultAudience(audience SandboxServiceDefaultAudience) (SandboxServiceDefaultAudience, error) + func (s *DBStore) WriteState(st RunnerState) error + type GitHubInstallation struct + AccountAvatar string + AccountID int64 + AccountLogin string + AccountName string + AccountType string + CreatedAt time.Time + GitHubAccountID int64 + ID int64 + InstallationID int64 + Repositories []string + UpdatedAt time.Time + type GitHubInstallationAccount struct + AccountAvatar string + AccountLogin string + AccountName string + AccountType string + GitHubAccountID int64 + type GitHubInstallationRepositoryAccess struct + InstallationID int64 + Repositories []string + type GitHubInstallationStore interface + AccountScopeForPersonalGitHubInstallation func(installationID int64) (int64, bool, error) + DeleteGitHubInstallation func(accountID, id int64) error + GetGitHubInstallationOwner func(installationID int64) (GitHubInstallationAccount, error) + GitHubInstallationAccountForInstallation func(installationID int64) (GitHubInstallationAccount, error) + GitHubInstallationAccountForLogin func(accountLogin string) (GitHubInstallationAccount, error) + GitHubInstallationScopeForAccountLogin func(accountLogin string) (int64, bool, error) + ListGitHubInstallationAccounts func() ([]GitHubInstallationAccount, error) + ListGitHubInstallations func(accountID int64) ([]GitHubInstallation, error) + UpsertGitHubInstallation func(installation GitHubInstallation) (GitHubInstallation, error) + UpsertGitHubInstallationOwner func(installationID int64, owner GitHubInstallationAccount) (GitHubInstallationAccount, error) + type IdentityStore interface + EnsureAccountForOAuthIdentity func(identity OAuthIdentity, role string) (Account, OAuthIdentity, error) + GetAccount func(accountID int64) (Account, error) + GetAccountByOAuthIdentity func(provider, subject string) (Account, OAuthIdentity, error) + GetAccountStats func() (AccountStats, error) + GetOAuthIdentityForAccount func(accountID int64, provider string) (OAuthIdentity, error) + LinkOAuthIdentityToAccount func(accountID int64, identity OAuthIdentity) (Account, OAuthIdentity, error) + ListAccounts func(options AccountListOptions) ([]AccountListItem, int64, error) + UpdateAccountRoleWithAudit func(update AccountRoleUpdate) (Account, error) + UpsertAccountForOAuthIdentity func(identity OAuthIdentity, role string) (Account, OAuthIdentity, error) + type OAuthIdentity struct + AccountID int64 + CreatedAt time.Time + ID int64 + OAuthLogin string + OAuthProvider string + OAuthSubject string + UpdatedAt time.Time + type Options struct + Backend string + DatabaseDSN string + MigrateOnStart bool + type ProfileMatch struct + Labels []string + Profile *RunnerProfile + Reason string + RepositoryFullName string + type RepositoryPolicy struct + CreatedAt time.Time + Enabled bool + ID int64 + ProfileName string + RepositoryFullName string + RunnerGroupName string + type RunnerCatalogStore interface + DeleteProfile func(name string) error + DeleteRepositoryPolicy func(id int64) error + DeleteRunnerGroup func(name string) error + GetProfile func(name string) (RunnerProfile, error) + GetRepositoryPolicy func(id int64) (RepositoryPolicy, error) + GetRunnerGroup func(name string) (RunnerGroup, error) + ListProfiles func() ([]RunnerProfile, error) + ListRepositoryPolicies func() ([]RepositoryPolicy, error) + ListRunnerGroups func() ([]RunnerGroup, error) + MatchProfile func(repositoryFullName string, labels []string) (ProfileMatch, error) + UpsertProfile func(profile RunnerProfile) (RunnerProfile, error) + UpsertRepositoryPolicy func(policy RepositoryPolicy) (RepositoryPolicy, error) + UpsertRunnerGroup func(group RunnerGroup) (RunnerGroup, error) + type RunnerGroup struct + CreatedAt time.Time + Description string + Enabled bool + Name string + SpecNames []string + UpdatedAt time.Time + type RunnerProfile struct + CreatedAt time.Time + DefaultAvailable bool + Enabled bool + Labels []string + MaxConcurrency int + MinIdle int + Name string + Priority int + RunnerGroup string + TemplateID string + UpdatedAt time.Time + type RunnerRequest struct + CreatedAt time.Time + GitHubInstallationID int64 + ID string + JobID int64 + Labels []string + ProfileName string + RepositoryFullName string + RequestedLabels []string + RunnerGroup string + RunnerName string + SandboxAPIKeyEncrypted string + SandboxAPIURL string + SandboxConfigSource string + Source string + type RunnerRequestStore interface + ActiveCount func() (int, error) + ActiveCountForProfile func(name string) (int, error) + AppendLog func(id, name string, data []byte) + ClaimNextRunnable func(workerID string, now time.Time, leaseTTL time.Duration) (RunnerRequest, RunnerState, bool, error) + CreateRequest func(req RunnerRequest, payload []byte) (bool, RunnerState, error) + Ensure func() error + InFlightCount func() (int, error) + InFlightCountForProfile func(name string) (int, error) + ListActiveStates func() ([]RunnerState, error) + ListFailedWorkflowJobStates func(limit int) ([]RunnerState, error) + ListMismatchedCompletedStates func(limit int) ([]RunnerState, error) + ListStates func() ([]RunnerState, error) + ListStatesForGitHubInstallationRepositories func(access []GitHubInstallationRepositoryAccess, limit, offset int) ([]RunnerState, int64, error) + ListStatesForGitHubInstallations func(installationIDs []int64, limit int) ([]RunnerState, error) + ListStatesForRepositories func(repositories []string, limit int) ([]RunnerState, error) + ListStatesPage func(limit, offset int) ([]RunnerState, int64, error) + ReadLog func(id, name string, maxBytes int64) ([]byte, error) + ReadRequest func(id string) (RunnerRequest, error) + ReadState func(id string) (RunnerState, error) + ReleaseLease func(id, workerID string) error + RetryRequest func(id string, now time.Time) (RunnerState, error) + WriteState func(st RunnerState) error + type RunnerState struct + AssignedJobID int64 + AssignedJobName string + CompletedAt time.Time + CreatedAt time.Time + CreatingAt time.Time + Error string + FailedAt time.Time + FailureReason string + FailureStage string + GitHubInstallationID int64 + GitHubJobURL string + HeadBranch string + HeadSHA string + ID string + LastAttemptAt time.Time + LastErrorCode string + LastErrorMessage string + LastErrorRetryable bool + LeaseExpiresAt time.Time + LeaseOwner string + NextRetryAt time.Time + ProcessPID uint32 + ProfileName string + PullRequestNumber int64 + RepositoryFullName string + RequestedLabels []string + RetryCount int + RunnerGroup string + RunnerName string + RunningAt time.Time + SandboxAPIKeyEncrypted string + SandboxAPIURL string + SandboxConfigSource string + SandboxID string + Status string + StoppingAt time.Time + UpdatedAt time.Time + Version int64 + WorkflowJobID int64 + WorkflowName string + WorkflowRunAttempt int64 + WorkflowRunID int64 + type SandboxServiceDefault struct + APIKeyEncrypted string + APIKeyUpdatedAt *time.Time + APIURL string + AudienceMode string + CreatedAt time.Time + Enabled bool + ID int64 + UpdatedAt time.Time + type SandboxServiceDefaultAudience struct + AccountAvatar string + AccountLogin string + AccountName string + AccountType string + CreatedAt time.Time + GitHubAccountID int64 + ID int64 + UpdatedAt time.Time + type SandboxServiceDefaultStore interface + DeleteSandboxServiceDefaultAPIKey func() error + DeleteSandboxServiceDefaultAudience func(id int64) error + GetSandboxServiceDefault func() (SandboxServiceDefault, error) + ListSandboxServiceDefaultAudiences func() ([]SandboxServiceDefaultAudience, error) + SandboxServiceDefaultAudienceContains func(githubAccountID int64, accountType string) (bool, error) + UpdateSandboxServiceDefaultPreservingAPIKey func(defaultConfig SandboxServiceDefault) (SandboxServiceDefault, error) + UpsertSandboxServiceDefault func(defaultConfig SandboxServiceDefault) (SandboxServiceDefault, error) + UpsertSandboxServiceDefaultAudience func(audience SandboxServiceDefaultAudience) (SandboxServiceDefaultAudience, error) + type Store interface + func New(dir string) Store + func NewWithOptions(opts Options) Store v0.2.4 Jul 23, 2026 v0.2.3 Jul 21, 2026 v0.2.2 Jul 15, 2026 v0.2.1 Jul 3, 2026