Documentation ¶
Index ¶
- func GetOrDefault(entity map[string]string, key string, defaultValue string) (val string)
- func GetProjectDirectory() string
- func GetProjectOrWorkingDirectory() string
- func GetPropertyConfigEntry(varName string) string
- func GetWorkingDirectory() string
- func InArray(val interface{}, array interface{}) (exists bool, index int)
- func SavePropertyConfig(cfg PropertyConfigurationFile) error
- func SavePropertyConfigFile(configFile string, cfg PropertyConfigurationFile) error
- func SetPropertyConfigEntry(varName string, varValue string)
- func UnsetPropertyConfigEntry(varName string)
- type CachingEntry
- type ConfigurationLoader
- type ProjectConfigrationFile
- type PropertyConfigurationFile
- type RunConfigurationEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrDefault ¶
*
- GetOrDefault gets the value or the specified default value if not found or empty
func GetProjectDirectory ¶
func GetProjectDirectory() string
*
- Get the project root directory by searching for the envcli config
func GetProjectOrWorkingDirectory ¶ added in v0.4.2
func GetProjectOrWorkingDirectory() string
*
- GetProjectOrWorkingDirectory returns either the project directory, if one can be found or the working directory
func SavePropertyConfig ¶
func SavePropertyConfig(cfg PropertyConfigurationFile) error
*
- Save the global config
func SavePropertyConfigFile ¶
func SavePropertyConfigFile(configFile string, cfg PropertyConfigurationFile) error
*
- Save the global config file
func UnsetPropertyConfigEntry ¶
func UnsetPropertyConfigEntry(varName string)
*
- Gets a property in the property config
Types ¶
type CachingEntry ¶
type ConfigurationLoader ¶
type ConfigurationLoader struct { }
*
- ConfigurationLoader contains all methods to load/save configuration files
type ProjectConfigrationFile ¶
type ProjectConfigrationFile struct {
Images []RunConfigurationEntry
}
*
- ProjectConfigrationFile is the schema for configuration files, that hold multiple command specifications
func LoadProjectConfig ¶
func LoadProjectConfig(configFile string) (ProjectConfigrationFile, error)
*
- Load the project config
func MergeConfigurations ¶
func MergeConfigurations(configProject ProjectConfigrationFile, configGlobal ProjectConfigrationFile) ProjectConfigrationFile
*
- Merge two configurations and keep the origin in the Scope
type PropertyConfigurationFile ¶
*
- The EnvCLI Configuration
func LoadPropertyConfig ¶
func LoadPropertyConfig() (PropertyConfigurationFile, error)
*
- Load the property config
func LoadPropertyConfigFile ¶
func LoadPropertyConfigFile(configFile string) (PropertyConfigurationFile, error)
*
- Load the property config file
type RunConfigurationEntry ¶
type RunConfigurationEntry struct { // name of the container Name string // description for the container Description string // the commands provided by the image Provides []string // container image Image string // target directory to mount your project inside of the container Directory string `default:"/project"` // overwrite the default entrypoint Entrypoint string `default:"original"` // wrap the executed command inside of the container into a shell (ex. if you use globs) Shell string `default:"none"` // commands that should run in the container before the actual command is executed BeforeScript []string `yaml:"before_script"` // allows a container to access the container runtime on the host ContainerRuntimeAccess bool `yaml:"containerRuntimeAccess"` // Caching of container-directories Caching []CachingEntry `yaml:"cache"` // the command scope (internal use only) - global or project Scope string }
*
- RunConfigurationEntry holds the configuration for a single command
func GetCommandConfiguration ¶
func GetCommandConfiguration(commandName string, currentDirectory string) (RunConfigurationEntry, error)
*
- GetCommandConfiguration gets the configuration entry for a specified command in the specified directory
Click to show internal directories.
Click to hide internal directories.