setupstore

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package setupstore persists per-app setup scripts (encrypted at rest) and the run ledger (plan §9). The script set + the run idempotence are keyed by the full script_set_checksum so a confirmation is void on any byte change and on_first_deploy runs exactly once per checksum.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store persists setup scripts + runs.

func New

func New(db *store.DB, cipher *secret.Cipher) *Store

New builds a Store.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, slug string) error

Delete removes an app's setup script.

func (*Store) DeleteApp

func (s *Store) DeleteApp(ctx context.Context, slug string) error

DeleteApp removes an app's setup script AND its run ledger. Used by the app-delete teardown (the plain Delete only drops the script).

func (*Store) Get

func (s *Store) Get(slug string) (sandbox.ScriptSet, bool, error)

Get returns the decrypted script set for an app.

func (*Store) HasSuccessfulRun

func (s *Store) HasSuccessfulRun(slug, checksum string) bool

HasSuccessfulRun reports whether (slug, checksum) already ran successfully — the on_first_deploy idempotence key (plan §7).

func (*Store) RecordRunFinish

func (s *Store) RecordRunFinish(ctx context.Context, id int64, outcome string, exit int)

RecordRunFinish finalizes a run row.

func (*Store) RecordRunStart

func (s *Store) RecordRunStart(ctx context.Context, slug, checksum, actor string) int64

RecordRunStart inserts a run row and returns its id.

func (*Store) Save

func (s *Store) Save(ctx context.Context, slug string, ss sandbox.ScriptSet, autoDeploy bool) error

Save validates + upserts an app's setup script set (script encrypted at rest). autoDeploy is the app's git.auto_deploy flag (auto-setup + auto-deploy is a hard reject — plan §7).

Jump to

Keyboard shortcuts

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