Documentation
¶
Overview ¶
Package image validates and models the V1 split Incus virtual-machine input.
Index ¶
- type Architecture
- type Artifact
- type ArtifactKind
- type OperatingSystem
- type Release
- type VMImage
- func (image VMImage) Architecture() Architecture
- func (image VMImage) Created() time.Time
- func (image VMImage) Disk() Artifact
- func (image VMImage) Fingerprint() (object.SHA256Digest, error)
- func (image VMImage) Metadata() Artifact
- func (image VMImage) OperatingSystem() OperatingSystem
- func (image VMImage) Release() Release
- func (image VMImage) Variant() Variant
- type Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Architecture ¶
type Architecture string
Architecture is a supported Incus and Simple Streams architecture identity.
const ( // ArchitectureAMD64 is the 64-bit x86 architecture. ArchitectureAMD64 Architecture = "amd64" // ArchitectureARM64 is the 64-bit Arm architecture. ArchitectureARM64 Architecture = "arm64" )
func (Architecture) String ¶
func (architecture Architecture) String() string
String returns the Simple Streams architecture value.
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact is one validated, reopenable local input and its content identities.
func (Artifact) Kind ¶
func (artifact Artifact) Kind() ArtifactKind
Kind returns the closed artifact class.
func (Artifact) SHA256 ¶
func (artifact Artifact) SHA256() object.SHA256Digest
SHA256 returns the artifact content identity.
type ArtifactKind ¶
type ArtifactKind string
ArtifactKind is a closed V1 artifact class.
const ( // ArtifactMetadata is the Incus metadata tarball. ArtifactMetadata ArtifactKind = "incus.tar.xz" // ArtifactDisk is the QCOW2 virtual-machine disk. ArtifactDisk ArtifactKind = "disk-kvm.img" )
func (ArtifactKind) String ¶
func (kind ArtifactKind) String() string
String returns the protocol file type for kind.
type OperatingSystem ¶
type OperatingSystem string
OperatingSystem is the non-empty operating-system catalog identity.
func (OperatingSystem) String ¶
func (name OperatingSystem) String() string
String returns the catalog operating-system value.
type VMImage ¶
type VMImage struct {
// contains filtered or unexported fields
}
VMImage structurally contains exactly the two artifacts supported by V1.
func (VMImage) Architecture ¶
func (image VMImage) Architecture() Architecture
Architecture returns the normalized Simple Streams architecture.
func (VMImage) Fingerprint ¶
func (image VMImage) Fingerprint() (object.SHA256Digest, error)
Fingerprint calculates the Incus metadata-first combined SHA-256 identity.
func (VMImage) OperatingSystem ¶
func (image VMImage) OperatingSystem() OperatingSystem
OperatingSystem returns the catalog operating-system identity.