helpers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VirtualenvName

func VirtualenvName(proj *project.Project, version string) string

Types

type Github added in v0.2.0

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

func NewGithub added in v0.2.0

func NewGithub(cfg *config.Config) (g *Github)

func NewGithubWithClient added in v0.2.0

func NewGithubWithClient(cfg *config.Config, client *http.Client) (g *Github)

func (*Github) Get added in v0.2.0

func (g *Github) Get(url string) (data []byte, err error)

Get download the content at `url`

func (*Github) LatestRelease added in v0.2.0

func (g *Github) LatestRelease(plateform string) (*GithubReleaseItem, error)

LatestRelease get latest release url for a specific `platform`

type GithubReleaseItem added in v0.2.0

type GithubReleaseItem struct {
	Plateform   string `json:"name"`
	DownloadURL string `json:"browser_download_url"`
}

type GithubReleaseList added in v0.2.0

type GithubReleaseList struct {
	TagName string              `json:"tag_name"`
	Items   []GithubReleaseItem `json:"assets"`
}

type Golang added in v0.1.0

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

func NewGolang added in v0.1.0

func NewGolang(cfg *config.Config, version string) *Golang

func (*Golang) BinPath added in v0.1.0

func (g *Golang) BinPath() string

func (*Golang) Exists added in v0.1.0

func (g *Golang) Exists() bool

func (*Golang) Install added in v0.1.0

func (g *Golang) Install() (err error)

func (*Golang) Path added in v0.1.0

func (g *Golang) Path() string

func (*Golang) Which added in v0.2.0

func (g *Golang) Which(program string) string

type PyEnv

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

func NewPyEnv

func NewPyEnv(cfg *config.Config) (*PyEnv, error)

func (*PyEnv) VersionInstalled

func (p *PyEnv) VersionInstalled(version string) (installed bool, err error)

func (*PyEnv) Which

func (p *PyEnv) Which(version string, command string) string

type Upgrader added in v0.2.0

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

func NewUpgrader added in v0.2.0

func NewUpgrader(cfg *config.Config, useSudo bool) (u *Upgrader)

NewUpgrader returns a new upgrade helper using the default http client

func NewUpgraderWithHTTPClient added in v0.2.0

func NewUpgraderWithHTTPClient(cfg *config.Config, client *http.Client, useSudo bool) (u *Upgrader)

NewUpgraderWithHTTPClient returns a new upgrade helper using the provided http client

func (*Upgrader) LatestRelease added in v0.2.0

func (u *Upgrader) LatestRelease(plateform string) (release *GithubReleaseItem, err error)

LatestRelease get latest release item for current platform

func (*Upgrader) Perform added in v0.2.0

func (u *Upgrader) Perform(destinationPath string, sourceURL string) (err error)

Perform is fetching a new executable from `release`

and upgrading the executable at `destinationPath` with it

type Virtualenv

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

func NewVirtualenv

func NewVirtualenv(cfg *config.Config, name string) *Virtualenv

func (*Virtualenv) BinPath

func (v *Virtualenv) BinPath() string

func (*Virtualenv) Exists

func (v *Virtualenv) Exists() bool

func (*Virtualenv) Path

func (v *Virtualenv) Path() string

func (*Virtualenv) Which added in v0.0.7

func (v *Virtualenv) Which(cmd string) string

Jump to

Keyboard shortcuts

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