configutil

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 14 Imported by: 33

Documentation

Index

Constants

View Source
const CurrentConfigVersion = "v1alpha1"

CurrentConfigVersion has the value of the current config version

View Source
const DefaultConfigPath = "/.devspace/config.yaml"

DefaultConfigPath is the default config path to use

View Source
const DefaultDevspaceDeploymentName = "devspace-default"

DefaultDevspaceDeploymentName is the name of the initial default deployment

Variables

View Source
var ConfigPath = DefaultConfigPath

ConfigPath is the path for the main config

View Source
var OverwriteConfigPath = "/.devspace/overwrite.yaml"

OverwriteConfigPath specifies where the override.yaml lies

Functions

func Bool

func Bool(val bool) *bool

Bool returns a pointer to a bool variable

func ConfigExists

func ConfigExists() (bool, error)

ConfigExists checks whether the yaml file for the config exists

func GetConfig

func GetConfig() *v1.Config

GetConfig returns the config merged from .devspace/config.yaml and .devspace/overwrite.yaml

func GetConfigWithoutDefaults

func GetConfigWithoutDefaults() *v1.Config

GetConfigWithoutDefaults returns the config without setting the default values

func GetDefaultNamespace

func GetDefaultNamespace(config *v1.Config) (string, error)

GetDefaultNamespace retrieves the default namespace where to operate in, either from devspace config or kube config

func GetOverwriteConfig

func GetOverwriteConfig() *v1.Config

GetOverwriteConfig returns the config retrieved from .devspace/overwrite.yaml

func InitConfig

func InitConfig() *v1.Config

InitConfig initializes the config objects

func Merge

func Merge(object interface{}, overwriteObject interface{}, unifyPointers bool)

Merge deeply merges two objects object MUST be a pointer of a pointer overwriteObject MUST be a pointer

func SaveConfig

func SaveConfig() error

SaveConfig writes the data of a config to its yaml file

func SetDefaultsOnce

func SetDefaultsOnce()

SetDefaultsOnce ensures that specific values are set in the config

func String

func String(val string) *string

String returns a pointer to a string variable

Types

type ConfigInterface

type ConfigInterface interface{}

ConfigInterface defines the pattern of every config

Jump to

Keyboard shortcuts

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