tool

package
v0.0.0-...-bd4c8a3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultChannel = Channel("")
View Source
const NullVersion = Version("")

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel string

Channel is an opaque identifier to represent a specific tool distribution channel. This defines the granularity at which upstream versions are tracked and updated.

Channel can be used, for instance, to distinguish between stable and pre-release channels, or between branches in a git repository.

type Checkout

type Checkout interface {
	// Path returns the filesystem path for the checkout.
	Path() string

	// Version returns the version of the tool in the checkout.
	Version() Version
}

Checkout represents a materialization of a specific version of a tool in the filesystem.

type Getter

type Getter interface {
	FetchLatest() (Version, error)
	FetchVersion(version Version) error

	CheckoutTo(version Version, path string) error
}

type Runner

type Runner interface {
	Setup(checkout Checkout) error
	Run(checkout Checkout, name string, args []string) error
}

type UpdateFrequency

type UpdateFrequency int
const (
	UpdateDefault UpdateFrequency = iota
	UpdateDaily
	UpdateWeekly
	UpdateMonthly

	UpdateAlways UpdateFrequency = -1
	UpdateNever  UpdateFrequency = -2
)

func UpdateFrequencyFromString

func UpdateFrequencyFromString(value string) UpdateFrequency

func (UpdateFrequency) Combine

func (uf UpdateFrequency) Combine(otherUF ...UpdateFrequency) UpdateFrequency

func (UpdateFrequency) IsTimeToUpdate

func (uf UpdateFrequency) IsTimeToUpdate(lastUpdate time.Time) bool

func (UpdateFrequency) String

func (uf UpdateFrequency) String() string

func (*UpdateFrequency) UnmarshalYAML

func (uf *UpdateFrequency) UnmarshalYAML(unmarshal func(interface{}) error) error

type Version

type Version string

ToolVersion represents a specific version of a tool, independent of distribution channels.

Jump to

Keyboard shortcuts

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