indexidentity

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCaptured    = "captured"
	StatusPending     = "pending"
	StatusError       = "error"
	StatusMissing     = "missing"
	StatusStaleSource = "stale_source"
)
View Source
const SchemaVersion = 1

Variables

This section is empty.

Functions

func ComputeIndexGeneration

func ComputeIndexGeneration(repositoryID, sourceRevision, dirtyFingerprint string) string

ComputeIndexGeneration derives the cross-engine generation identifier.

Types

type Envelope

type Envelope struct {
	SchemaVersion    int    `json:"schema_version"`
	RepositoryID     string `json:"repository_id"`
	CheckoutID       string `json:"checkout_id"`
	SourceRevision   string `json:"source_revision"`
	DirtyFingerprint string `json:"dirty_fingerprint"`
	IndexGeneration  string `json:"index_generation"`
	CapturedAt       string `json:"captured_at"`
}

Envelope identifies the exact checkout state used to build an index.

func Capture

func Capture(root string) (*Envelope, error)

Capture records the identity of a clean Git checkout.

func (*Envelope) Validate

func (e *Envelope) Validate() error

Validate rejects persisted envelopes that cannot identify a coherent index.

type Record

type Record struct {
	Identity *Envelope
	Status   string
	Reason   string
}

Record couples an optional captured envelope with its persistence state.

Jump to

Keyboard shortcuts

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