Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SectionUnit      = "Unit"
	SectionService   = "Service"
	SectionInstall   = "Install"
	SectionContainer = "Container"
	SectionNetwork   = "Network"
	SectionVolume    = "Volume"
	SectionImage     = "Image"
	SectionBuild     = "Build"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SelinuxContext         bool
	FilePrefix             string
	DefaultNetwork         bool
	PortOffset             int
	ProjectName            string
	Labels                 map[string]string
	AutoUpdate             bool
	InstallSection         bool
	NetworkAliases         bool
	ServiceName            bool
	PodmanVersion          Version
	Warnings               []Warning
	ImageRetry             int
	ImageRetryDelay        int
	WorkingDirectory       string
	SecretsDir             string
	DryRun                 bool
	BuildCacheDir          string
	NormalizeDockerfile    bool
	SkipImageNormalization bool
	SystemdSpecifiers      bool
	SharedVolumes          map[string]bool
	Info                   func(string)
	PatchedDockerfiles     map[string]string
	ExternalNetworks       map[string]string
	ExternalVolumes        map[string]string
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Warn

func (c *Config) Warn(w Warning)

type Directive

type Directive struct {
	Key    string
	Values []string
}

type Option

type Option func(*Config)

func WithAutoUpdate

func WithAutoUpdate() Option

func WithBuildCacheDir

func WithBuildCacheDir(path string) Option

func WithDockerfileNormalization

func WithDockerfileNormalization() Option

func WithDryRun

func WithDryRun() Option

func WithImageRetry

func WithImageRetry(n int) Option

func WithImageRetryDelay

func WithImageRetryDelay(seconds int) Option

func WithInfo

func WithInfo(fn func(string)) Option

func WithLabels

func WithLabels(labels map[string]string) Option

func WithPodmanVersion

func WithPodmanVersion(v Version) Option

func WithPortOffset

func WithPortOffset(offset int) Option

func WithPrefix

func WithPrefix(prefix string) Option

func WithProjectName

func WithProjectName(name string) Option

func WithSecretsDirectory

func WithSecretsDirectory(path string) Option

func WithSystemdSpecifiers added in v0.4.1

func WithSystemdSpecifiers() Option

func WithWorkingDirectory

func WithWorkingDirectory(path string) Option

func WithoutDefaultNetwork

func WithoutDefaultNetwork() Option

func WithoutImageNormalization added in v0.4.1

func WithoutImageNormalization() Option

func WithoutInstallSection

func WithoutInstallSection() Option

func WithoutNetworkAliases

func WithoutNetworkAliases() Option

func WithoutPrefix

func WithoutPrefix() Option

func WithoutSELinux

func WithoutSELinux() Option

func WithoutServiceName added in v0.3.5

func WithoutServiceName() Option

type QuadletUnit

type QuadletUnit struct {
	Type     UnitType
	Name     string
	Sections []Section
}

type Section

type Section struct {
	Name       string
	Directives []Directive
}

type UnitType

type UnitType string
const (
	UnitContainer UnitType = "container"
	UnitNetwork   UnitType = "network"
	UnitVolume    UnitType = "volume"
	UnitImage     UnitType = "image"
	UnitBuild     UnitType = "build"
)

type Version

type Version struct {
	Major, Minor, Patch int
}

func ParseVersion

func ParseVersion(s string) (Version, error)

func (Version) AtLeast

func (v Version) AtLeast(major, minor int) bool

type Warning

type Warning struct {
	Level   WarningLevel
	Service string
	Field   string
	Message string
	Since   string
}

type WarningLevel

type WarningLevel int
const (
	WarningSkipped WarningLevel = iota
	WarningDegraded
	WarningFatal
)

Jump to

Keyboard shortcuts

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