Documentation
¶
Index ¶
- func GetCacheDir(mntPrefix string) string
- func GetKeyringInfo(preset string) (keyURL, keyPath string, err error)
- func GetOutputTarPath(mntPrefix string) string
- type ApkoBuilder
- func (b *ApkoBuilder) BuildCommand() ([]string, error)
- func (b *ApkoBuilder) WithAlpineKeyring() *ApkoBuilder
- func (b *ApkoBuilder) WithArchitecture(arch string) *ApkoBuilder
- func (b *ApkoBuilder) WithBuildArch(arch string) *ApkoBuilder
- func (b *ApkoBuilder) WithBuildContext(dir string) *ApkoBuilder
- func (b *ApkoBuilder) WithCacheDir(cacheDir string) *ApkoBuilder
- func (b *ApkoBuilder) WithConfigFile(configFile string) *ApkoBuilder
- func (b *ApkoBuilder) WithDebug() *ApkoBuilder
- func (b *ApkoBuilder) WithExtraArg(arg string) *ApkoBuilder
- func (b *ApkoBuilder) WithKeyring(keyringPath string) *ApkoBuilder
- func (b *ApkoBuilder) WithKeyringAppendPlaintext(keyring string) *ApkoBuilder
- func (b *ApkoBuilder) WithNoNetwork() *ApkoBuilder
- func (b *ApkoBuilder) WithOutputImage(outputImage string) *ApkoBuilder
- func (b *ApkoBuilder) WithOutputTarball(outputTarball string) *ApkoBuilder
- func (b *ApkoBuilder) WithRepositoryAppend(repo string) *ApkoBuilder
- func (b *ApkoBuilder) WithTimestamp(timestamp string) *ApkoBuilder
- func (b *ApkoBuilder) WithWolfiKeyring() *ApkoBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCacheDir ¶
GetCacheDir returns the APKO cache directory path. It takes a string parameter 'mntPrefix' which is the mount prefix. It returns the full path to the cache directory.
func GetKeyringInfo ¶
GetKeyringInfo returns the keyring information based on the preset. It takes a string parameter 'preset' which specifies the keyring preset ("alpine" or "wolfi"). It returns the key URL, key path, and an error if the preset is unsupported.
func GetOutputTarPath ¶
GetOutputTarPath returns the APKO output tar file path. It takes a string parameter 'mntPrefix' which is the mount prefix. It returns the full path to the output tar file.
Types ¶
type ApkoBuilder ¶
type ApkoBuilder struct {
// contains filtered or unexported fields
}
ApkoBuilder represents a builder for APKO commands
func NewApkoBuilder ¶
func NewApkoBuilder() *ApkoBuilder
NewApkoBuilder creates a new ApkoBuilder with default settings. It initializes the ApkoBuilder with default architectures "x86_64" and "aarch64".
func (*ApkoBuilder) BuildCommand ¶
func (b *ApkoBuilder) BuildCommand() ([]string, error)
BuildCommand generates the APKO build command based on the current configuration of the ApkoBuilder. It returns a slice of strings representing the command and an error if any required fields are missing.
func (*ApkoBuilder) WithAlpineKeyring ¶
func (b *ApkoBuilder) WithAlpineKeyring() *ApkoBuilder
WithAlpineKeyring adds the Alpine keyring to the APKO build. It sets the alpineKeyring field to true. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithArchitecture ¶
func (b *ApkoBuilder) WithArchitecture(arch string) *ApkoBuilder
WithArchitecture adds an architecture to the APKO build. It takes a string parameter 'arch' which is the architecture to be added. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithBuildArch ¶
func (b *ApkoBuilder) WithBuildArch(arch string) *ApkoBuilder
WithBuildArch sets the build architecture
func (*ApkoBuilder) WithBuildContext ¶
func (b *ApkoBuilder) WithBuildContext(dir string) *ApkoBuilder
WithBuildContext sets the build context directory
func (*ApkoBuilder) WithCacheDir ¶
func (b *ApkoBuilder) WithCacheDir(cacheDir string) *ApkoBuilder
WithCacheDir sets the cache directory for the APKO build. It takes a string parameter 'cacheDir' which is the path to the cache directory. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithConfigFile ¶
func (b *ApkoBuilder) WithConfigFile(configFile string) *ApkoBuilder
WithConfigFile sets the configuration file for the APKO build. It takes a string parameter 'configFile' which is the path to the configuration file. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithDebug ¶
func (b *ApkoBuilder) WithDebug() *ApkoBuilder
WithDebug enables debug output
func (*ApkoBuilder) WithExtraArg ¶
func (b *ApkoBuilder) WithExtraArg(arg string) *ApkoBuilder
WithExtraArg adds an extra argument to the APKO build command. It takes a string parameter 'arg' which is the extra argument to be added. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithKeyring ¶
func (b *ApkoBuilder) WithKeyring(keyringPath string) *ApkoBuilder
WithKeyring adds a keyring path to the APKO build. It takes a string parameter 'keyringPath' which is the path to the keyring file. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithKeyringAppendPlaintext ¶
func (b *ApkoBuilder) WithKeyringAppendPlaintext(keyring string) *ApkoBuilder
WithKeyringAppendPlaintext appends a plaintext keyring
func (*ApkoBuilder) WithNoNetwork ¶
func (b *ApkoBuilder) WithNoNetwork() *ApkoBuilder
WithNoNetwork disables network access during the build
func (*ApkoBuilder) WithOutputImage ¶
func (b *ApkoBuilder) WithOutputImage(outputImage string) *ApkoBuilder
WithOutputImage sets the output image name for the APKO build. It takes a string parameter 'outputImage' which is the name of the output image. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithOutputTarball ¶
func (b *ApkoBuilder) WithOutputTarball(outputTarball string) *ApkoBuilder
WithOutputTarball sets the output tarball path for the APKO build. It takes a string parameter 'outputTarball' which is the path to the output tarball. It returns the updated ApkoBuilder instance.
func (*ApkoBuilder) WithRepositoryAppend ¶
func (b *ApkoBuilder) WithRepositoryAppend(repo string) *ApkoBuilder
WithRepositoryAppend appends a repository to use for the build
func (*ApkoBuilder) WithTimestamp ¶
func (b *ApkoBuilder) WithTimestamp(timestamp string) *ApkoBuilder
WithTimestamp sets the timestamp for the build
func (*ApkoBuilder) WithWolfiKeyring ¶
func (b *ApkoBuilder) WithWolfiKeyring() *ApkoBuilder
WithWolfiKeyring adds the Wolfi keyring to the APKO build. It sets the wolfiKeyring field to true. It returns the updated ApkoBuilder instance.