platform

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package platform defines canonical CPU architecture identifiers and validation helpers used by cargoship when targeting specific platforms in OCI workflows.

Index

Constants

View Source
const (
	// ArchAMD64 is the amd64 architecture.
	ArchAMD64 = api.ArchAMD64
	// ArchARM64 is the arm64 architecture.
	ArchARM64 = api.ArchARM64
	// ArchRISCV is the riscv architecture.
	ArchRISCV = api.ArchRISCV
)

These are the supported architectures.

Variables

View Source
var (
	// ErrUnknownArch is returned when a Arch is not one of the supported architectures.
	ErrUnknownArch = api.ErrUnknownArch
)

Functions

func ValidateArch

func ValidateArch(format Arch) error

ValidateArch checks if the given platform operating system architecture format is valid.

format: the Arch to validate. error: an error if the architecture format is invalid, otherwise nil.

Types

type Arch

type Arch = api.Arch

Arch names a CPU architecture an image volume can target. It aliases the API type so a package definition and an OCI platform cannot drift apart on what an architecture is.

Jump to

Keyboard shortcuts

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