Versions in this module Expand all Collapse all v1 v1.4.0 Sep 10, 2026 v1.3.1 Sep 10, 2026 v1.3.0 Sep 10, 2026 Changes in this version + const ApprovalEnv + const ManifestName + var ErrNoConnection = errors.New("drop guard reached no database") + var ErrTableAbsent = errors.New("drop guard found no such table") + func AdjudicateDeclaredDropCount(service string, found, filesScanned, declared int) string + func Gate(ctx context.Context, db Querier, service string, fsys fs.FS, out io.Writer, ...) error + func ManifestAbsenceIsLegitimate(dropsInChain int, err error) bool + func Observe(ctx context.Context, db Querier, table string) (int64, error) + func PreserveCommand(table string) string + func PreserveSelect(table string) string + type AppliedSet func(version int64) (bool, error) + func GooseApplied(ctx context.Context, db Querier) AppliedSet + type Approval struct + Table string + Version int64 + func ParseApprovals(s string) ([]Approval, error) + func (a Approval) String() string + type Counter func(ctx context.Context, table string) (int64, error) + func Counting(db Querier) Counter + type Declaration struct + ExpectRows int64 + Kind Kind + Note string + Table string + Version int64 + type Drop struct + File string + Line int + RecreatedHere bool + Service string + Table string + Version int64 + type DynamicDrop struct + File string + Line int + Service string + Text string + Version int64 + type Inv struct + Drops []Drop + DynamicDrops []DynamicDrop + FilesScanned int + Service string + func Inventory(service string, fsys fs.FS) (Inv, error) + func (i Inv) CreateVersions(table string) []int64 + func (i Inv) CreatesTable(table string) bool + func (i Inv) DropVersions() []int64 + func (i Inv) SeedVersions(table string, version int64) []int64 + func (i Inv) SeedsTable(table string, version int64) bool + func (i Inv) UnreadableDrops() []string + type Kind string + const KindAbsent + const KindRecreate + const KindRetire + type Manifest struct + Drops []Declaration + Service string + func LoadManifest(path string) (Manifest, error) + type PreflightReport struct + AbsentAt []string + Approved []string + Counted int + Deferred []string + DropsInChain int + DynamicDrops []string + Pending int + Rows map[string]int64 + Service string + StaleApprovals []string + Target Target + Violations []Violation + func Preflight(ctx context.Context, count Counter, inv Inv, applied AppliedSet, ...) PreflightReport + func (r PreflightReport) OK() bool + func (r PreflightReport) Summary() string + func (r PreflightReport) WriteCensus(w io.Writer) + type Querier interface + PingContext func(ctx context.Context) error + QueryRowContext func(ctx context.Context, query string, args ...any) *sql.Row + type Report struct + AbsentAt []string + DropsInChain int + DynamicDrops []string + FilesScanned int + Measured int + Rows map[string]int64 + Service string + Unmeasured []string + Violations []Violation + func MeasureChain(ctx context.Context, db Querier, inv Inv, m Manifest, step StepTo) (Report, error) + func NothingMeasured(inv Inv) Report + func (r Report) OK() bool + func (r Report) Summary() string + func (r Report) WriteCensus(w io.Writer) + type StepTo func(version int64) error + type Target struct + func UpTo(version int64) Target + func WholeChain() Target + func (t Target) Reaches(version int64) bool + func (t Target) String() string + type Violation struct + Detail string + Kind ViolationKind + Service string + Table string + Version int64 + func Judge(drop Drop, decl Declaration, rows int64, obsErr error) []Violation + func Reconcile(inv Inv, m Manifest) []Violation + func (v Violation) Error() string + type ViolationKind string + const ViolationDuplicate + const ViolationExpired + const ViolationKindMismatch + const ViolationRowCount + const ViolationUndeclared + const ViolationUngrounded + const ViolationUnjustified + const ViolationUnverified