configutil

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

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

View Source
const DefaultDevspaceServiceName = "default"

DefaultDevspaceServiceName is the name of the initial default service

View Source
const DefaultOverwriteConfigPath = ".devspace/overwrite.yaml"

DefaultOverwriteConfigPath is the default overwrite config path to use

Variables

View Source
var ConfigPath = DefaultConfigPath

ConfigPath is the path for the main config

View Source
var OverwriteConfigPath = DefaultOverwriteConfigPath

OverwriteConfigPath specifies where the override.yaml lies

Functions

func AddService

func AddService(service *v1.ServiceConfig) error

AddService adds a service to the config

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 GetService

func GetService(serviceName string) (*v1.ServiceConfig, error)

GetService returns the service referenced by serviceName

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