Versions in this module Expand all Collapse all v1 v1.17.0 Aug 27, 2026 Changes in this version + const AllZerosSHA + var ErrRefNotFound = errors.New("git ref not found") + func IsNotAGitRepository(err error) bool + type AlertDeletion struct + CRDIdentifier string + type Deletion struct + Identifier string + Kind string + Path string + PrometheusAlerts []asset.PrometheusAlertName + SpamFilterUsesOrigin bool + type DeletionPlan struct + AlertsByName []AlertDeletion + ByIdentifier []Deletion + NoIdentifier []string + func Diff(before, after Snapshot) DeletionPlan + func (p DeletionPlan) IsEmpty() bool + type IdentifierKey struct + Identifier string + Kind string + type NoIdentifierDoc struct + FilePath string + Kind string + type RefState string + const RefAllZeros + const RefEmpty + const RefResolvedAncestor + const RefResolvedNonAncestor + const RefUnresolvable + type Repo struct + Dir string + func (r Repo) ClassifyRef(ctx context.Context, ref string) (state RefState, resolvedSHA string, err error) + func (r Repo) ExplainUnresolvableRef(ctx context.Context, ref string) string + func (r Repo) HasSkipWorktreeFiles(ctx context.Context, scope string) (bool, error) + func (r Repo) IsAncestor(ctx context.Context, ancestor, descendant string) (bool, error) + func (r Repo) IsTreeAtRef(ctx context.Context, ref, path string) (bool, error) + func (r Repo) ListYAMLFilesAtRef(ctx context.Context, ref, scope string) ([]string, error) + func (r Repo) ReadFileAtRef(ctx context.Context, ref, path string) ([]byte, error) + func (r Repo) Root(ctx context.Context) (string, error) + type Snapshot struct + Identifiers map[IdentifierKey]string + NoIdentifier map[string]NoIdentifierDoc + Paths map[string]bool + PrometheusAlertsByIdentifier map[string][]asset.PrometheusAlertName + PrometheusRecordingRoleByIdentifier map[string]bool + RawContent map[string][]byte + SpamFilterUsesOriginByIdentifier map[string]bool + func BuildSnapshotFromDisk(ctx context.Context, scope, repoRoot string) (Snapshot, error) + func BuildSnapshotFromRef(ctx context.Context, repo Repo, ref, scope string) (Snapshot, error)