releasepublish

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicationInputSchema = 1
	MaximumTransportBytes  = int64(2_000_000_000)
	RoleCandidate          = "candidate"
	RoleEvidence           = "candidate-evidence"
)

Variables

This section is empty.

Functions

func ValidateEvidence

func ValidateEvidence(evidence CandidateEvidence, manifest releasecontract.ArtifactManifest, manifestDigest string) error

func VerifyPublicationDirectory

func VerifyPublicationDirectory(directory string, input PublicationInput, inputFilename string) error

func VerifyPublicationSources

func VerifyPublicationSources(candidateDirectory, evidencePath string, input PublicationInput) error

Types

type CandidateEvidence

type CandidateEvidence struct {
	SchemaVersion int `json:"schemaVersion"`
	releasecontract.Identity
	ArtifactManifestDigest    string `json:"artifactManifestDigest"`
	SignedGuestManifestDigest string `json:"signedGuestManifestDigest"`
	Architecture              string `json:"architecture"`
	RunnerEnvironment         string `json:"runnerEnvironment"`
	Result                    string `json:"result"`
}

func CandidateEvidenceFor

func CandidateEvidenceFor(manifest releasecontract.ArtifactManifest, manifestBytes []byte, runnerEnvironment string) (CandidateEvidence, error)

func DecodeCandidateEvidence

func DecodeCandidateEvidence(data []byte) (CandidateEvidence, error)

type Object

type Object struct {
	Coordinate string
	Digest     string
}

func Plan

func Plan(existing map[string]string, desired []Object) ([]Object, error)

Plan applies immutable retry semantics. Existing coordinates are accepted only when they already contain the exact desired digest.

type PublicationFile

type PublicationFile struct {
	Name   string `json:"name"`
	Digest string `json:"digest"`
	Size   int64  `json:"size"`
	Role   string `json:"role"`
}

type PublicationInput

type PublicationInput struct {
	SchemaVersion int `json:"schemaVersion"`
	releasecontract.Identity
	ArtifactManifestDigest string            `json:"artifactManifestDigest"`
	Files                  []PublicationFile `json:"files"`
}

PublicationInput is the private draft-Release transport contract. It binds every locally built candidate byte and the pre-publication KVM evidence.

func BuildPublicationInput

func BuildPublicationInput(candidateDirectory, evidencePath string) (PublicationInput, error)

func DecodePublicationInput

func DecodePublicationInput(data []byte) (PublicationInput, error)

func (PublicationInput) Validate

func (input PublicationInput) Validate() error

Jump to

Keyboard shortcuts

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