options

package
v1.2.29 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 4 modules, 3 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

This section is empty.

Variables

View Source
var Default = Options{
	Arch:            types.ParseArchitecture(runtime.GOARCH),
	SourceDateEpoch: time.Unix(0, 0).UTC(),
	Auth:            auth.DefaultAuthenticators,
	SharedCache:     apk.NewCache(false),
	SizeLimits:      DefaultSizeLimits(),
}

Functions

This section is empty.

Types

type Auth added in v0.14.8

type Auth struct{ User, Pass string }

type Options

type Options struct {
	WithVCS bool `json:"withVCS,omitempty"`
	// ImageConfigFile might, but does not have to be a filename. It might be any abstract configuration identifier.
	ImageConfigFile string `json:"imageConfigFile,omitempty"`
	// ImageConfigChecksum (when set) allows to detect mismatch between configuration and the lockfile.
	ImageConfigChecksum     string                `json:"configChecksum,omitempty"`
	TarballPath             string                `json:"tarballPath,omitempty"`
	Tags                    []string              `json:"tags,omitempty"`
	SourceDateEpoch         time.Time             `json:"sourceDateEpoch,omitempty"`
	SBOMPath                string                `json:"sbomPath,omitempty"`
	SBOMGenerators          []generator.Generator `json:"-"`
	ExtraKeyFiles           []string              `json:"extraKeyFiles,omitempty"`
	ExtraBuildRepos         []string              `json:"extraBuildRepos,omitempty"`
	ExtraRepos              []string              `json:"extraRepos,omitempty"`
	ExtraPackages           []string              `json:"extraPackages,omitempty"`
	Arch                    types.Architecture    `json:"arch,omitempty"`
	TempDirPath             string                `json:"tempDirPath,omitempty"`
	PackageVersionTag       string                `json:"packageVersionTag,omitempty"`
	PackageVersionTagStem   bool                  `json:"packageVersionTagStem,omitempty"`
	PackageVersionTagPrefix string                `json:"packageVersionTagPrefix,omitempty"`
	TagSuffix               string                `json:"tagSuffix,omitempty"`
	Local                   bool                  `json:"local,omitempty"`
	CacheDir                string                `json:"cacheDir,omitempty"`
	Offline                 bool                  `json:"offline,omitempty"`
	SharedCache             *apk.Cache            `json:"-"`
	Lockfile                string                `json:"lockfile,omitempty"`
	Auth                    auth.Authenticator    `json:"-"`
	IncludePaths            []string              `json:"includePaths,omitempty"`
	IgnoreSignatures        bool                  `json:"ignoreSignatures,omitempty"`
	Transport               http.RoundTripper     `json:"-"`
	PackageGetter           apk.PackageGetter     `json:"-"`
	SizeLimits              SizeLimits            `json:"sizeLimits,omitempty"`
}

func (Options) TarballFileName added in v0.5.0

func (o Options) TarballFileName() string

TarballFileName returns a deterministic filename for the layer taball

func (*Options) TempDir added in v0.5.0

func (o *Options) TempDir() string

Tempdir returns the temporary directory where apko will create the layer blobs

type SizeLimits added in v1.1.0

type SizeLimits struct {
	// APKIndexDecompressedMaxSize is the maximum decompressed size for APKINDEX archives (default: 300 MB).
	// This protects against gzip bombs.
	APKIndexDecompressedMaxSize int64 `json:"apkIndexDecompressedMaxSize,omitempty"`
	// APKControlMaxSize is the maximum decompressed size for APK control sections (default: 10 MB).
	APKControlMaxSize int64 `json:"apkControlMaxSize,omitempty"`
	// APKDataMaxSize is the maximum decompressed size for APK data sections (default: ~17 GB).
	// This protects against gzip bombs.
	APKDataMaxSize int64 `json:"apkDataMaxSize,omitempty"`
	// HTTPResponseMaxSize is the maximum size for HTTP responses (default: ~9 GB).
	HTTPResponseMaxSize int64 `json:"httpResponseMaxSize,omitempty"`
}

SizeLimits configures maximum sizes for various operations to prevent unbounded reads. A value of 0 means use the default, and a value of -1 means no limit.

func DefaultSizeLimits added in v1.1.0

func DefaultSizeLimits() SizeLimits

DefaultSizeLimits returns SizeLimits with sensible default values.

Jump to

Keyboard shortcuts

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