releases

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package releases manages terraform releases.

Index

Constants

View Source
const (
	DefaultTerraformVersion = "1.6.0"
	LatestVersionString     = "latest"
)

Variables

This section is empty.

Functions

func NewDownloader

func NewDownloader(destdir string) *downloader

NewDownloader constructs a terraform downloader, with destdir set as the parent directory into which the binaries are downloaded. Pass an empty string to use a default.

func NewService

func NewService(opts Options) *service

Types

type Downloader

type Downloader interface {
	// Download a terraform release with the given version and log progress
	// updates to logger. Once complete, the path to the release executable
	// is returned.
	Download(ctx context.Context, version string, w io.Writer) (string, error)
}

type Options

type Options struct {
	logr.Logger
	*sql.DB

	TerraformBinDir string // destination directory for terraform binaries
}

type ReleasesService

type ReleasesService = Service

type Service

type Service interface {
	// GetLatest returns the latest version of terraform along with the
	// time when the latest version was last determined.
	GetLatest(ctx context.Context) (string, time.Time, error)

	Downloader
}

Jump to

Keyboard shortcuts

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