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" // MultiArch is the architecture name a package uses when it targets more than one architecture. MultiArch = "multi" // 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" // ValuesDir is the directory inside a package that holds its values files and their schema. ValuesDir = "values" // ValuesSchema is the name the values schema is stored under inside ValuesDir. ValuesSchema = "values.schema.json" )
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 ( // OutputFormatJSON json output format OutputFormatJSON = "json" // OutputFormatYAML yaml output format OutputFormatYAML = "yaml" // OutputFormatTable table output format OutputFormatTable = "table" )
View Source
const ( // RootFlagLogLevelTrace trace log level RootFlagLogLevelTrace = "trace" // RootFlagLogLevelDebug debug log level RootFlagLogLevelDebug = "debug" // RootFlagLogLevelInfo info log level RootFlagLogLevelInfo = "info" // RootFlagLogLevelWarn warn log level RootFlagLogLevelWarn = "warn" // RootFlagLogLevelError error log level RootFlagLogLevelError = "error" )
View Source
const ( // RootFlagLogFormatConsole console log format RootFlagLogFormatConsole = "console" // RootFlagLogFormatJSON json log format RootFlagLogFormatJSON = "json" // RootFlagLogFormatDev dev log format RootFlagLogFormatDev = "dev" )
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.
View Source
const (
// TimeFormat is the time.Time layout used for timestamps embedded in generated log file names.
TimeFormat = "2006.01.02-15.04.05.00"
)
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) )
View Source
var ( // Timestamp is the timestamp for the reproduciable tarball logic Timestamp = time.Unix(0, 0).UTC() )
Functions ¶
func GetAbsCachePath ¶
GetAbsCachePath gets the absolute cache path for images and git repos.
func GetAbsHomePath ¶
GetAbsHomePath replaces a leading ~ with the absolute path to the running user's home dir.
Only a bare "~" or a "~" followed by a path separator is expanded. The "~user/..." form a shell also understands is deliberately left alone: this resolves the home directory of the running user and nobody else's, so expanding "~other/key" would produce "/home/me/other/key" -- a path that may well exist and hold the wrong file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.