Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExistingToolsManager ¶
CheckExistingToolsManager identifies the active tools manager, prioritizing aqua.
Types ¶
type BaseToolsManager ¶
type BaseToolsManager struct {
// contains filtered or unexported fields
}
BaseToolsManager is the base implementation of the ToolsManager interface.
func NewToolsManager ¶
func NewToolsManager(injector di.Injector) *BaseToolsManager
Creates a new ToolsManager instance with the given injector.
func (*BaseToolsManager) Check ¶
func (t *BaseToolsManager) Check() error
Check checks that appropriate tools are installed and configured.
func (*BaseToolsManager) Initialize ¶
func (t *BaseToolsManager) Initialize() error
Initialize the tools manager by resolving the config handler and shell.
func (*BaseToolsManager) Install ¶
func (t *BaseToolsManager) Install() error
Install installs the tools required by the project.
func (*BaseToolsManager) WriteManifest ¶
func (t *BaseToolsManager) WriteManifest() error
WriteManifest writes the tools manifest to the project root. It should not overwrite existing manifest files, but update them appropriately.
type MockToolsManager ¶
type MockToolsManager struct { InitializeFunc func() error WriteManifestFunc func() error InstallFunc func() error CheckFunc func() error }
MockToolsManager is a mock implementation of the ToolsManager interface for testing purposes.
func NewMockToolsManager ¶
func NewMockToolsManager() *MockToolsManager
NewMockToolsManager creates a new instance of MockToolsManager.
func (*MockToolsManager) Check ¶
func (m *MockToolsManager) Check() error
Check calls the mock CheckFunc if set, otherwise returns nil.
func (*MockToolsManager) Initialize ¶
func (m *MockToolsManager) Initialize() error
Initialize calls the mock InitializeFunc if set, otherwise returns nil.
func (*MockToolsManager) Install ¶
func (m *MockToolsManager) Install() error
InstallTools calls the mock InstallToolsFunc if set, otherwise returns nil.
func (*MockToolsManager) WriteManifest ¶
func (m *MockToolsManager) WriteManifest() error
WriteManifest calls the mock WriteManifestFunc if set, otherwise returns nil.
type ToolsManager ¶
type ToolsManager interface { Initialize() error WriteManifest() error Install() error Check() error }
ToolsManager is responsible for managing the cli toolchain required by the project. It leverages existing package ecosystems and modifies tools manifests to ensure the appropriate tools are installed and configured.