Documentation
¶
Index ¶
- Constants
- func ExtractFromArchive(archiveFileName, matchPrefix, targetPath string, ignoreAbsPath bool, ...) error
- func FileExists(name string) bool
- func FindLagoonSyncOnEnv() (string, bool)
- func GetServices(dockerComposeFilePath string) (map[string]Service, error)
- func HideSpinner()
- func LoadDockerCompose(path string) (map[string]Service, error)
- func LogDebugInfo(message string, output interface{})
- func LogError(message string, output interface{})
- func LogExecutionStep(message string, output interface{})
- func LogFatalError(message string, output interface{})
- func LogProcessStep(message string, output interface{})
- func LogWarning(message string, output interface{})
- func RemoteShellout(command string, service string, remoteUser string, remoteHost string, ...) (error, string)
- func SetColour(c bool)
- func SetShowSpinner(spin bool)
- func Shellout(command string) (error, string, string)
- func ShowSpinner()
- func SliceContains(slice []string, s string) bool
- type ApiConn
- func (r *ApiConn) GetProjectEnvironmentDeployTargets(projectName string) (*[]schema.Environment, error)
- func (r *ApiConn) GetServicesForEnvironment(projectName, environmentName string) ([]schema.EnvironmentService, error)
- func (r *ApiConn) Init(graphqlEndpoint, sshkeyPath, sshHost, sshPort string) error
- type Archive
- type ArchiveItem
- type Build
- type DockerCompose
- type ExtractError
- type Service
Constants ¶
const ShellToUse = "sh"
const TarGzExtension = ".tar.gz"
Variables ¶
This section is empty.
Functions ¶
func ExtractFromArchive ¶ added in v0.10.0
func ExtractFromArchive(archiveFileName, matchPrefix, targetPath string, ignoreAbsPath bool, ignoreFileErrorList []string) error
ExtractFromArchive extracts entries from a .tar.gz archive whose names match matchPrefix into targetPath. Pass matchPrefix="" to extract everything.
When ignoreAbsPath is false, entries with absolute paths are rejected. When ignoreAbsPath is true, absolute entry paths are normalised — the leading separator is stripped and the entry is extracted relative to targetPath.
func FindLagoonSyncOnEnv ¶
func GetServices ¶ added in v0.10.0
GetServices attempts to generate a list of services from a docker-compose file
func HideSpinner ¶ added in v0.8.1
func HideSpinner()
func LoadDockerCompose ¶ added in v0.9.0
func LogDebugInfo ¶
func LogDebugInfo(message string, output interface{})
func LogExecutionStep ¶
func LogExecutionStep(message string, output interface{})
func LogFatalError ¶
func LogFatalError(message string, output interface{})
func LogProcessStep ¶
func LogProcessStep(message string, output interface{})
func LogWarning ¶
func LogWarning(message string, output interface{})
func RemoteShellout ¶ added in v0.8.0
func SetShowSpinner ¶ added in v0.8.1
func SetShowSpinner(spin bool)
func ShowSpinner ¶ added in v0.8.1
func ShowSpinner()
func SliceContains ¶ added in v0.9.0
Types ¶
type ApiConn ¶ added in v0.8.0
type ApiConn struct {
// contains filtered or unexported fields
}
func (*ApiConn) GetProjectEnvironmentDeployTargets ¶ added in v0.8.0
func (r *ApiConn) GetProjectEnvironmentDeployTargets(projectName string) (*[]schema.Environment, error)
func (*ApiConn) GetServicesForEnvironment ¶ added in v0.10.0
func (r *ApiConn) GetServicesForEnvironment(projectName, environmentName string) ([]schema.EnvironmentService, error)
type Archive ¶ added in v0.10.0
type Archive struct {
ArchiveFilename string `yaml:"archivefilename"` // Used primarily internally for creating the archive.
Items []ArchiveItem `yaml:"items"`
Version string `yaml:"version,omitempty"`
}
func ExtractManifest ¶ added in v0.10.0
func InitArchive ¶ added in v0.10.0
func (*Archive) WriteArchive ¶ added in v0.10.0
type ArchiveItem ¶ added in v0.10.0
type DockerCompose ¶ added in v0.9.0
DockerCompose represents the root structure of a docker-compose.yml file
type ExtractError ¶ added in v0.10.0
ExtractError is returned by ExtractFromArchive when an individual archive entry cannot be extracted. EntryType is the tar type flag (e.g. tar.TypeReg, tar.TypeDir) and Name is the resolved destination path.
func (*ExtractError) Error ¶ added in v0.10.0
func (e *ExtractError) Error() string
func (*ExtractError) Unwrap ¶ added in v0.10.0
func (e *ExtractError) Unwrap() error
type Service ¶ added in v0.9.0
type Service struct {
Labels map[string]string `yaml:"labels"`
Name string
Type string
Volumes map[string]string
}
Service represents a single service definition in docker-compose.yml
func (*Service) UnmarshalYAML ¶ added in v0.9.0
UnmarshalYAML implements custom unmarshaling for Service to handle malformed YAML