cfg

package
v0.0.0-...-1cea3d8 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WrapperScript = "WrapperScript"
	Alias         = "Alias"
)

Values for ToolType

View Source
const (
	Fixed    = "Fixed"
	FromFile = "FromFile"
)

Values for ImageTagType

View Source
const (
	DoNotSpecify = "DoNotSpecify"
	ReuseName    = "ReuseName"
)

Values for CommandType

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandConfig

type CommandConfig struct {
	Type CommandType
	// Following keys only when Type=ReuseName
	Folder string
}

type CommandType

type CommandType string

CommandType determines how to infer the executable name for the container

func (CommandType) IsDoNotSpecify

func (commandType CommandType) IsDoNotSpecify() bool

func (CommandType) IsReuseName

func (commandType CommandType) IsReuseName() bool

type Config

type Config struct {
	OutputDir    string
	TemplateFile string
	Engine       string
	Tools        map[string]ToolConfig
}

Config represents the whole config file

func (Config) ApplyToolDefaults

func (config Config) ApplyToolDefaults()

type EnvConfig

type EnvConfig struct {
	Name  string
	Value string
}

type ImageTagConfig

type ImageTagConfig struct {
	Type ImageTagType
	// Following keys only when Type=Fixed
	Value string
	// Following keys only when Type=FromFile
	File     string
	Sed      []string
	Fallback string
}

type ImageTagType

type ImageTagType string

ImageTagType determines how the container image tag is determined

func (ImageTagType) IsFixed

func (imageTagType ImageTagType) IsFixed() bool

func (ImageTagType) IsFromFile

func (imageTagType ImageTagType) IsFromFile() bool

type MountConfig

type MountConfig struct {
	Source string
	Target string
}

type ToolConfig

type ToolConfig struct {
	Type ToolType

	// Following keys only when Type=WrapperScript
	ImageName    string
	ImageTag     ImageTagConfig
	WorkDir      string
	HomeDir      string
	Command      CommandConfig
	Mounts       []MountConfig
	Env          []EnvConfig
	NetworkMode  string
	CustomScript string

	// Following keys only when Type=Alias
	AliasFor      string
	ForceTemplate bool
}

ToolConfig represents the configuration for a CLI tool in the config file

type ToolType

type ToolType string

ToolType determines which kind of tool should be generated

func (ToolType) IsAlias

func (toolType ToolType) IsAlias() bool

func (ToolType) IsWrapperScript

func (toolType ToolType) IsWrapperScript() bool

Jump to

Keyboard shortcuts

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