Documentation ¶
Index ¶
- func ProjectIsCreated(projectName string) bool
- func PullConfiguration() error
- func PushConfiguration() error
- type EnvironmentConfiguration
- func (ev *EnvironmentConfiguration) GetEnvironment() ([]string, error)
- func (ev *EnvironmentConfiguration) GetReplacedEnvironment() (map[string]string, error)
- func (ev *EnvironmentConfiguration) GetRepository(repoName string) (int, *RepositoryConfiguration)
- func (ev *EnvironmentConfiguration) GetShell() (string, []string, error)
- func (ev *EnvironmentConfiguration) GetVariables() (map[string]string, error)
- func (ev *EnvironmentConfiguration) LoadFromFile(path string) error
- func (ev *EnvironmentConfiguration) RepositoryExists(repoName string) bool
- func (ev *EnvironmentConfiguration) SaveToFile(path string) error
- func (ev *EnvironmentConfiguration) StartShell() error
- func (ev *EnvironmentConfiguration) StartShellForSubdirectory(subdirectory string) error
- type EnvironmentExternalProcessConfiguration
- type RepositoryConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectIsCreated ¶
ProjectIsCreated checks whether project is checked out
func PullConfiguration ¶ added in v1.6.0
func PullConfiguration() error
PullConfiguration gets the latest commit from remote repository
func PushConfiguration ¶ added in v1.6.0
func PushConfiguration() error
PushConfiguration puts the latest commit to remote repository
Types ¶
type EnvironmentConfiguration ¶
type EnvironmentConfiguration struct { Name string `yaml:"name"` Repositories []RepositoryConfiguration `yaml:"repositories"` ProcessConfiguration EnvironmentExternalProcessConfiguration `yaml:"processes"` }
EnvironmentConfiguration contains information about the project
func (*EnvironmentConfiguration) GetEnvironment ¶ added in v1.1.1
func (ev *EnvironmentConfiguration) GetEnvironment() ([]string, error)
GetEnvironment returns the templated env vars
func (*EnvironmentConfiguration) GetReplacedEnvironment ¶ added in v1.1.0
func (ev *EnvironmentConfiguration) GetReplacedEnvironment() (map[string]string, error)
GetReplacedEnvironment provides a way to get the environment variables with replaced values
func (*EnvironmentConfiguration) GetRepository ¶
func (ev *EnvironmentConfiguration) GetRepository(repoName string) (int, *RepositoryConfiguration)
GetRepository returns a repository with given name
func (*EnvironmentConfiguration) GetShell ¶ added in v1.1.1
func (ev *EnvironmentConfiguration) GetShell() (string, []string, error)
GetShell returns the shell executable with template applied
func (*EnvironmentConfiguration) GetVariables ¶ added in v1.1.0
func (ev *EnvironmentConfiguration) GetVariables() (map[string]string, error)
GetVariables returns variable map for environment
func (*EnvironmentConfiguration) LoadFromFile ¶
func (ev *EnvironmentConfiguration) LoadFromFile(path string) error
LoadFromFile takes a YAML file and unmarshals its data
func (*EnvironmentConfiguration) RepositoryExists ¶
func (ev *EnvironmentConfiguration) RepositoryExists(repoName string) bool
RepositoryExists returns true if a repository is configured in environment
func (*EnvironmentConfiguration) SaveToFile ¶
func (ev *EnvironmentConfiguration) SaveToFile(path string) error
SaveToFile takes the config and saves to disk
func (*EnvironmentConfiguration) StartShell ¶
func (ev *EnvironmentConfiguration) StartShell() error
StartShell executes configured shell or default shell (sh)
func (*EnvironmentConfiguration) StartShellForSubdirectory ¶ added in v1.4.0
func (ev *EnvironmentConfiguration) StartShellForSubdirectory(subdirectory string) error
StartShellForSubdirectory executes configured shell or default shell (sh) within a specified subdirectory
type EnvironmentExternalProcessConfiguration ¶ added in v1.3.0
type EnvironmentExternalProcessConfiguration struct { Environment map[string]string `yaml:"env"` Shell string `yaml:"shell"` ShellArguments []string `yaml:"shell-arguments"` Commands []string `yaml:"commands"` }
EnvironmentExternalProcessConfiguration contains configuration in use with external processes
type RepositoryConfiguration ¶
type RepositoryConfiguration struct { Name string `yaml:"name"` Path string `yaml:"path"` URL string `yaml:"url"` Disabled bool `yaml:"disabled"` Pinned string `yaml:"pinned"` }
RepositoryConfiguration contains information about linked repositories
func (RepositoryConfiguration) ToString ¶ added in v1.3.0
func (rc RepositoryConfiguration) ToString() string