Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteConfig ¶
WriteConfig writes configuration to given path
Types ¶
type Config ¶
Config is struct for configuration for CLI client
type ProjectConfig ¶
type ProjectConfig struct {
Name string `yaml:"name"`
Image string `yaml:"image"`
Env []string `yaml:"env"`
Binds []string `yaml:"binds"`
Sync SyncConfig `yaml:"sync"`
// contains filtered or unexported fields
}
ProjectConfig represents configuration in project directory
func ReadProjectConfig ¶
func ReadProjectConfig(path string) (result *ProjectConfig)
ReadProjectConfig read ProjectConfig from given path If file doesn't exist, returns empty config so it's safe for reading even The file doesn't exist. In any other failure case, will fatal.
func (ProjectConfig) EnvWith ¶
func (p ProjectConfig) EnvWith(values []string) (result []string)
func (ProjectConfig) ImageOrElse ¶
func (p ProjectConfig) ImageOrElse(val string) string
ImageOrElse return 'name' from the project configuration or defaults to given value
func (ProjectConfig) NameOrElse ¶
func (p ProjectConfig) NameOrElse(val string) string
NameOrElse return 'name' from the project configuration or defaults to given value
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider works as Facade for underlying config with capability to override some values
func NewProvider ¶
NewProvider creates new Provider around config instance
func (*Provider) GetEndpointByName ¶
GetEndpointByName finds Endpoint by name or return ok=false
func (*Provider) GetEndpoints ¶
GetEndpoints return current namespace
func (*Provider) GetNamespace ¶
GetNamespace return current namespace
func (*Provider) OverrideEndpoints ¶
OverrideEndpoints set endpoint to be overrided with given value
func (*Provider) OverrideNamespace ¶
OverrideNamespace set namespace to be overrided with given value