tvm

package
v0.0.0-...-a16ed4d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package tvm stands for Terraform version manager. It will automatically download and manage multiple Terraform binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InspectVersion

func InspectVersion(binaryPath string) (*version.Version, error)

InspectVersion will find out what version the Terraform binary at the given location is.

Types

type VersionRepo

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

VersionRepo is a directory on the filesystem that keeps Terraform binaries.

func NewVersionRepo

func NewVersionRepo(repoPath string, arch string, platform string) (*VersionRepo, error)

NewVersionRepo creates a new VersionRepo. The arch will be appended to the provided path for all downloaded binaries.

func NewVersionRepoForCurrentSystem

func NewVersionRepoForCurrentSystem(repoPath string) (*VersionRepo, error)

NewVersionRepoForCurrentSystem returns a new VersionRepo instance with platform and architecture information retrieve from the current system.

func (*VersionRepo) Get

func (r *VersionRepo) Get(version string) (string, error)

Get takes a version and returns the path to the Terraform binary for that version. If the binary doesn't exist, it will be downloaded from the Terraform website automatically.

func (r *VersionRepo) Link(version string, targetPath string, overwrite bool) error

Link symlinks the version binary into the targetPath. It will download the binary if the version does not exist in the repository.

func (*VersionRepo) List

func (r *VersionRepo) List() (map[string]string, error)

List returns all locally downloaded Terraform versions and their paths.

Directories

Path Synopsis
cli
tvm

Jump to

Keyboard shortcuts

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