platform

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 2 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

This section is empty.

Variables

View Source
var (
	// ErrUnknownArch is returned when a Arch is not one of the supported architectures.
	ErrUnknownArch = fmt.Errorf("invalid platform operating system architecture")
)

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 string

Arch names a CPU architecture an image volume can target.

const (
	// ArchAMD64 is the amd64 architecture.
	ArchAMD64 Arch = config.OSArchAMD64
	// ArchARM64 is the arm64 architecture.
	ArchARM64 Arch = config.OSArchARM64
	// ArchRISCV is the riscv architecture.
	ArchRISCV Arch = config.OSArchRISCV
)

These are the supported architectures.

Jump to

Keyboard shortcuts

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