get

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = "1.0"

Variables

This section is empty.

Functions

func NewGetEvidenceCustom

func NewGetEvidenceCustom(serverDetails *config.ServerDetails, subjectRepoPath, format, outputFileName string, includePredicate bool) evidence.Command

func NewGetEvidenceReleaseBundle

func NewGetEvidenceReleaseBundle(serverDetails *config.ServerDetails,
	releaseBundle, releaseBundleVersion, project, format, outputFileName, artifactsLimit string, includePredicate bool) evidence.Command

func ReadTestDataFile

func ReadTestDataFile(filename string) (string, error)

ReadTestDataFile reads a test data file from the shared testdata directory.

Types

type ArtifactEvidence

type ArtifactEvidence struct {
	Evidence    EvidenceEntry `json:"evidence"`
	PackageType string        `json:"packageType"`
	RepoPath    string        `json:"subjectRepoPath"`
}

type BuildEvidence

type BuildEvidence struct {
	Evidence    EvidenceEntry `json:"evidence"`
	BuildName   string        `json:"buildName"`
	BuildNumber string        `json:"buildNumber"`
	StartedAt   string        `json:"startedAt"`
}

type CustomEvidenceOutput

type CustomEvidenceOutput struct {
	SchemaVersion string               `json:"schemaVersion"`
	Type          SubjectType          `json:"type"`
	Result        CustomEvidenceResult `json:"result"`
}

CustomEvidenceOutput represents the structured output format for custom evidence

type CustomEvidenceResult

type CustomEvidenceResult struct {
	RepoPath string          `json:"subjectRepoPath"`
	Evidence []EvidenceEntry `json:"evidence"`
}

type EvidenceEntry

type EvidenceEntry struct {
	PredicateSlug string         `json:"predicateSlug"`
	PredicateType string         `json:"predicateType,omitempty"`
	DownloadPath  string         `json:"downloadPath"`
	Verified      bool           `json:"verified"`
	SigningKey    map[string]any `json:"signingKey,omitempty"`
	Subject       map[string]any `json:"subject"`
	CreatedBy     string         `json:"createdBy"`
	CreatedAt     string         `json:"createdAt"`
	Predicate     map[string]any `json:"predicate,omitempty"`
}

type JsonlLine

type JsonlLine struct {
	SchemaVersion string      `json:"schemaVersion"`
	Type          SubjectType `json:"type"`
	Result        any         `json:"result"`
}

type ReleaseBundleOutput

type ReleaseBundleOutput struct {
	SchemaVersion string              `json:"schemaVersion"`
	Type          SubjectType         `json:"type"`
	Result        ReleaseBundleResult `json:"result"`
}

type ReleaseBundleResult

type ReleaseBundleResult struct {
	ReleaseBundle        string             `json:"releaseBundle"`
	ReleaseBundleVersion string             `json:"releaseBundleVersion"`
	Evidence             []EvidenceEntry    `json:"evidence"`
	Artifacts            []ArtifactEvidence `json:"artifacts,omitempty"`
	Builds               []BuildEvidence    `json:"builds,omitempty"`
}

type SubjectType

type SubjectType string // Types in GetEvidence output
const (
	ArtifactType      SubjectType = "artifact"
	BuildType         SubjectType = "build"
	ReleaseBundleType SubjectType = "release-bundle"
)

Jump to

Keyboard shortcuts

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