Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteConfig ¶
WriteConfig writes configuration to given path
func WriteProjectConfig ¶ added in v0.2.4
func WriteProjectConfig(path string, config *ProjectConfig) error
WriteProjectConfig writes project config in yaml format into given path
Types ¶
type Config ¶
Config is struct for configuration for CLI client
type ProjectConfig ¶
type ProjectConfig struct { Name string `yaml:"name,omitempty"` Image string `yaml:"image,omitempty"` Command []string `yaml:"command,omitempty"` Env []string `yaml:"env,omitempty"` Binds []string `yaml:"binds,omitempty"` Mounts []string `yaml:"mounts,omitempty"` WorkDir string `yaml:"workdir,omitempty"` SyncContainer *containers.Container `yaml:"syncContainer,omitempty"` Syncs []string `yaml:"syncs,omitempty"` // contains filtered or unexported fields }
ProjectConfig represents configuration in project directory
func ReadProjectConfig ¶
func ReadProjectConfig(path string) *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)
EnvWith return list of environment variable definitions from project configs with values appended to end of the list.
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