Documentation
¶
Index ¶
- Constants
- func GetBinaryPath() string
- func GetBody(url string) (string, error)
- func GetGitRootDirectory() (string, error)
- func GithubLatest(b *Binary) (string, error)
- type Binary
- func (b *Binary) BinaryExists() bool
- func (b *Binary) BinaryPath() string
- func (b *Binary) Cmd(args ...string) *exec.Cmd
- func (b *Binary) DownloadBinary() error
- func (b *Binary) EnsureBinary(update bool) error
- func (b *Binary) Env() []string
- func (b *Binary) Exec(args ...string) (string, error)
- func (b *Binary) LocalBinary() *LocalBinary
- type Callback
- type IsBinary
- type LocalBinary
Constants ¶
View Source
const (
GithubLatestURL = "https://github.com/%s/releases/latest"
)
Variables ¶
This section is empty.
Functions ¶
func GetBinaryPath ¶
func GetBinaryPath() string
func GetGitRootDirectory ¶
func GithubLatest ¶
Types ¶
type Binary ¶
type Binary struct {
Context context.Context `json:"-"`
// for installation
URL string `json:"-"`
URLF Callback `json:"-"`
GitHubRepo string `json:"repo"`
GitHubFile string `json:"-"`
GitHubFileF Callback `json:"-"`
Version string `json:"-"`
VersionF Callback `json:"-"`
VersionLocalF Callback `json:"-"`
Name string `json:"name" yaml:"name"`
File string `json:"-"`
IsTarGz bool `json:"-"`
IsZip bool `json:"-"`
TarFile string `json:"-"`
TarFileF Callback `json:"-"`
Tracker *pretty.Tracker `json:"-"`
Writer *pwrap.Writer `json:"-"`
// for execution
Envs map[string]string `json:"-"`
}
func (*Binary) BinaryExists ¶
func (*Binary) BinaryPath ¶
func (*Binary) DownloadBinary ¶
func (*Binary) EnsureBinary ¶
func (*Binary) LocalBinary ¶
func (b *Binary) LocalBinary() *LocalBinary
type IsBinary ¶
type IsBinary interface {
EnsureBinary(bool) error
LocalBinary() *LocalBinary
}
Click to show internal directories.
Click to hide internal directories.