get

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = "1.1"

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 EvidenceAttachment added in v0.9.0

type EvidenceAttachment struct {
	Name         string `json:"name"`
	Sha256       string `json:"sha256"`
	Type         string `json:"type,omitempty"`
	DownloadPath string `json:"downloadPath"`
}

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"`
	Attachments   []EvidenceAttachment `json:"attachments,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