Documentation
¶
Overview ¶
Package releasecontract defines the public, provider-neutral identity of a SecondBox release.
Index ¶
- Constants
- func ArtifactManifestLocation(version string) string
- func BinaryLocation(version, name, platform string) string
- func CompareVersions(left, right string) (int, error)
- func Digest(data []byte) string
- func InstallBootstrapLocation(version string) string
- func InstallerQualificationEvidenceLocation(version string) string
- func ParseTag(tag string) (string, error)
- func QualificationEvidenceLocation(version string) string
- func SourceFreeSuiteLocation(version string) string
- type ArtifactManifest
- type BinaryArtifact
- type BundledServiceImages
- type Identity
- type InstallerQualificationEvidence
- type MicroVMArtifact
- type OCIArtifact
- type OpenAPIArtifact
- type PlatformMatrix
- type ProtocolWindow
- type QualificationDeviceEvidence
- type QualificationEvidence
- type QualificationFilesystemEvidence
- type QualificationHostEvidence
- type Reference
- type SDKArtifact
- type SignedComponent
- type StandardBundleArtifact
- type StandardProfileIdentity
Constants ¶
const ( ArtifactManifestSchema = "secondbox.release/artifact-manifest/v5" QualificationEvidenceSchema = "secondbox.release/qualification-evidence/v1" InstallerQualificationEvidenceSchema = "secondbox.release/installer-qualification-evidence/v1" TypeScriptPackage = "@secondstack-ai/secondbox" GoModule = "github.com/SecondStack-AI/SecondBox" ControlPlaneImage = "ghcr.io/secondstack-ai/secondbox/control-plane" RunnerImage = "ghcr.io/secondstack-ai/secondbox/runner" MicroVMImage = "ghcr.io/secondstack-ai/secondbox/microvm-artifacts" InstallerToolsImage = "ghcr.io/secondstack-ai/secondbox/installer-tools" )
Variables ¶
This section is empty.
Functions ¶
func BinaryLocation ¶
func CompareVersions ¶ added in v0.6.0
CompareVersions orders two canonical release versions according to SemVer precedence. It rejects build metadata because release tags do not admit it.
func InstallBootstrapLocation ¶ added in v0.4.0
func InstallerQualificationEvidenceLocation ¶ added in v0.4.0
func QualificationEvidenceLocation ¶ added in v0.2.0
func SourceFreeSuiteLocation ¶
Types ¶
type ArtifactManifest ¶
type ArtifactManifest struct {
SchemaVersion string `json:"schemaVersion"`
Candidate bool `json:"candidate,omitempty"`
Identity
OpenAPI OpenAPIArtifact `json:"openapi"`
RunnerProtocol ProtocolWindow `json:"runnerProtocol"`
GuestProtocol ProtocolWindow `json:"guestProtocol"`
Platforms PlatformMatrix `json:"platforms"`
GoSDK SDKArtifact `json:"goSdk"`
TypeScriptSDK SDKArtifact `json:"typeScriptSdk"`
ControlPlane OCIArtifact `json:"controlPlane"`
Runner OCIArtifact `json:"runner"`
InstallerTools OCIArtifact `json:"installerTools"`
BundledServices BundledServiceImages `json:"bundledServices"`
InstallBootstrap Reference `json:"installBootstrap"`
MicroVM MicroVMArtifact `json:"microvm"`
Binaries []BinaryArtifact `json:"binaries"`
SBOMs []Reference `json:"sboms"`
ArtifactAttestations []Reference `json:"artifactAttestations,omitempty"`
SourceFreeSuite Reference `json:"sourceFreeSuite,omitempty"`
QualificationEvidence Reference `json:"qualificationEvidence"`
InstallerQualificationEvidence Reference `json:"installerQualificationEvidence"`
StandardBundles []StandardBundleArtifact `json:"standardBundles"`
}
ArtifactManifest contains immutable release artifact identity.
func DecodeArtifactManifest ¶
func DecodeArtifactManifest(data []byte) (ArtifactManifest, error)
func (ArtifactManifest) InstallerQualificationSubjectDigest ¶ added in v0.4.0
func (manifest ArtifactManifest) InstallerQualificationSubjectDigest() (string, error)
InstallerQualificationSubjectDigest identifies all public release contract fields except the installer-evidence reference itself. Omitting that one reference avoids a digest cycle while still binding qualification to the exact binaries, images, protocols, bundles, and other immutable release objects that the final manifest publishes.
func (ArtifactManifest) Validate ¶
func (manifest ArtifactManifest) Validate() error
type BinaryArtifact ¶
type BundledServiceImages ¶ added in v0.4.0
type BundledServiceImages struct {
Postgres string `json:"postgres"`
}
type Identity ¶
type Identity struct {
Version string `json:"version"`
Tag string `json:"tag"`
SourceCommit string `json:"sourceCommit"`
}
Identity is repeated on every independently inspectable release object.
type InstallerQualificationEvidence ¶ added in v0.4.0
type InstallerQualificationEvidence struct {
SchemaVersion string `json:"schemaVersion"`
SourceCommit string `json:"sourceCommit"`
RepositoryDirty bool `json:"repositoryDirty"`
Suite string `json:"suite"`
PassCount int64 `json:"passCount"`
WallClockSeconds int64 `json:"wallClockSeconds"`
Host QualificationHostEvidence `json:"host"`
ReleaseManifestDigest string `json:"releaseManifestDigest"`
FilesystemIdentity string `json:"filesystemIdentity"`
RebootPassed bool `json:"rebootPassed"`
QualifiedAt string `json:"qualifiedAt"`
}
func DecodeInstallerQualificationEvidence ¶ added in v0.4.0
func DecodeInstallerQualificationEvidence(data []byte) (InstallerQualificationEvidence, error)
func (InstallerQualificationEvidence) Validate ¶ added in v0.4.0
func (evidence InstallerQualificationEvidence) Validate() error
func (InstallerQualificationEvidence) ValidateForRelease ¶ added in v0.4.0
func (evidence InstallerQualificationEvidence) ValidateForRelease(sourceCommit, qualificationSubjectDigest string) error
type MicroVMArtifact ¶
type MicroVMArtifact struct {
Identity Identity `json:"identity"`
ImageReference string `json:"imageReference"`
SignedManifestDigest string `json:"signedManifestDigest"`
SigningKeyFingerprint string `json:"signingKeyFingerprint"`
RuntimeBundle SignedComponent `json:"runtimeBundle"`
ToolchainBundle SignedComponent `json:"toolchainBundle"`
}
type OCIArtifact ¶
type OpenAPIArtifact ¶
type PlatformMatrix ¶
type ProtocolWindow ¶
type QualificationDeviceEvidence ¶ added in v0.2.0
type QualificationEvidence ¶ added in v0.2.0
type QualificationEvidence struct {
SchemaVersion string `json:"schemaVersion"`
SourceCommit string `json:"sourceCommit"`
RepositoryDirty bool `json:"repositoryDirty"`
Suite string `json:"suite"`
PassCount int64 `json:"passCount"`
WallClockSeconds int64 `json:"wallClockSeconds"`
Host QualificationHostEvidence `json:"host"`
QualifiedAt string `json:"qualifiedAt"`
}
func DecodeQualificationEvidence ¶ added in v0.2.0
func DecodeQualificationEvidence(data []byte) (QualificationEvidence, error)
func (QualificationEvidence) Validate ¶ added in v0.2.0
func (evidence QualificationEvidence) Validate() error
func (QualificationEvidence) ValidateForRelease ¶ added in v0.2.0
func (evidence QualificationEvidence) ValidateForRelease(sourceCommit string) error
type QualificationFilesystemEvidence ¶ added in v0.2.0
type QualificationHostEvidence ¶ added in v0.2.0
type QualificationHostEvidence struct {
KVM QualificationDeviceEvidence `json:"kvm"`
TUN QualificationDeviceEvidence `json:"tun"`
WorkspaceFilesystem QualificationFilesystemEvidence `json:"workspaceFilesystem"`
}
type SDKArtifact ¶
type SignedComponent ¶ added in v0.1.3
type SignedComponent struct {
ArtifactID string `json:"artifactId"`
ManifestDigest string `json:"manifestDigest"`
MandatoryGuestFeatures []string `json:"mandatoryGuestFeatures"`
}
SignedComponent is one independently selected component bound by the signed top-level microVM manifest.
type StandardBundleArtifact ¶
type StandardBundleArtifact struct {
Identity Identity `json:"identity"`
Name string `json:"name"`
Document Reference `json:"document"`
Profiles []StandardProfileIdentity `json:"profiles"`
}