Documentation
¶
Index ¶
- func CleanRcFile(path string, data RcIdentification) error
- func EnvSlice(env map[string]string) []string
- func EscapeEnv(env map[string]string) map[string]string
- func NewCommand(command string, args []string, env []string) *exec.Cmd
- func RemoveLegacyInstallPath(path string) error
- func SetupProjectRcFile(prj *project.Project, templateName, ext string, env map[string]string, ...) (*os.File, error)
- func SetupShellRcFile(rcFileName, templateName string, env map[string]string, ...) error
- func Start(cmd *exec.Cmd) chan error
- func Stop(cmd *exec.Cmd) error
- func WriteRcData(data string, path string, identification RcIdentification) error
- func WriteRcFile(rcTemplateName string, path string, data RcIdentification, ...) error
- type Configurable
- type RcIdentification
- type RunFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanRcFile ¶
func CleanRcFile(path string, data RcIdentification) error
func RemoveLegacyInstallPath ¶
RemoveLegacyInstallPath removes the PATH modification statement added to the shell-rc file by the legacy install script
func SetupProjectRcFile ¶
func SetupProjectRcFile(prj *project.Project, templateName, ext string, env map[string]string, out output.Outputer, cfg Configurable, bashifyPaths bool) (*os.File, error)
SetupProjectRcFile creates a temporary RC file that our shell is initiated from, this allows us to template the logic used for initialising the subshell
func SetupShellRcFile ¶
func SetupShellRcFile(rcFileName, templateName string, env map[string]string, namespace *project.Namespaced, cfg Configurable) error
SetupShellRcFile create a rc file to activate a runtime (without a project being present)
func Start ¶
Start wires stdin/stdout/stderr into the provided command, starts it, and returns a channel to monitor errors on.
func WriteRcData ¶
func WriteRcData(data string, path string, identification RcIdentification) error
func WriteRcFile ¶
Types ¶
type Configurable ¶
type Configurable interface { Set(string, interface{}) error GetBool(string) bool GetString(string) string GetStringMap(string) map[string]interface{} }
Configurable defines an interface to store and get configuration data
type RcIdentification ¶
var ( DeployID RcIdentification = RcIdentification{ constants.RCAppendDeployStartLine, constants.RCAppendDeployStopLine, "user_env", } DefaultID RcIdentification = RcIdentification{ constants.RCAppendDefaultStartLine, constants.RCAppendDefaultStopLine, "user_default_env", } InstallID RcIdentification = RcIdentification{ constants.RCAppendInstallStartLine, constants.RCAppendInstallStopLine, "user_install_env", } OfflineInstallID RcIdentification = RcIdentification{ constants.RCAppendOfflineInstallStartLine, constants.RCAppendOfflineInstallStopLine, "user_offlineinstall_env", } AutostartID RcIdentification = RcIdentification{ constants.RCAppendAutostartStartLine, constants.RCAppendAutostartStopLine, "user_autostart_env", } )
func ProjectRCIdentifier ¶
func ProjectRCIdentifier(base RcIdentification, namespace *project.Namespaced) RcIdentification
Click to show internal directories.
Click to hide internal directories.