config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandDefinition

type CommandDefinition struct {
	RequireEnvVars  *bool
	IsTemplate      *bool
	Template        *string
	EntryPoint      *string
	Command         *string
	Name            *string
	UniqueNames     *bool
	Image           *string
	Network         *string
	EnvFile         *string
	IP              *string
	IsInteractive   *bool
	IsDetached      *bool
	IsDaemon        *bool // deprecated
	Volumes         *[]string
	Links           *[]string
	EnvVars         *[]string
	Ports           *[]string
	PortsFromParams *[]string
	AddGroups       *bool
	Impersonate     *bool
	WorkDir         *string
	RemoveContainer *bool
	ReplaceArgs     *[][]string
	AdditionalArgs  *[]string
}

CommandDefinition gives public access to the fields by accessor functions

func (*CommandDefinition) GetAddGroups

func (c *CommandDefinition) GetAddGroups() (bool, bool)

GetAddGroups returns value of IsInteractive and an boolean indicating if value is set.

func (*CommandDefinition) GetAdditionalArgs added in v0.2.0

func (c *CommandDefinition) GetAdditionalArgs() ([]string, bool)

GetAdditionalArgs returns value of AdditionalArgs and an boolean indicating if value is set.

func (*CommandDefinition) GetCommand added in v0.2.0

func (c *CommandDefinition) GetCommand() (string, bool)

getCommand returns value of Command (CMD) and an boolean indicating if value is set.

func (*CommandDefinition) GetEntryPoint

func (c *CommandDefinition) GetEntryPoint() (string, bool)

GetEntryPoint returns entrypoint and an boolean indicating if value is set.

func (*CommandDefinition) GetEnvFile added in v0.3.0

func (c *CommandDefinition) GetEnvFile() (string, bool)

GetEnvFile returns value of EnvFile and an boolean indicating if value is set.

func (*CommandDefinition) GetEnvVars

func (c *CommandDefinition) GetEnvVars() ([]string, bool)

GetEnvVars returns value of EnvVars and an boolean indicating if value is set.

func (*CommandDefinition) GetIP added in v0.5.1

func (c *CommandDefinition) GetIP() (string, bool)

GetIP returns value of Ip and an boolean indicating if value is set.

func (*CommandDefinition) GetImage

func (c *CommandDefinition) GetImage() (string, bool)

GetImage returns value of Image and an boolean indicating if value is set.

func (*CommandDefinition) GetImpersonate

func (c *CommandDefinition) GetImpersonate() (bool, bool)

GetImpersonate returns value of Impersonate and an boolean indicating if value is set.

func (*CommandDefinition) GetIsDetached added in v0.5.2

func (c *CommandDefinition) GetIsDetached() (bool, bool)

GetIsDetached returns value of GetIsDetached and an boolean indicating if value is set.

func (*CommandDefinition) GetIsInteractive

func (c *CommandDefinition) GetIsInteractive() (bool, bool)

GetIsInteractive returns value of IsInteractive and an boolean indicating if value is set.

func (*CommandDefinition) GetIsTemplate

func (c *CommandDefinition) GetIsTemplate() (bool, bool)

GetIsTemplate returns value of IsTemplate and an boolean indicating if value is set.

func (c *CommandDefinition) GetLinks() ([]string, bool)

GetLinks returns value of Links and an boolean indicating if value is set.

func (*CommandDefinition) GetName

func (c *CommandDefinition) GetName() (string, bool)

GetName returns value of Name and an boolean indicating if value is set.

func (*CommandDefinition) GetNetwork

func (c *CommandDefinition) GetNetwork() (string, bool)

GetNetwork returns value of Network and an boolean indicating if value is set.

func (*CommandDefinition) GetPorts

func (c *CommandDefinition) GetPorts() ([]string, bool)

GetPorts returns value of Ports and an boolean indicating if value is set.

func (*CommandDefinition) GetPortsFromParams added in v0.5.0

func (c *CommandDefinition) GetPortsFromParams() ([]string, bool)

GetPortsFromParams returns value of Ports and an boolean indicating if value is set.

func (*CommandDefinition) GetRemoveContainer

func (c *CommandDefinition) GetRemoveContainer() (bool, bool)

GetRemoveContainer returns value of RemoveContainer and an boolean indicating if value is set.

func (*CommandDefinition) GetReplaceArgs added in v0.2.0

func (c *CommandDefinition) GetReplaceArgs() ([][]string, bool)

GetReplaceArgs returns value of ReplaceArgs and an boolean indicating if value is set.

func (*CommandDefinition) GetRequireEnvVars added in v0.2.0

func (c *CommandDefinition) GetRequireEnvVars() (bool, bool)

GetRequireEnvVars returns value of RequireEnvVars and an boolean indicating if value is set.

func (*CommandDefinition) GetTemplate

func (c *CommandDefinition) GetTemplate() (string, bool)

GetTemplate returns value of Template and an boolean indicating if value is set.

func (*CommandDefinition) GetUniqueNames added in v0.2.0

func (c *CommandDefinition) GetUniqueNames() (bool, bool)

GetUniqueNames returns value of UniqueNames and an boolean indicating if value is set.

func (*CommandDefinition) GetVolumes

func (c *CommandDefinition) GetVolumes() ([]string, bool)

GetVolumes returns value of Volumes and an boolean indicating if value is set.

func (*CommandDefinition) GetWorkDir

func (c *CommandDefinition) GetWorkDir() (string, bool)

GetWorkDir returns value of Impersonate and an boolean indicating if value is set.

func (*CommandDefinition) HasName

func (c *CommandDefinition) HasName() bool

HasName indicates if the command definition has Name

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 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

type Loader added in v0.4.0

type Loader interface {
	Load() *Configuration
}

Loader is able to locate and load configuration from a config file

func NewLoader added in v0.2.0

func NewLoader() Loader

NewLoader returns a new config loader

Jump to

Keyboard shortcuts

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