plugins

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package plugins provides plugins for universal-asdf-plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureGoToolchainEntries

func EnsureGoToolchainEntries(ctx context.Context) error

EnsureGoToolchainEntries ensures that a golang entry exists in .tool-versions. It resolves the version from the project's .tool-versions file and ensures the entry is present, installing it if asdf is available.

func InstallGoToolchain

func InstallGoToolchain(ctx context.Context) error

InstallGoToolchain installs the Go toolchain into an asdf-style tree under ASDF_DATA_DIR (or $HOME/.asdf if unset) using the Go plugin implementation.

func InstallNodeToolchain

func InstallNodeToolchain(ctx context.Context) error

InstallNodeToolchain installs the Node.js toolchain into an asdf-style tree under ASDF_DATA_DIR (or $HOME/.asdf if unset) using the Node.js plugin implementation.

func NewArgoCDPlugin

func NewArgoCDPlugin() asdf.Plugin

NewArgoCDPlugin creates a new ArgoCD plugin instance.

func NewArgoPlugin

func NewArgoPlugin() asdf.Plugin

NewArgoPlugin creates a new Argo plugin instance.

func NewArgoRolloutsPlugin

func NewArgoRolloutsPlugin() asdf.Plugin

NewArgoRolloutsPlugin creates a new Argo Rollouts plugin instance.

func NewAsdfPlugin

func NewAsdfPlugin() asdf.Plugin

NewAsdfPlugin creates a new asdf plugin instance.

func NewAwsNukePlugin

func NewAwsNukePlugin() asdf.Plugin

NewAwsNukePlugin creates a new aws-nuke plugin instance.

func NewAwsSsoCliPlugin

func NewAwsSsoCliPlugin() asdf.Plugin

NewAwsSsoCliPlugin creates a new aws-sso-cli plugin instance.

func NewAwscliPlugin

func NewAwscliPlugin() asdf.Plugin

NewAwscliPlugin creates a new AWS CLI plugin instance.

func NewBufPlugin

func NewBufPlugin() asdf.Plugin

NewBufPlugin creates a new buf plugin instance.

func NewCheckovPlugin

func NewCheckovPlugin() asdf.Plugin

NewCheckovPlugin creates a new checkov plugin instance.

func NewCmakePlugin

func NewCmakePlugin() asdf.Plugin

NewCmakePlugin creates a new cmake plugin instance.

func NewCosignPlugin

func NewCosignPlugin() asdf.Plugin

NewCosignPlugin creates a new Cosign plugin instance.

func NewDoctlPlugin

func NewDoctlPlugin() asdf.Plugin

NewDoctlPlugin creates a new doctl plugin instance.

func NewGcloudPlugin

func NewGcloudPlugin() asdf.Plugin

NewGcloudPlugin creates a new gcloud plugin instance.

func NewGinkgoPlugin

func NewGinkgoPlugin() asdf.Plugin

NewGinkgoPlugin creates a new Ginkgo plugin instance.

func NewGithubCliPlugin

func NewGithubCliPlugin() asdf.Plugin

NewGithubCliPlugin creates a new github-cli plugin instance.

func NewGitleaksPlugin

func NewGitleaksPlugin() asdf.Plugin

NewGitleaksPlugin creates a new Gitleaks plugin instance.

func NewGitsignPlugin

func NewGitsignPlugin() asdf.Plugin

NewGitsignPlugin creates a new gitsign plugin instance.

func NewGolangPlugin

func NewGolangPlugin() asdf.Plugin

NewGolangPlugin creates a new Go plugin instance.

func NewGolangciLintPlugin

func NewGolangciLintPlugin() asdf.Plugin

NewGolangciLintPlugin creates a new golangci-lint plugin instance.

func NewGoreleaserPlugin

func NewGoreleaserPlugin() asdf.Plugin

NewGoreleaserPlugin creates a new goreleaser plugin instance.

func NewGrypePlugin

func NewGrypePlugin() asdf.Plugin

NewGrypePlugin creates a new Grype plugin instance.

func NewHelmPlugin

func NewHelmPlugin() asdf.Plugin

NewHelmPlugin creates a new Helm plugin instance.

func NewJqPlugin

func NewJqPlugin() asdf.Plugin

NewJqPlugin creates a new jq plugin instance.

func NewK9sPlugin

func NewK9sPlugin() asdf.Plugin

NewK9sPlugin creates a new K9s plugin instance.

func NewKindPlugin

func NewKindPlugin() asdf.Plugin

NewKindPlugin creates a new kind plugin instance.

func NewKoPlugin

func NewKoPlugin() asdf.Plugin

NewKoPlugin creates a new ko plugin instance.

func NewKubectlPlugin

func NewKubectlPlugin() asdf.Plugin

NewKubectlPlugin creates a new kubectl plugin instance.

func NewLazygitPlugin

func NewLazygitPlugin() asdf.Plugin

NewLazygitPlugin creates a new Lazygit plugin instance.

func NewLinkerdPlugin

func NewLinkerdPlugin() asdf.Plugin

NewLinkerdPlugin creates a new linkerd plugin instance.

func NewNerdctlPlugin

func NewNerdctlPlugin() asdf.Plugin

NewNerdctlPlugin creates a new nerdctl plugin instance.

func NewNodejsPlugin

func NewNodejsPlugin() asdf.Plugin

NewNodejsPlugin creates a new Node.js plugin instance.

func NewOpentofuPlugin

func NewOpentofuPlugin() asdf.Plugin

NewOpentofuPlugin creates a new opentofu plugin instance.

func NewPipxPlugin

func NewPipxPlugin() asdf.Plugin

NewPipxPlugin creates a new pipx plugin instance.

func NewProtocGenGoGrpcPlugin

func NewProtocGenGoGrpcPlugin() asdf.Plugin

NewProtocGenGoGrpcPlugin creates a new protoc-gen-go-grpc plugin instance.

func NewProtocGenGoPlugin

func NewProtocGenGoPlugin() asdf.Plugin

NewProtocGenGoPlugin creates a new protoc-gen-go plugin instance.

func NewProtocGenGrpcWebPlugin

func NewProtocGenGrpcWebPlugin() asdf.Plugin

NewProtocGenGrpcWebPlugin creates a new protoc-gen-grpc-web plugin instance.

func NewProtocPlugin

func NewProtocPlugin() asdf.Plugin

NewProtocPlugin creates a new protoc plugin instance.

func NewProtolintPlugin

func NewProtolintPlugin() asdf.Plugin

NewProtolintPlugin creates a new protolint plugin instance.

func NewPythonPlugin

func NewPythonPlugin() asdf.Plugin

NewPythonPlugin creates a new Python plugin instance.

func NewRustPlugin

func NewRustPlugin() asdf.Plugin

NewRustPlugin creates a new Rust plugin instance.

func NewSccachePlugin

func NewSccachePlugin() asdf.Plugin

NewSccachePlugin creates a new sccache plugin instance.

func NewShellcheckPlugin

func NewShellcheckPlugin() asdf.Plugin

NewShellcheckPlugin creates a new shellcheck plugin instance.

func NewShfmtPlugin

func NewShfmtPlugin() asdf.Plugin

NewShfmtPlugin creates a new shfmt plugin instance.

func NewSopsPlugin

func NewSopsPlugin() asdf.Plugin

NewSopsPlugin creates a new sops plugin instance.

func NewSqlcPlugin

func NewSqlcPlugin() asdf.Plugin

NewSqlcPlugin creates a new sqlc plugin instance.

func NewSyftPlugin

func NewSyftPlugin() asdf.Plugin

NewSyftPlugin creates a new Syft plugin instance.

func NewTektonCliPlugin

func NewTektonCliPlugin() asdf.Plugin

NewTektonCliPlugin creates a new Tekton CLI plugin instance.

func NewTelepresencePlugin

func NewTelepresencePlugin() asdf.Plugin

NewTelepresencePlugin creates a new Telepresence plugin instance.

func NewTerraformPlugin

func NewTerraformPlugin() asdf.Plugin

NewTerraformPlugin creates a new terraform plugin instance.

func NewTerragruntPlugin

func NewTerragruntPlugin() asdf.Plugin

NewTerragruntPlugin creates a new terragrunt plugin instance.

func NewTerrascanPlugin

func NewTerrascanPlugin() asdf.Plugin

NewTerrascanPlugin creates a new terrascan plugin instance.

func NewTflintPlugin

func NewTflintPlugin() asdf.Plugin

NewTflintPlugin creates a new tflint plugin instance.

func NewTfupdatePlugin

func NewTfupdatePlugin() asdf.Plugin

NewTfupdatePlugin creates a new tfupdate plugin instance.

func NewTraefikPlugin

func NewTraefikPlugin() asdf.Plugin

NewTraefikPlugin creates a new Traefik plugin instance.

func NewTrivyPlugin

func NewTrivyPlugin() asdf.Plugin

NewTrivyPlugin creates a new Trivy plugin instance.

func NewUpxPlugin

func NewUpxPlugin() asdf.Plugin

NewUpxPlugin creates a new upx plugin instance.

func NewUvPlugin

func NewUvPlugin() asdf.Plugin

NewUvPlugin creates a new uv plugin instance.

func NewVeleroPlugin

func NewVeleroPlugin() asdf.Plugin

NewVeleroPlugin creates a new Velero plugin instance.

func NewVultrCliPlugin

func NewVultrCliPlugin() asdf.Plugin

NewVultrCliPlugin creates a new VultrCli plugin instance.

func NewYqPlugin

func NewYqPlugin() asdf.Plugin

NewYqPlugin creates a new Yq plugin instance.

func NewZigPlugin

func NewZigPlugin() asdf.Plugin

NewZigPlugin creates a new Zig plugin instance.

Types

type ArgoPlugin

type ArgoPlugin struct {
	*asdf.SourceBuildPlugin
}

ArgoPlugin implements the asdf.Plugin interface for Argo Workflows.

func (*ArgoPlugin) Dependencies added in v1.3.0

func (*ArgoPlugin) Dependencies() []string

Dependencies returns the list of plugins that must be installed before Argo.

func (*ArgoPlugin) Download

func (*ArgoPlugin) Download(_ context.Context, _, _ string) error

Download is a no-op for Argo since installation downloads the source archive directly.

func (*ArgoPlugin) ExecEnv

func (*ArgoPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for Argo execution.

func (*ArgoPlugin) Help

func (plugin *ArgoPlugin) Help() asdf.PluginHelp

Help returns help information for the Argo plugin.

func (*ArgoPlugin) Install

func (plugin *ArgoPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install method downloads the Argo Workflows source archive for the requested version and builds the argo CLI using go build.

func (*ArgoPlugin) LatestStable

func (plugin *ArgoPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Argo version.

func (*ArgoPlugin) ListAll

func (plugin *ArgoPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available Argo versions from GitHub tags.

func (*ArgoPlugin) ListBinPaths

func (*ArgoPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Argo installations.

func (*ArgoPlugin) ListLegacyFilenames

func (*ArgoPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Argo.

func (*ArgoPlugin) Name

func (*ArgoPlugin) Name() string

Name returns the plugin name.

func (*ArgoPlugin) ParseLegacyFile

func (*ArgoPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy version file.

func (*ArgoPlugin) Uninstall

func (*ArgoPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes an Argo installation.

type AsdfPlugin

type AsdfPlugin struct {
	*asdf.BinaryPlugin
}

AsdfPlugin implements asdf plugin functionality for asdf itself.

func (*AsdfPlugin) GetDataDir

func (*AsdfPlugin) GetDataDir() string

GetDataDir returns the asdf data directory.

func (*AsdfPlugin) GetPluginsDir

func (plugin *AsdfPlugin) GetPluginsDir() string

GetPluginsDir returns the asdf plugins directory.

func (*AsdfPlugin) GetShellConfigInstructions

func (*AsdfPlugin) GetShellConfigInstructions(shell string) string

GetShellConfigInstructions returns shell-specific configuration instructions.

func (*AsdfPlugin) GetShimsDir

func (plugin *AsdfPlugin) GetShimsDir() string

GetShimsDir returns the asdf shims directory.

func (*AsdfPlugin) Help

func (*AsdfPlugin) Help() asdf.PluginHelp

Help returns plugin help information with shell configuration instructions.

func (*AsdfPlugin) Install

func (plugin *AsdfPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs asdf to the specified path and creates the shim.

func (*AsdfPlugin) IsAsdfInPath

func (plugin *AsdfPlugin) IsAsdfInPath() bool

IsAsdfInPath checks if asdf is available in PATH.

func (*AsdfPlugin) IsAsdfInstalled

func (plugin *AsdfPlugin) IsAsdfInstalled() bool

IsAsdfInstalled checks if asdf is installed in the data directory.

type AwscliPlugin

type AwscliPlugin struct {
	// contains filtered or unexported fields
}

AwscliPlugin implements the asdf.Plugin interface for AWS CLI.

func (*AwscliPlugin) Download

func (plugin *AwscliPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the specified AWS CLI version.

func (*AwscliPlugin) ExecEnv

func (*AwscliPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for AWS CLI execution.

func (*AwscliPlugin) Help

func (*AwscliPlugin) Help() asdf.PluginHelp

Help returns help information for the AWS CLI plugin.

func (*AwscliPlugin) Install

func (plugin *AwscliPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs AWS CLI from the downloaded files.

func (*AwscliPlugin) LatestStable

func (plugin *AwscliPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable AWS CLI version.

func (*AwscliPlugin) ListAll

func (plugin *AwscliPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available AWS CLI versions.

func (*AwscliPlugin) ListBinPaths

func (*AwscliPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for AWS CLI installations.

func (*AwscliPlugin) ListLegacyFilenames

func (*AwscliPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for AWS CLI.

func (*AwscliPlugin) Name

func (*AwscliPlugin) Name() string

Name returns the plugin name.

func (*AwscliPlugin) ParseLegacyFile

func (*AwscliPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy AWS CLI version file.

func (*AwscliPlugin) Uninstall

func (*AwscliPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes an AWS CLI installation.

type GcloudPlugin

type GcloudPlugin struct {
	// contains filtered or unexported fields
}

GcloudPlugin implements the asdf.Plugin interface for Google Cloud SDK.

func (*GcloudPlugin) Dependencies added in v1.3.0

func (*GcloudPlugin) Dependencies() []string

Dependencies returns the list of plugins that must be installed before gcloud.

func (*GcloudPlugin) Download

func (plugin *GcloudPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the specified gcloud version.

func (*GcloudPlugin) ExecEnv

func (*GcloudPlugin) ExecEnv(installPath string) map[string]string

ExecEnv returns environment variables for gcloud execution.

func (*GcloudPlugin) Help

func (*GcloudPlugin) Help() asdf.PluginHelp

Help returns help information for the gcloud plugin.

func (*GcloudPlugin) Install

func (plugin *GcloudPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs gcloud from the downloaded archive.

func (*GcloudPlugin) LatestStable

func (plugin *GcloudPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable gcloud version.

func (*GcloudPlugin) ListAll

func (plugin *GcloudPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available gcloud versions.

func (*GcloudPlugin) ListBinPaths

func (*GcloudPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for gcloud installations.

func (*GcloudPlugin) ListLegacyFilenames

func (*GcloudPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for gcloud.

func (*GcloudPlugin) Name

func (*GcloudPlugin) Name() string

Name returns the plugin name.

func (*GcloudPlugin) ParseLegacyFile

func (*GcloudPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy gcloud version file.

func (*GcloudPlugin) Uninstall

func (*GcloudPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a gcloud installation.

type GinkgoPlugin

type GinkgoPlugin struct {
	*asdf.SourceBuildPlugin
}

GinkgoPlugin implements the asdf.Plugin interface for Ginkgo.

func (*GinkgoPlugin) Dependencies added in v1.3.0

func (*GinkgoPlugin) Dependencies() []string

Dependencies returns the list of plugins that must be installed before Ginkgo.

func (*GinkgoPlugin) Download

func (*GinkgoPlugin) Download(_ context.Context, _, _ string) error

Download is a no-op for Ginkgo since installation downloads the source archive directly.

func (*GinkgoPlugin) ExecEnv

func (*GinkgoPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for Ginkgo execution.

func (*GinkgoPlugin) Help

func (plugin *GinkgoPlugin) Help() asdf.PluginHelp

Help returns help information for the Ginkgo plugin.

func (*GinkgoPlugin) Install

func (plugin *GinkgoPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install downloads the Ginkgo source archive and builds the ginkgo CLI using go build.

func (*GinkgoPlugin) LatestStable

func (plugin *GinkgoPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Ginkgo version.

func (*GinkgoPlugin) ListAll

func (plugin *GinkgoPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available Ginkgo versions from GitHub tags.

func (*GinkgoPlugin) ListBinPaths

func (*GinkgoPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Ginkgo installations.

func (*GinkgoPlugin) ListLegacyFilenames

func (*GinkgoPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Ginkgo.

func (*GinkgoPlugin) Name

func (*GinkgoPlugin) Name() string

Name returns the plugin name.

func (*GinkgoPlugin) ParseLegacyFile

func (*GinkgoPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy version file.

func (*GinkgoPlugin) Uninstall

func (*GinkgoPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a Ginkgo installation.

type GolangPlugin

type GolangPlugin struct {
	*github.Client
}

GolangPlugin implements the asdf.Plugin interface for Go.

func (*GolangPlugin) Download

func (*GolangPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the specified Go version.

func (*GolangPlugin) ExecEnv

func (*GolangPlugin) ExecEnv(installPath string) map[string]string

ExecEnv returns environment variables for Go execution. Only sets variables if not already set by user.

func (*GolangPlugin) Help

func (*GolangPlugin) Help() asdf.PluginHelp

Help returns help information for the Go plugin.

func (*GolangPlugin) Install

func (plugin *GolangPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs Go from the downloaded archive.

func (*GolangPlugin) LatestStable

func (p *GolangPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Go version.

func (*GolangPlugin) ListAll

func (p *GolangPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll returns all available Go versions using the GitHub API.

func (*GolangPlugin) ListBinPaths

func (*GolangPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Go installations.

func (*GolangPlugin) ListLegacyFilenames

func (*GolangPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Go.

func (*GolangPlugin) Name

func (*GolangPlugin) Name() string

Name returns the plugin name.

func (*GolangPlugin) ParseLegacyFile

func (*GolangPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy Go version file. Supports .go-version, go.mod, and go.work files.

func (*GolangPlugin) Uninstall

func (*GolangPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a Go installation.

type NodeVersion

type NodeVersion struct {
	Version string `json:"version"`
	LTS     any    `json:"lts"`
	Date    string `json:"date"`
}

NodeVersion represents a Node.js version from the API.

type NodejsPlugin

type NodejsPlugin struct {
	// contains filtered or unexported fields
}

NodejsPlugin implements the asdf.Plugin interface for Node.js.

func (*NodejsPlugin) Download

func (plugin *NodejsPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the specified Node.js version.

func (*NodejsPlugin) ExecEnv

func (*NodejsPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for Node.js execution.

func (*NodejsPlugin) GetLTSCodenames

func (plugin *NodejsPlugin) GetLTSCodenames(ctx context.Context) (map[string]string, error)

GetLTSCodenames returns all available LTS codenames.

func (*NodejsPlugin) Help

func (*NodejsPlugin) Help() asdf.PluginHelp

Help returns help information for the Node.js plugin.

func (*NodejsPlugin) Install

func (plugin *NodejsPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs Node.js from the downloaded archive.

func (*NodejsPlugin) LatestStable

func (plugin *NodejsPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Node.js version.

func (*NodejsPlugin) ListAll

func (plugin *NodejsPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll returns all available Node.js versions.

func (*NodejsPlugin) ListAllFromGitHub

func (plugin *NodejsPlugin) ListAllFromGitHub(ctx context.Context) ([]string, error)

ListAllFromGitHub returns all available Node.js versions from GitHub releases.

func (*NodejsPlugin) ListBinPaths

func (*NodejsPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Node.js installations.

func (*NodejsPlugin) ListLegacyFilenames

func (*NodejsPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Node.js.

func (*NodejsPlugin) Name

func (*NodejsPlugin) Name() string

Name returns the plugin name.

func (*NodejsPlugin) ParseLegacyFile

func (*NodejsPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy Node.js version file.

func (*NodejsPlugin) ResolveVersion

func (plugin *NodejsPlugin) ResolveVersion(ctx context.Context, version string) (string, error)

ResolveVersion resolves a version alias (like "lts") to an actual version.

func (*NodejsPlugin) Uninstall

func (*NodejsPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a Node.js installation.

type PipxPlugin

type PipxPlugin struct {
	*asdf.SourceBuildPlugin
}

PipxPlugin implements the asdf.Plugin interface for pipx.

func (*PipxPlugin) Dependencies added in v1.3.0

func (*PipxPlugin) Dependencies() []string

Dependencies returns the list of plugins that must be installed before pipx.

func (*PipxPlugin) Download

func (*PipxPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the specified pipx version.

func (*PipxPlugin) ExecEnv

func (*PipxPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for pipx execution.

func (*PipxPlugin) Help

func (*PipxPlugin) Help() asdf.PluginHelp

Help returns help information for the pipx plugin.

func (*PipxPlugin) Install

func (p *PipxPlugin) Install(ctx context.Context, version, downloadPath, installPath string) error

Install installs pipx from the downloaded .pyz file.

func (*PipxPlugin) LatestStable

func (plugin *PipxPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable pipx version.

func (*PipxPlugin) ListAll

func (plugin *PipxPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available pipx versions.

func (*PipxPlugin) ListBinPaths

func (*PipxPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for pipx installations.

func (*PipxPlugin) ListLegacyFilenames

func (*PipxPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for pipx.

func (*PipxPlugin) Name

func (*PipxPlugin) Name() string

Name returns the plugin name.

func (*PipxPlugin) ParseLegacyFile

func (*PipxPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy pipx version file.

func (*PipxPlugin) Uninstall

func (*PipxPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a pipx installation.

type PythonPlugin

type PythonPlugin struct {
	*asdf.SourceBuildPlugin
	// contains filtered or unexported fields
}

PythonPlugin implements the asdf.Plugin interface for Python.

func (*PythonPlugin) Download

func (plugin *PythonPlugin) Download(ctx context.Context, _, _ string) error

Download ensures python-build tooling is installed.

func (*PythonPlugin) ExecEnv

func (*PythonPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for Python execution.

func (*PythonPlugin) Help

func (*PythonPlugin) Help() asdf.PluginHelp

Help returns help information for the Python plugin.

func (*PythonPlugin) Install

func (plugin *PythonPlugin) Install(ctx context.Context, version, _, installPath string) error

Install installs the specified Python version using python-build.

func (*PythonPlugin) LatestStable

func (*PythonPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Python version.

func (*PythonPlugin) ListAll

func (plugin *PythonPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll returns all available Python versions using python-build definitions.

func (*PythonPlugin) ListBinPaths

func (*PythonPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Python installations.

func (*PythonPlugin) ListLegacyFilenames

func (*PythonPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Python.

func (*PythonPlugin) Name

func (*PythonPlugin) Name() string

Name returns the plugin name.

func (*PythonPlugin) ParseLegacyFile

func (*PythonPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy Python version file.

func (*PythonPlugin) Uninstall

func (*PythonPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a Python installation.

type RustPlugin

type RustPlugin struct {
	*asdf.SourceBuildPlugin
}

RustPlugin implements the asdf.Plugin interface for Rust.

func (*RustPlugin) Download

func (*RustPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads rustup installer.

func (*RustPlugin) ExecEnv

func (*RustPlugin) ExecEnv(installPath string) map[string]string

ExecEnv returns environment variables for Rust execution.

func (*RustPlugin) Help

func (*RustPlugin) Help() asdf.PluginHelp

Help returns help information for the Rust plugin.

func (*RustPlugin) Install

func (p *RustPlugin) Install(ctx context.Context, version, downloadPath, installPath string) error

Install installs Rust using rustup via SourceBuildPlugin.

func (*RustPlugin) LatestStable

func (plugin *RustPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Rust version.

func (*RustPlugin) ListAll

func (plugin *RustPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available Rust versions.

func (*RustPlugin) ListBinPaths

func (*RustPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Rust installations.

func (*RustPlugin) ListLegacyFilenames

func (plugin *RustPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Rust.

func (*RustPlugin) Name

func (*RustPlugin) Name() string

Name returns the plugin name.

func (*RustPlugin) ParseLegacyFile

func (*RustPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy Rust version file.

func (*RustPlugin) Uninstall

func (plugin *RustPlugin) Uninstall(ctx context.Context, installPath string) error

Uninstall removes a Rust installation.

type ZigPlugin

type ZigPlugin struct {
	*asdf.SourceBuildPlugin

	ZigIndexURL string
}

ZigPlugin implements the asdf.Plugin interface for Zig.

func (*ZigPlugin) Download

func (plugin *ZigPlugin) Download(ctx context.Context, version, downloadPath string) error

Download downloads the Zig tarball.

func (*ZigPlugin) ExecEnv

func (*ZigPlugin) ExecEnv(_ string) map[string]string

ExecEnv returns environment variables for Zig execution.

func (*ZigPlugin) Help

func (*ZigPlugin) Help() asdf.PluginHelp

Help returns help information for the Zig plugin.

func (*ZigPlugin) Install

func (plugin *ZigPlugin) Install(
	ctx context.Context,
	version, downloadPath, installPath string,
) error

Install installs Zig from the downloaded tarball.

func (*ZigPlugin) LatestStable

func (plugin *ZigPlugin) LatestStable(ctx context.Context, query string) (string, error)

LatestStable returns the latest stable Zig version.

func (*ZigPlugin) ListAll

func (plugin *ZigPlugin) ListAll(ctx context.Context) ([]string, error)

ListAll lists all available Zig versions.

func (*ZigPlugin) ListBinPaths

func (*ZigPlugin) ListBinPaths() string

ListBinPaths returns the binary paths for Zig installations.

func (*ZigPlugin) ListLegacyFilenames

func (*ZigPlugin) ListLegacyFilenames() []string

ListLegacyFilenames returns legacy version filenames for Zig.

func (*ZigPlugin) Name

func (*ZigPlugin) Name() string

Name returns the plugin name.

func (*ZigPlugin) ParseLegacyFile

func (*ZigPlugin) ParseLegacyFile(path string) (string, error)

ParseLegacyFile parses a legacy version file.

func (*ZigPlugin) Uninstall

func (*ZigPlugin) Uninstall(_ context.Context, installPath string) error

Uninstall removes a Zig installation.

type ZigRelease

type ZigRelease struct {
	Tarball string `json:"tarball"`
	Shasum  string `json:"shasum"`
	Size    string `json:"size"`
}

ZigRelease represents a single platform release.

Directories

Path Synopsis
Package asdf implements the ASDF plugin interface and common shared functionality.
Package asdf implements the ASDF plugin interface and common shared functionality.
plugins
Package plugins provides a registry for asdf plugins.
Package plugins provides a registry for asdf plugins.
Package github provides a GitHub API client for fetching version information.
Package github provides a GitHub API client for fetching version information.
mock
Package mock provides mock servers for testing the GitHub client.
Package mock provides mock servers for testing the GitHub client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL