sqlite

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlite is the SQLite-backed adapter for the ingestion.Store port.

Index

Constants

This section is empty.

Variables

View Source
var ErrRepoNotFound = errors.New("repo not found")

ErrRepoNotFound is returned when no repo matches the requested id.

Functions

This section is empty.

Types

type Store

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

Store implements ingestion.Store against a SQLite database.

func NewStore

func NewStore(db *sql.DB, key []byte) *Store

NewStore returns a Store that encrypts tokens at rest under key (32 bytes, AES-256).

func (*Store) CreateRepo

func (s *Store) CreateRepo(ctx context.Context, repo ingestion.NewRepo) (ingestion.Repo, error)

CreateRepo implements ingestion.Store.

func (*Store) DB

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

DB returns the underlying connection, for callers (such as tests) that need to observe storage directly rather than through the port.

func (*Store) GetRepo

func (s *Store) GetRepo(ctx context.Context, id string) (ingestion.Repo, error)

GetRepo implements ingestion.Store.

func (*Store) ListRepos

func (s *Store) ListRepos(ctx context.Context) ([]ingestion.Repo, error)

ListRepos implements ingestion.Store.

func (*Store) ReplaceSteps added in v0.4.0

func (s *Store) ReplaceSteps(ctx context.Context, jobID string, steps []ingestion.Step) error

ReplaceSteps implements ingestion.RunStore.

func (*Store) RepoByIdentifier added in v0.4.0

func (s *Store) RepoByIdentifier(ctx context.Context, forge ingestion.Forge, identifier string) (ingestion.Repo, error)

RepoByIdentifier implements ingestion.RunStore.

func (*Store) RepoToken

func (s *Store) RepoToken(ctx context.Context, id string) (string, error)

RepoToken implements ingestion.Store.

func (*Store) SetIngestionStatus

func (s *Store) SetIngestionStatus(ctx context.Context, id string, status ingestion.Status, reason string) error

SetIngestionStatus implements ingestion.Store.

func (*Store) SetReconcileETag added in v0.4.0

func (s *Store) SetReconcileETag(ctx context.Context, id string, etag string) error

SetReconcileETag implements ingestion.Store.

func (*Store) UpsertJob added in v0.4.0

func (s *Store) UpsertJob(ctx context.Context, job ingestion.Job) (ingestion.Job, error)

UpsertJob implements ingestion.RunStore.

func (*Store) UpsertRun added in v0.4.0

func (s *Store) UpsertRun(ctx context.Context, run ingestion.Run) (ingestion.Run, error)

UpsertRun implements ingestion.RunStore.

Jump to

Keyboard shortcuts

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