config

package
v0.0.0-...-40fbbb1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverConfigFile

func DiscoverConfigFile() (string, error)

DiscoverConfigFile tries to find a config file in different locations: * current working directory * directory the executable is located in * filepath from an environment variable

Types

type CommandDefinition

type CommandDefinition struct {
	IsTemplate      *bool
	Template        *string
	EntryPoint      *string
	Name            *string
	Image           *string
	Network         *string
	IsInteractive   *bool
	Volumes         *[]string
	EnvVars         *[]string
	AddGroups       *bool
	Impersonate     *bool
	WorkDir         *string
	RemoveContainer *bool
}

CommandDefinition defines the configuration fields for a docker-proxy-command

func (*CommandDefinition) HasPropertyAddGroups

func (c *CommandDefinition) HasPropertyAddGroups() bool

HasPropertyAddGroups indicates if the command definition has the property AddGroups set

func (*CommandDefinition) HasPropertyEntryPoint

func (c *CommandDefinition) HasPropertyEntryPoint() bool

HasPropertyEntryPoint indicates if the command definition has the property EntryPoint set

func (*CommandDefinition) HasPropertyEnvVars

func (c *CommandDefinition) HasPropertyEnvVars() bool

HasPropertyEnvVars indicates if the command definition has the property EnvVars set

func (*CommandDefinition) HasPropertyImage

func (c *CommandDefinition) HasPropertyImage() bool

HasPropertyImage indicates if the command definition has the property Image set

func (*CommandDefinition) HasPropertyImpersonate

func (c *CommandDefinition) HasPropertyImpersonate() bool

HasPropertyImpersonate indicates if the command definition has the property Impersonate set

func (*CommandDefinition) HasPropertyIsInteractive

func (c *CommandDefinition) HasPropertyIsInteractive() bool

HasPropertyIsInteractive indicates if the command definition has the property IsInteractive set

func (*CommandDefinition) HasPropertyIsTemplate

func (c *CommandDefinition) HasPropertyIsTemplate() bool

HasPropertyIsTemplate indicates if the command definition has the property IsTemplate

func (*CommandDefinition) HasPropertyName

func (c *CommandDefinition) HasPropertyName() bool

HasPropertyName indicates if the command definition has the property Name set

func (*CommandDefinition) HasPropertyNetwork

func (c *CommandDefinition) HasPropertyNetwork() bool

HasPropertyNetwork indicates if the command definition has the property Network set

func (*CommandDefinition) HasPropertyRemoveContainer

func (c *CommandDefinition) HasPropertyRemoveContainer() bool

HasPropertyRemoveContainer indicates if the command definition has the property RemoveContainer set

func (*CommandDefinition) HasPropertyTemplate

func (c *CommandDefinition) HasPropertyTemplate() bool

HasPropertyTemplate indicates if the command definition has the property Template set

func (*CommandDefinition) HasPropertyVolumes

func (c *CommandDefinition) HasPropertyVolumes() bool

HasPropertyVolumes indicates if the command definition has the property Volumes set

func (*CommandDefinition) HasPropertyWorkDir

func (c *CommandDefinition) HasPropertyWorkDir() bool

HasPropertyWorkDir indicates if the command definition has the property WorkDir set

func (*CommandDefinition) HasTemplate

func (c *CommandDefinition) HasTemplate() bool

HasTemplate indicates if the command definition has a template set

type Configuration

type Configuration ConfigurationDefinition

Configuration is the data model for a configuration file

func Load

func Load() *Configuration

Load loads the configuration file.

func Parse

func Parse(filepath string) (*Configuration, error)

Parse parses a toml configuration file into Configuration data model

func (*Configuration) FindCommandByName

func (c *Configuration) FindCommandByName(commandName string) (*CommandDefinition, error)

FindCommandByName finds a command by the given name

func (*Configuration) GetConfigurationFilePath

func (c *Configuration) GetConfigurationFilePath() string

GetConfigurationFilePath returns the path the configuration was load from. this is for debugging purpose.

func (*Configuration) SetConfigurationFilePath

func (c *Configuration) SetConfigurationFilePath(configFilePath string)

SetConfigurationFilePath sets the filepath the configuration was load from. this is for debugging purpose.

type ConfigurationDefinition

type ConfigurationDefinition struct {
	Command []CommandDefinition
	Version string

	Logging bool
	// contains filtered or unexported fields
}

ConfigurationDefinition defines the fields/types of the configuration file

Jump to

Keyboard shortcuts

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