sqlite

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package sqlite implements store.Store using the Grove ORM with sqlitedriver.

Index

Constants

This section is empty.

Variables

View Source
var Migrations = migrate.NewGroup("ctrlplane")

Migrations is the grove migration group for the CtrlPlane SQLite store.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements store.Store using grove ORM with sqlitedriver.

func New

func New(db *grove.DB) *Store

New creates a new SQLite-backed store.

func (*Store) Close

func (s *Store) Close() error

Close closes the database connection.

func (*Store) CountByTenant added in v0.1.0

func (s *Store) CountByTenant(ctx context.Context, tenantID string) (int, error)

func (*Store) CountDomainsByTenant added in v0.1.0

func (s *Store) CountDomainsByTenant(ctx context.Context, tenantID string) (int, error)

func (*Store) CountSecretsByTenant added in v0.1.0

func (s *Store) CountSecretsByTenant(ctx context.Context, tenantID string) (int, error)

func (*Store) CountTenants added in v0.1.0

func (s *Store) CountTenants(ctx context.Context) (int, error)

func (*Store) CountTenantsByStatus added in v0.1.0

func (s *Store) CountTenantsByStatus(ctx context.Context, status admin.TenantStatus) (int, error)

func (*Store) DB added in v0.1.0

func (s *Store) DB() *grove.DB

DB returns the underlying grove database for direct access.

func (*Store) Delete added in v0.1.0

func (s *Store) Delete(ctx context.Context, tenantID string, instanceID id.ID) error

func (*Store) DeleteCertificate added in v0.1.0

func (s *Store) DeleteCertificate(ctx context.Context, tenantID string, certID id.ID) error

func (*Store) DeleteCheck added in v0.1.0

func (s *Store) DeleteCheck(ctx context.Context, tenantID string, checkID id.ID) error

func (*Store) DeleteDomain added in v0.1.0

func (s *Store) DeleteDomain(ctx context.Context, tenantID string, domainID id.ID) error

func (*Store) DeleteRoute added in v0.1.0

func (s *Store) DeleteRoute(ctx context.Context, tenantID string, routeID id.ID) error

func (*Store) DeleteSecret added in v0.1.0

func (s *Store) DeleteSecret(ctx context.Context, tenantID string, instanceID id.ID, key string) error

func (*Store) DeleteTenant added in v0.1.0

func (s *Store) DeleteTenant(ctx context.Context, tenantID string) error

func (*Store) GetByID added in v0.1.0

func (s *Store) GetByID(ctx context.Context, tenantID string, instanceID id.ID) (*instance.Instance, error)

func (*Store) GetBySlug added in v0.1.0

func (s *Store) GetBySlug(ctx context.Context, tenantID string, slug string) (*instance.Instance, error)

func (*Store) GetCertificate added in v0.1.0

func (s *Store) GetCertificate(ctx context.Context, tenantID string, certID id.ID) (*network.Certificate, error)

func (*Store) GetCheck added in v0.1.0

func (s *Store) GetCheck(ctx context.Context, tenantID string, checkID id.ID) (*health.HealthCheck, error)

func (*Store) GetDeployment added in v0.1.0

func (s *Store) GetDeployment(ctx context.Context, tenantID string, deployID id.ID) (*deploy.Deployment, error)

func (*Store) GetDomain added in v0.1.0

func (s *Store) GetDomain(ctx context.Context, tenantID string, domainID id.ID) (*network.Domain, error)

func (*Store) GetDomainByHostname added in v0.1.0

func (s *Store) GetDomainByHostname(ctx context.Context, hostname string) (*network.Domain, error)

func (*Store) GetLatestResourceSnapshot added in v0.1.0

func (s *Store) GetLatestResourceSnapshot(ctx context.Context, tenantID string, instanceID id.ID) (*telemetry.ResourceSnapshot, error)

func (*Store) GetLatestResult added in v0.1.0

func (s *Store) GetLatestResult(ctx context.Context, tenantID string, checkID id.ID) (*health.HealthResult, error)

func (*Store) GetRelease added in v0.1.0

func (s *Store) GetRelease(ctx context.Context, tenantID string, releaseID id.ID) (*deploy.Release, error)

func (*Store) GetRoute added in v0.1.0

func (s *Store) GetRoute(ctx context.Context, tenantID string, routeID id.ID) (*network.Route, error)

func (*Store) GetSecretByKey added in v0.1.0

func (s *Store) GetSecretByKey(ctx context.Context, tenantID string, instanceID id.ID, key string) (*secrets.Secret, error)

func (*Store) GetTenant added in v0.1.0

func (s *Store) GetTenant(ctx context.Context, tenantID string) (*admin.Tenant, error)

func (*Store) GetTenantBySlug added in v0.1.0

func (s *Store) GetTenantBySlug(ctx context.Context, slug string) (*admin.Tenant, error)

func (*Store) Insert added in v0.1.0

func (s *Store) Insert(ctx context.Context, inst *instance.Instance) error

func (*Store) InsertAuditEntry added in v0.1.0

func (s *Store) InsertAuditEntry(ctx context.Context, entry *admin.AuditEntry) error

func (*Store) InsertCertificate added in v0.1.0

func (s *Store) InsertCertificate(ctx context.Context, cert *network.Certificate) error

func (*Store) InsertCheck added in v0.1.0

func (s *Store) InsertCheck(ctx context.Context, check *health.HealthCheck) error

func (*Store) InsertDeployment added in v0.1.0

func (s *Store) InsertDeployment(ctx context.Context, d *deploy.Deployment) error

func (*Store) InsertDomain added in v0.1.0

func (s *Store) InsertDomain(ctx context.Context, domain *network.Domain) error

func (*Store) InsertLogs added in v0.1.0

func (s *Store) InsertLogs(ctx context.Context, logs []telemetry.LogEntry) error

func (*Store) InsertMetrics added in v0.1.0

func (s *Store) InsertMetrics(ctx context.Context, metrics []telemetry.Metric) error

func (*Store) InsertRelease added in v0.1.0

func (s *Store) InsertRelease(ctx context.Context, r *deploy.Release) error

func (*Store) InsertResourceSnapshot added in v0.1.0

func (s *Store) InsertResourceSnapshot(ctx context.Context, snap *telemetry.ResourceSnapshot) error

func (*Store) InsertResult added in v0.1.0

func (s *Store) InsertResult(ctx context.Context, result *health.HealthResult) error

func (*Store) InsertRoute added in v0.1.0

func (s *Store) InsertRoute(ctx context.Context, route *network.Route) error

func (*Store) InsertSecret added in v0.1.0

func (s *Store) InsertSecret(ctx context.Context, secret *secrets.Secret) error

func (*Store) InsertTenant added in v0.1.0

func (s *Store) InsertTenant(ctx context.Context, tenant *admin.Tenant) error

func (*Store) InsertTraces added in v0.1.0

func (s *Store) InsertTraces(ctx context.Context, traces []telemetry.Trace) error

func (*Store) List added in v0.1.0

func (s *Store) List(ctx context.Context, tenantID string, opts instance.ListOptions) (*instance.ListResult, error)

func (*Store) ListCertificates added in v0.1.0

func (s *Store) ListCertificates(ctx context.Context, tenantID string, instanceID id.ID) ([]network.Certificate, error)

func (*Store) ListChecks added in v0.1.0

func (s *Store) ListChecks(ctx context.Context, tenantID string, instanceID id.ID) ([]health.HealthCheck, error)

func (*Store) ListDeployments added in v0.1.0

func (s *Store) ListDeployments(ctx context.Context, tenantID string, instanceID id.ID, opts deploy.ListOptions) (*deploy.DeployListResult, error)

func (*Store) ListDomains added in v0.1.0

func (s *Store) ListDomains(ctx context.Context, tenantID string, instanceID id.ID) ([]network.Domain, error)

func (*Store) ListReleases added in v0.1.0

func (s *Store) ListReleases(ctx context.Context, tenantID string, instanceID id.ID, opts deploy.ListOptions) (*deploy.ReleaseListResult, error)

func (*Store) ListResourceSnapshots added in v0.1.0

func (s *Store) ListResourceSnapshots(ctx context.Context, tenantID string, instanceID id.ID, opts telemetry.TimeRange) ([]telemetry.ResourceSnapshot, error)

func (*Store) ListResults added in v0.1.0

func (s *Store) ListResults(ctx context.Context, tenantID string, checkID id.ID, opts health.HistoryOptions) ([]health.HealthResult, error)

func (*Store) ListRoutes added in v0.1.0

func (s *Store) ListRoutes(ctx context.Context, tenantID string, instanceID id.ID) ([]network.Route, error)

func (*Store) ListSecrets added in v0.1.0

func (s *Store) ListSecrets(ctx context.Context, tenantID string, instanceID id.ID) ([]secrets.Secret, error)

func (*Store) ListTenants added in v0.1.0

func (s *Store) ListTenants(ctx context.Context, opts admin.ListTenantsOptions) (*admin.TenantListResult, error)

func (*Store) Migrate

func (s *Store) Migrate(ctx context.Context) error

Migrate creates the required tables and indexes using the grove orchestrator.

func (*Store) NextReleaseVersion added in v0.1.0

func (s *Store) NextReleaseVersion(ctx context.Context, tenantID string, instanceID id.ID) (int, error)

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

Ping checks database connectivity.

func (*Store) QueryAuditLog added in v0.1.0

func (s *Store) QueryAuditLog(ctx context.Context, opts admin.AuditQuery) (*admin.AuditResult, error)

func (*Store) QueryLogs added in v0.1.0

func (s *Store) QueryLogs(ctx context.Context, q telemetry.LogQuery) ([]telemetry.LogEntry, error)

func (*Store) QueryMetrics added in v0.1.0

func (s *Store) QueryMetrics(ctx context.Context, q telemetry.MetricQuery) ([]telemetry.Metric, error)

func (*Store) QueryTraces added in v0.1.0

func (s *Store) QueryTraces(ctx context.Context, q telemetry.TraceQuery) ([]telemetry.Trace, error)

func (*Store) Update added in v0.1.0

func (s *Store) Update(ctx context.Context, inst *instance.Instance) error

func (*Store) UpdateCertificate added in v0.1.0

func (s *Store) UpdateCertificate(ctx context.Context, cert *network.Certificate) error

func (*Store) UpdateCheck added in v0.1.0

func (s *Store) UpdateCheck(ctx context.Context, check *health.HealthCheck) error

func (*Store) UpdateDeployment added in v0.1.0

func (s *Store) UpdateDeployment(ctx context.Context, d *deploy.Deployment) error

func (*Store) UpdateDomain added in v0.1.0

func (s *Store) UpdateDomain(ctx context.Context, domain *network.Domain) error

func (*Store) UpdateRoute added in v0.1.0

func (s *Store) UpdateRoute(ctx context.Context, route *network.Route) error

func (*Store) UpdateSecret added in v0.1.0

func (s *Store) UpdateSecret(ctx context.Context, secret *secrets.Secret) error

func (*Store) UpdateTenant added in v0.1.0

func (s *Store) UpdateTenant(ctx context.Context, tenant *admin.Tenant) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL