utils

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvMapToStringSlice

func EnvMapToStringSlice(envMap map[string]string) []string

EnvMapToStringSlice converts a map[string]string to []string in "KEY=VALUE" format for docker-compose compatibility.

func ProcessArguments

func ProcessArguments(
	args []string,
	modelArgs []model.Argument,
	argOverrides map[string]string,
) []string

ProcessArguments processes model.Argument slices into []string args, allowing for overrides. It processes positional arguments first, then named arguments.

func ProcessEnvironmentVariables

func ProcessEnvironmentVariables(
	envVars []model.KeyValueInput,
	overrides map[string]string,
) (map[string]string, error)

ProcessEnvironmentVariables validates and processes environment variables into a map[string]string, allowing for overrides.

func ProcessHeaders

func ProcessHeaders(
	headers []model.KeyValueInput,
	headerOverrides map[string]string,
) (map[string]string, error)

ProcessHeaders validates and processes headers into a map[string]string, allowing for overrides.

Types

type RegistryConfig

type RegistryConfig struct {
	Image   string
	Command string
	IsOCI   bool // True for OCI registry type where image is ready to use (no build needed)
}

RegistryConfig holds the configuration for a registry type

func GetRegistryConfig

func GetRegistryConfig(
	packageInfo model.Package,
	args []string,
) (RegistryConfig, []string, error)

GetRegistryConfig returns the image and command configuration for a given registry type.

Jump to

Keyboard shortcuts

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