Documentation
¶
Index ¶
- func Import(srcFile string) (uuid.UUID, error)
- func IsExisting(uuid uuid.UUID) (bool, error)
- type Environment
- func (e *Environment) AddRsaKeyPair(rsaKeyPair auth.RsaKeyPair)
- func (e *Environment) Export(dstDir string) error
- func (e *Environment) GetComponentByName(name string) (*InstalledComponentVersion, error)
- func (e *Environment) Install(newComponent InstalledComponentVersion) error
- func (e *Environment) Save() error
- func (e *Environment) String() string
- type InstalledComponentCommand
- type InstalledComponentVersion
- type SshConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Environment ¶
type Environment struct {
Name string `yaml:"name"`
Uuid uuid.UUID `yaml:"uuid"`
Installed []InstalledComponentVersion `yaml:"installed"`
SshConfig SshConfig `yaml:"ssh-config,omitempty"`
}
Environment struct holds all information about managed environment with list of InstalledComponentVersion
func (*Environment) AddRsaKeyPair ¶
func (e *Environment) AddRsaKeyPair(rsaKeyPair auth.RsaKeyPair)
func (*Environment) Export ¶
func (e *Environment) Export(dstDir string) error
Export (archive) an environment
func (*Environment) GetComponentByName ¶
func (e *Environment) GetComponentByName(name string) (*InstalledComponentVersion, error)
GetComponentByName returns first InstalledComponentVersion found by name
func (*Environment) Install ¶
func (e *Environment) Install(newComponent InstalledComponentVersion) error
func (*Environment) String ¶
func (e *Environment) String() string
The String method is used to pretty-print Environment struct
type InstalledComponentCommand ¶
type InstalledComponentCommand struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Command string `yaml:"command"`
Envs map[string]string `yaml:"envs"`
Args []string `yaml:"args"`
}
InstalledComponentCommand holds information about specific command of installed component
func (*InstalledComponentCommand) String ¶
func (cc *InstalledComponentCommand) String() string
The String method is used to pretty-print InstalledComponentCommand struct
type InstalledComponentVersion ¶
type InstalledComponentVersion struct {
EnvironmentRef uuid.UUID `yaml:"environment_ref"` //TODO try to remove it
Name string `yaml:"name"`
Type string `yaml:"type"`
Version string `yaml:"version"`
Image string `yaml:"image"`
WorkDirectory string `yaml:"workdir"`
Mounts []string `yaml:"mounts"`
Commands []InstalledComponentCommand `yaml:"commands"`
}
InstalledComponentVersion struct holds information about installed components with its details.
func (*InstalledComponentVersion) Download ¶
func (cv *InstalledComponentVersion) Download() error
func (*InstalledComponentVersion) PersistLogs ¶
func (cv *InstalledComponentVersion) PersistLogs(logs string)
func (*InstalledComponentVersion) Run ¶
func (cv *InstalledComponentVersion) Run(command string, processor func(string) string) error
func (*InstalledComponentVersion) String ¶
func (cv *InstalledComponentVersion) String() string
The String method is used to pretty-print InstalledComponentVersion struct
type SshConfig ¶
type SshConfig struct {
RsaKeyPair auth.RsaKeyPair `yaml:"rsa-keypair"`
}
Click to show internal directories.
Click to hide internal directories.