config

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config is a holder of commonly used multiple times

Index

Constants

View Source
const (
	// UnsetCLIVersion is an unset version for when building locally
	UnsetCLIVersion = "unset-development-only"
	// UnsetCLICommit is the initial commit of this repo, short, for when building locally
	UnsetCLICommit = "7918478d"
)
View Source
const (
	// FilesDir string key
	FilesDir = "files"
	// ImagesDir string key
	ImagesDir = "images"
	// OSDir string key
	OSDir = "os"
	// SelectorAPT string key
	SelectorAPT = "apt"
	// SelectorBIN string key
	SelectorBIN = "binary"
	// SelectorRPM string key
	SelectorRPM = "rpm"
	// TarBallDir string key
	TarBallDir = "tar"
)
View Source
const (
	// EngineAudit string key
	EngineAudit = "audit"
	// EngineConfig string key
	EngineConfig = "config"
	// EngineManifest string key
	EngineManifest = "manifest"
	// EnginePSS string key
	EnginePSS = "podSecurity"
	// EngineTLS string key
	EngineTLS = "tls"
)
View Source
const (
	DistroYAML = "distro.yaml"
	Bundle     = "distro.bundle.sig"
	Checksums  = "checksums.txt"
	IndexJSON  = "index.json"
	OCILayout  = "oci-layout"
)

Constants used in the default package layout.

Variables

View Source
var (
	// CLIVersion is the version of the cli
	CLIVersion = UnsetCLIVersion
	// CLICommit is the commit this build was created at
	CLICommit = UnsetCLICommit
	// CLIArch is the computer architecture of the device executing the CLI commands
	CLIArch string
	// CommonOptions is the distro config
	CommonOptions types.DistroConfig
	// DefaultCachePath the default cache directory
	DefaultCachePath = filepath.Join("~", ".cargoship-cache")
)
View Source
var (
	// IndexPath is the path to the index.json file
	IndexPath = filepath.Join(ImagesDir, IndexJSON)
	// ImagesBlobsDir is the path to the directory containing the image blobs in the OCI package.
	ImagesBlobsDir = filepath.Join(ImagesDir, "blobs", "sha256")
	// OCILayoutPath is the path to the oci-layout file
	OCILayoutPath = filepath.Join(ImagesDir, OCILayout)
)

Functions

func GetAbsCachePath added in v0.4.0

func GetAbsCachePath() (string, error)

GetAbsCachePath gets the absolute cache path for images and git repos.

func GetAbsHomePath added in v0.3.0

func GetAbsHomePath(path string) (string, error)

GetAbsHomePath replaces ~ with the absolute path to a user's home dir

func GetArch added in v0.9.0

func GetArch(archs ...string) string

GetArch returns the arch based on a priority list with options for overriding.

Types

This section is empty.

Directories

Path Synopsis
Package lang holds the cli helping text
Package lang holds the cli helping text

Jump to

Keyboard shortcuts

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