repositorycheck

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package repositorycheck owns policy-free ordered aggregation of repository check results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasErrors

func HasErrors(result checkresult.Result) bool

HasErrors reports whether owner-classified results contain Error findings.

func SplitWarnings

func SplitWarnings(result checkresult.Result) (withoutWarnings, warnings checkresult.Result, err error)

SplitWarnings separates a completed owner result for explicitly different aggregate destinations without deriving a rank from evidence.

Types

type Inputs

type Inputs struct {
	Tracking             Slot
	ProducerResults      []Slot
	PlanDiagnostics      Slot
	PlanArtifactErrors   Slot
	OrdinaryAdvisories   Slot
	TrackingInformation  Slot
	DeferredPlanWarnings Slot
}

Inputs names the established working-check destinations. Callers place each completed owner result in its semantic slot before aggregation.

type Presentation

type Presentation struct {
	Errors      []presentation.Record
	Warnings    []presentation.Record
	Information []presentation.Record
}

Presentation is the explicit ranked projection of owner-classified results. Its fields preserve deterministic append order without recovering meaning from category labels.

func Present

func Present(result checkresult.Result, check string) (Presentation, error)

Present projects one owner-classified result using its explicitly supplied check label. Rank, not evidence spelling, selects the destination.

func PresentEvidence

func PresentEvidence(result checkresult.Result, check string) (Presentation, error)

PresentEvidence is Present for a destination whose established output includes producer evidence before its detail.

func (Presentation) Append

func (p Presentation) Append(other Presentation) Presentation

Append preserves ordinary evidence multiplicity and deterministic category order.

type Report

type Report struct {
	Drift               []manifest.Drift
	Warnings            []string
	Information         []string
	TrackingInformation []string
	PlanWarnings        []string
	Result              checkresult.Result
	// DirectResult is the explicitly placed direct-drift projection. Aggregate
	// advisories remain in Result but never appear in a direct child.
	DirectResult checkresult.Result

	Notes         []string
	TrackingNotes []string
	PlanNotes     []string
	// contains filtered or unexported fields
}

Report preserves the existing repository-check compatibility projections.

func Compose

func Compose(input Inputs) (Report, error)

Compose aggregates completed owner results in their explicit established order. It does not select result destinations from evidence spelling.

func (Report) AggregateAdvisoryResult

func (r Report) AggregateAdvisoryResult() checkresult.Result

AggregateAdvisoryResult returns the typed non-plan Warning and Information partition.

func (Report) DeferredPlanWarningResult

func (r Report) DeferredPlanWarningResult() checkresult.Result

DeferredPlanWarningResult returns the typed plan Warning partition.

func (Report) TrackingInformationResult

func (r Report) TrackingInformationResult() checkresult.Result

TrackingInformationResult returns the typed aggregate tracking Information partition.

type Slot

type Slot struct {
	Result                    checkresult.Result
	IncludeInformationInDrift bool
}

Slot supplies one completed owner result and whether its unranked information contributes to the legacy drift projection.

Jump to

Keyboard shortcuts

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