cmdparams

package
v0.0.0-...-7396d26 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTraefikLabels

func CreateTraefikLabels(params *docker.ContainerCommandParams)

CreateTraefikLabels creates Traefik labels based on the provided parameters.

func FromInputsToCmdParams

func FromInputsToCmdParams(inputs map[string]string, a *server.App) (docker.ContainerCommandParams, error)

FromInputsToCmdParams transforms the inputs map into a ContainerCommandParams struct

func FromPayloadStructToCmdParams

func FromPayloadStructToCmdParams(ppl *common.DeployPayload, a *server.App) (docker.ContainerCommandParams, error)

FromYAMLStructToCmdParams converts a YAMLContainerParams struct to a ContainerCommandParams struct

func FromYAMLStructToCmdParams

func FromYAMLStructToCmdParams(yamlParams YAMLContainerParams) (docker.ContainerCommandParams, error)

FromYAMLStructToCmdParams converts a YAMLContainerParams struct to a ContainerCommandParams struct

func ParseEnvironmentSlice

func ParseEnvironmentSlice(environmentStr string) []string

ParseEnvironmentSlice parses the environment variables string into a slice.

func ParsePortMappingsSlice

func ParsePortMappingsSlice(portMappingsStr string) ([]docker.PortMapping, error)

ParsePortMappingsSlice parses the port mappings string into a slice and a struct.

func ParseVolumeSlice

func ParseVolumeSlice(volumeStr string) []string

ParseVolumeSlice parses the volumes string into a slice.

Types

type YAMLContainerParams

type YAMLContainerParams struct {
	Name        string            `yaml:"Name"`
	Image       string            `yaml:"Image"`
	Hostname    string            `yaml:"Hostname"`
	Ports       []string          `yaml:"Ports"`
	Volumes     []string          `yaml:"Volumes"`
	Environment []string          `yaml:"Environment"`
	Labels      map[string]string `yaml:"Labels"`
	Network     []string          `yaml:"Network"`
	Restart     string            `yaml:"Restart"`
}

Jump to

Keyboard shortcuts

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