Documentation ¶
Index ¶
- func AutoInstall(tc *tenvConfig)
- func DisableDisplay(tc *tenvConfig)
- func IgnoreEnv(tc *tenvConfig)
- type Tenv
- func (t Tenv) Command(ctx context.Context, toolName string, requestedVersion string, ...) (*exec.Cmd, error)
- func (t Tenv) CommandProxy(ctx context.Context, toolName string, requestedVersion string, ...) error
- func (t Tenv) Detect(ctx context.Context, toolName string) (string, error)
- func (t Tenv) DetectedCommand(ctx context.Context, toolName string, cmdArgs ...string) (*exec.Cmd, error)
- func (t Tenv) DetectedCommandProxy(ctx context.Context, toolName string, cmdArgs ...string) error
- func (t Tenv) Evaluate(ctx context.Context, toolName string, requestedVersion string) (string, error)
- func (t Tenv) Install(ctx context.Context, toolName string, requestedVersion string) error
- func (t Tenv) InstallMultiple(ctx context.Context, toolName string, versions []string) error
- func (t Tenv) ListLocal(ctx context.Context, toolName string, reverseOrder bool) ([]versionmanager.DatedVersion, error)
- func (t Tenv) ListRemote(ctx context.Context, toolName string, reverseOrder bool) ([]string, error)
- func (t Tenv) LocallyInstalled(ctx context.Context, toolName string) (map[string]struct{}, error)
- func (t Tenv) ResetDefaultConstraint(ctx context.Context, toolName string) error
- func (t Tenv) ResetDefaultVersion(ctx context.Context, toolName string) error
- func (t Tenv) SetDefaultConstraint(ctx context.Context, toolName string, constraint string) error
- func (t Tenv) SetDefaultVersion(ctx context.Context, toolName string, requestedVersion string, workingDir bool) error
- func (t Tenv) Uninstall(ctx context.Context, toolName string, requestedVersion string) error
- func (t Tenv) UninstallMultiple(ctx context.Context, toolName string, versions []string) error
- type TenvOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoInstall ¶
func AutoInstall(tc *tenvConfig)
func DisableDisplay ¶
func DisableDisplay(tc *tenvConfig)
Types ¶
type Tenv ¶
type Tenv struct {
// contains filtered or unexported fields
}
Not concurrent safe.
func Make ¶
func Make(options ...TenvOption) (Tenv, error)
The returned wrapper is not concurrent safe.
func (Tenv) Command ¶
func (t Tenv) Command(ctx context.Context, toolName string, requestedVersion string, cmdArgs ...string) (*exec.Cmd, error)
return an exec.Cmd in order to call the specified tool version (need to have it installed for the Cmd call to work).
func (Tenv) CommandProxy ¶
func (t Tenv) CommandProxy(ctx context.Context, toolName string, requestedVersion string, cmdArgs ...string) error
Use the result of Tenv.Command to call cmdproxy.Run (Always call os.Exit).
func (Tenv) DetectedCommand ¶
func (t Tenv) DetectedCommand(ctx context.Context, toolName string, cmdArgs ...string) (*exec.Cmd, error)
Use the result of Tenv.Detect to call Tenv.Command.
func (Tenv) DetectedCommandProxy ¶
Use the result of Tenv.DetectedCommand to call cmdproxy.Run (Always call os.Exit).
func (Tenv) Evaluate ¶
func (t Tenv) Evaluate(ctx context.Context, toolName string, requestedVersion string) (string, error)
Evaluate version resolution strategy or version constraint (can install depending on configuration).
func (Tenv) InstallMultiple ¶
func (Tenv) ListLocal ¶
func (t Tenv) ListLocal(ctx context.Context, toolName string, reverseOrder bool) ([]versionmanager.DatedVersion, error)
func (Tenv) ListRemote ¶
func (Tenv) LocallyInstalled ¶
func (Tenv) ResetDefaultConstraint ¶
func (Tenv) ResetDefaultVersion ¶
func (Tenv) SetDefaultConstraint ¶
func (Tenv) SetDefaultVersion ¶
type TenvOption ¶
type TenvOption func(*tenvConfig)
func AddTool ¶
func AddTool(toolName string, builderFunc builder.BuilderFunc) TenvOption
add builder or override default builder (see builder.Builders).
func WithConfig ¶
func WithConfig(conf *config.Config) TenvOption
func WithDisplayer ¶
func WithDisplayer(displayer loghelper.Displayer) TenvOption
func WithHCLParser ¶
func WithHCLParser(hclParser *hclparse.Parser) TenvOption
Click to show internal directories.
Click to hide internal directories.