oci

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0 Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ArtifactType = "application/vnd.dev-alchemy.vm-build.v1"

	MediaTypeArtifact   = "application/vnd.dev-alchemy.vm-build.artifact.v1"
	MediaTypeQCOW2      = "application/vnd.dev-alchemy.vm-build.qcow2.v1"
	MediaTypeVagrantBox = "application/vnd.dev-alchemy.vm-build.vagrant-box.v1"

	AnnotationVMOS                   = "dev.alchemy.vm.os"
	AnnotationVMType                 = "dev.alchemy.vm.type"
	AnnotationVMArch                 = "dev.alchemy.vm.arch"
	AnnotationVMHostOS               = "dev.alchemy.vm.host_os"
	AnnotationVMVirtualizationEngine = "dev.alchemy.vm.virtualization_engine"
	AnnotationVMSlug                 = "dev.alchemy.vm.slug"
)
View Source
const PublishedUbuntuRepository = "ghcr.io/csautter/ubuntu-24"

PublishedUbuntuRepository holds the Ubuntu artifacts the Linux build workflow publishes from main (see ADR 0003). Released CLIs resolve references below it, so changing the repository or tag shape breaks them.

Variables

This section is empty.

Functions

func MediaTypeForPath

func MediaTypeForPath(path string) string

func PublishedUbuntuReference added in v0.22.0

func PublishedUbuntuReference(ubuntuType, arch string) string

PublishedUbuntuReference returns the published reference for an Ubuntu type and architecture.

Types

type ArtifactFile

type ArtifactFile struct {
	Name      string
	Path      string
	MediaType string
	Digest    string
	Size      int64
}

type ForeignArtifact

type ForeignArtifact struct {
	OS                             string
	UbuntuType                     string
	Arch                           string
	SourceHostOS                   alchemy_build.HostOsType
	SourceVirtualizationEngine     alchemy_build.VirtualizationEngine
	TargetHostOS                   alchemy_build.HostOsType
	TargetVirtualizationEngine     alchemy_build.VirtualizationEngine
	SourceHostOSAnnotation         string
	SourceVirtualizationAnnotation string
}

type ForeignArtifactConfirmation

type ForeignArtifactConfirmation func(context.Context, ForeignArtifact) (bool, error)

ForeignArtifactConfirmation decides whether a compatible artifact built for a different host OS may be pulled into the requested local artifact slot.

type PullOptions

type PullOptions struct {
	RegistryOptions
	Progress                  TransferProgress
	ConfirmForeignArtifactUse ForeignArtifactConfirmation
}

type PushOptions

type PushOptions struct {
	RegistryOptions
	Progress TransferProgress
}

type RegistryOptions

type RegistryOptions struct {
	PlainHTTP                bool
	InsecureSkipTLSVerify    bool
	CAFile                   string
	Username                 string
	Password                 string
	AccessToken              string
	RefreshToken             string
	DisableDockerCredentials bool
}

type TransferProgress

type TransferProgress interface {
	Start(totalBytes int64)
	Add(bytes int64)
	Done(success bool)
}

TransferProgress receives aggregate byte progress for OCI push and pull operations. Implementations must be safe for concurrent Add calls.

type TransferResult

type TransferResult struct {
	Reference string
	Digest    string
	MediaType string
	Size      int64
	Artifacts []ArtifactFile
}

type TransferStatus

type TransferStatus interface {
	Status(message string)
}

TransferStatus receives human-readable phase updates for work that happens before or after the byte transfer itself.

Jump to

Keyboard shortcuts

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