Versions in this module Expand all Collapse all v0 v0.2.11 Oct 11, 2023 Changes in this version + const DefaultUpdateCommand + var Version string + func CheckHomeConfigIsEmpty(configPath string) error + func GenerateHookScripts(options *GlobalOptions, svcPath string, elcBinary string, scriptsFolder string) error + func SaveHomeConfig(homeConfig *HomeConfig) error + type Component struct + Config *ComponentConfig + Context *Context + JustStarted bool + Name string + Template *ComponentConfig + Workspace *Workspace + func NewComponent(compName string, compCfg *ComponentConfig, ws *Workspace) *Component + func (comp *Component) Clone(options *GlobalOptions, noHook bool) error + func (comp *Component) Compose(params *GlobalOptions) (int, error) + func (comp *Component) Destroy(options *GlobalOptions) error + func (comp *Component) DumpVars() error + func (comp *Component) Exec(options *GlobalOptions) (int, error) + func (comp *Component) IsCloned() (bool, error) + func (comp *Component) IsRunning(options *GlobalOptions) (bool, error) + func (comp *Component) Restart(hard bool, options *GlobalOptions) error + func (comp *Component) Run(options *GlobalOptions) (int, error) + func (comp *Component) Start(options *GlobalOptions) error + func (comp *Component) Stop(options *GlobalOptions) error + func (comp *Component) UpdateHooks(options *GlobalOptions, elcBinary string, scriptsFolder string) error + func (comp *Component) Wrap(command []string, options *GlobalOptions) (int, error) + type ComponentConfig struct + AfterCloneHook string + Alias string + ComposeFile string + Dependencies map[string]ModeList + ExecPath string + Extends string + HostedIn string + Hostname string + IsTemplate bool + Path string + Replace bool + Repository string + Tags []string + Variables yaml.MapSlice + func (cc *ComponentConfig) GetDeps(mode string) []string + type Context [][]string + func (ctx *Context) RenderString(str string) (string, error) + type GlobalOptions struct + Cmd []string + ComponentName string + Debug bool + DryRun bool + Force bool + Mode string + NoTty bool + Tag string + UID int + WorkingDir string + WorkspaceName string + type HomeConfig struct + CurrentWorkspace string + Path string + UpdateCommand string + Workspaces []HomeConfigItem + func CheckAndLoadHC() (*HomeConfig, error) + func LoadHomeConfig(configPath string) (*HomeConfig, error) + func (hc *HomeConfig) AddWorkspace(name string, path string) error + func (hc *HomeConfig) FindWorkspace(name string) *HomeConfigItem + func (hc *HomeConfig) FindWorkspaceByPath() (*HomeConfigItem, error) + func (hc *HomeConfig) GetCurrentWorkspace(wsName string) (*HomeConfigItem, error) + func (hc *HomeConfig) GetCurrentWsPath(wsName string) (string, error) + func (hc *HomeConfig) RemoveWorkspace(name string) error + type HomeConfigItem struct + Name string + Path string + RootPath string + type MockPC struct + func NewMockPC(ctrl *gomock.Controller) *MockPC + func (m *MockPC) Args() []string + func (m *MockPC) Chmod(filename string, mode os.FileMode) error + func (m *MockPC) CreateDir(path string) error + func (m *MockPC) CreateFile(filename string) error + func (m *MockPC) EXPECT() *MockPCMockRecorder + func (m *MockPC) ExecInteractive(command, env []string) (int, error) + func (m *MockPC) ExecToString(command, env []string) (int, string, error) + func (m *MockPC) Exit(code int) + func (m *MockPC) FileExists(filepath string) bool + func (m *MockPC) Getuid() int + func (m *MockPC) Getwd() (string, error) + func (m *MockPC) HomeDir() (string, error) + func (m *MockPC) IsTerminal() bool + func (m *MockPC) Printf(format string, a ...interface{}) (int, error) + func (m *MockPC) Println(a ...interface{}) (int, error) + func (m *MockPC) ReadDir(dirname string) ([]os.FileInfo, error) + func (m *MockPC) ReadFile(filename string) ([]byte, error) + func (m *MockPC) WriteFile(filename string, data []byte, perm os.FileMode) error + type MockPCMockRecorder struct + func (mr *MockPCMockRecorder) Args() *gomock.Call + func (mr *MockPCMockRecorder) Chmod(filename, mode interface{}) *gomock.Call + func (mr *MockPCMockRecorder) CreateDir(path interface{}) *gomock.Call + func (mr *MockPCMockRecorder) CreateFile(filename interface{}) *gomock.Call + func (mr *MockPCMockRecorder) ExecInteractive(command, env interface{}) *gomock.Call + func (mr *MockPCMockRecorder) ExecToString(command, env interface{}) *gomock.Call + func (mr *MockPCMockRecorder) Exit(code interface{}) *gomock.Call + func (mr *MockPCMockRecorder) FileExists(filepath interface{}) *gomock.Call + func (mr *MockPCMockRecorder) Getuid() *gomock.Call + func (mr *MockPCMockRecorder) Getwd() *gomock.Call + func (mr *MockPCMockRecorder) HomeDir() *gomock.Call + func (mr *MockPCMockRecorder) IsTerminal() *gomock.Call + func (mr *MockPCMockRecorder) Printf(format interface{}, a ...interface{}) *gomock.Call + func (mr *MockPCMockRecorder) Println(a ...interface{}) *gomock.Call + func (mr *MockPCMockRecorder) ReadDir(dirname interface{}) *gomock.Call + func (mr *MockPCMockRecorder) ReadFile(filename interface{}) *gomock.Call + func (mr *MockPCMockRecorder) WriteFile(filename, data, perm interface{}) *gomock.Call + type ModeList []string + type PC interface + Args func() []string + Chmod func(filename string, mode os.FileMode) error + CreateDir func(path string) error + CreateFile func(filename string) error + ExecInteractive func(command []string, env []string) (int, error) + ExecToString func(command []string, env []string) (int, string, error) + Exit func(code int) + FileExists func(filepath string) bool + Getuid func() int + Getwd func() (dir string, err error) + HomeDir func() (string, error) + IsTerminal func() bool + Printf func(format string, a ...interface{}) (n int, err error) + Println func(a ...interface{}) (n int, err error) + ReadDir func(dirname string) ([]os.FileInfo, error) + ReadFile func(filename string) ([]byte, error) + WriteFile func(filename string, data []byte, perm os.FileMode) error + var Pc PC + type RealPC struct + func (r *RealPC) Args() []string + func (r *RealPC) Chmod(filename string, mode os.FileMode) error + func (r *RealPC) CreateDir(path string) error + func (r *RealPC) CreateFile(filename string) error + func (r *RealPC) ExecInteractive(command []string, env []string) (int, error) + func (r *RealPC) ExecToString(command []string, env []string) (int, string, error) + func (r *RealPC) Exit(code int) + func (r *RealPC) FileExists(filepath string) bool + func (r *RealPC) Getuid() int + func (r *RealPC) Getwd() (dir string, err error) + func (r *RealPC) HomeDir() (string, error) + func (r *RealPC) IsTerminal() bool + func (r *RealPC) Printf(format string, a ...interface{}) (n int, err error) + func (r *RealPC) Println(a ...interface{}) (n int, err error) + func (r *RealPC) ReadDir(dirname string) ([]os.FileInfo, error) + func (r *RealPC) ReadFile(filename string) ([]byte, error) + func (r *RealPC) WriteFile(filename string, data []byte, perm os.FileMode) error + type Workspace struct + Aliases map[string]string + Components map[string]*Component + Config *WorkspaceConfig + ConfigPath string + Context *Context + Cwd string + WillStart []string + func GetWorkspaceConfig(wsName string) (*Workspace, error) + func NewWorkspace(wsPath string, cwd string) *Workspace + func (ws *Workspace) ComponentByName(name string) (*Component, error) + func (ws *Workspace) ComponentByPath() (*Component, error) + func (ws *Workspace) ComponentNameByPath() (string, error) + func (ws *Workspace) FindComponentNamesByTag(tag string) []string + func (ws *Workspace) GetComponentNames() []string + func (ws *Workspace) GetComponentNamesList() []string + func (ws *Workspace) LoadConfig() error + type WorkspaceConfig struct + Aliases map[string]string + Components map[string]ComponentConfig + ElcMinVersion string + Modules map[string]ComponentConfig + Name string + Services map[string]ComponentConfig + Templates map[string]ComponentConfig + Variables yaml.MapSlice + func NewWorkspaceConfig() *WorkspaceConfig