Documentation ¶
Index ¶
- Constants
- type GHCRAuth
- type GitHub
- func (s *GitHub) FindRelease(ctx context.Context) error
- func (s *GitHub) FindReleaseAsset() (*GitHubAsset, error)
- func (s *GitHub) GetApp() string
- func (s *GitHub) GetDownloadsDir() string
- func (s *GitHub) GetID() string
- func (s *GitHub) GetOwner() string
- func (s *GitHub) GetReleaseAssets(ctx context.Context) error
- func (s *GitHub) GetRepo() string
- func (s *GitHub) GetSource() string
- func (s *GitHub) Run(ctx context.Context, _, _ string) error
- type GitHubAsset
- type GitLab
- type GitLabAsset
- type Hashicorp
- type HashicorpAsset
- type Homebrew
- type HomebrewAsset
- type ISource
- type Options
- type Source
Constants ¶
View Source
const HashicorpSource = "hashicorp"
View Source
const HomebrewSource = "homebrew"
View Source
const (
VersionLatest = "latest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHub ¶
type GitHub struct { Source Version string // Version to find for installation Owner string // Owner of the repository Repo string // Repository name Release *github.RepositoryRelease Assets []*GitHubAsset // contains filtered or unexported fields }
func (*GitHub) FindRelease ¶
FindRelease - query API to find the version being sought or return an error
func (*GitHub) FindReleaseAsset ¶
func (s *GitHub) FindReleaseAsset() (*GitHubAsset, error)
FindReleaseAsset - find the asset that matches the current OS and Arch, if multiple matches are found it will attempt to find the best match based on the suffix for the appropriate OS. If no match is found an error is returned.
func (*GitHub) GetDownloadsDir ¶ added in v1.0.1
type GitHubAsset ¶ added in v1.0.1
type GitHubAsset struct { *asset.Asset GitHub *GitHub ReleaseAsset *github.ReleaseAsset }
func (*GitHubAsset) Download ¶ added in v1.0.1
func (a *GitHubAsset) Download(ctx context.Context) error
func (*GitHubAsset) ID ¶ added in v1.0.1
func (a *GitHubAsset) ID() string
type GitLab ¶
type GitLab struct { Source Owner string Repo string Version string Release *gitlab.Release Assets []*GitLabAsset // contains filtered or unexported fields }
func (*GitLab) GetDownloadsDir ¶ added in v1.0.1
type GitLabAsset ¶ added in v1.0.1
func (*GitLabAsset) Download ¶ added in v1.0.1
func (a *GitLabAsset) Download(ctx context.Context) error
func (*GitLabAsset) ID ¶ added in v1.0.1
func (a *GitLabAsset) ID() string
type Hashicorp ¶
type Hashicorp struct { Source Owner string Repo string Version string Assets []*HashicorpAsset // contains filtered or unexported fields }
func (*Hashicorp) GetDownloadsDir ¶ added in v1.0.1
type HashicorpAsset ¶ added in v1.0.1
type HashicorpAsset struct { *asset.Asset Hashicorp *Hashicorp Build *hashicorp.Build Release *hashicorp.Release }
func (*HashicorpAsset) Download ¶ added in v1.0.1
func (a *HashicorpAsset) Download(ctx context.Context) error
func (*HashicorpAsset) ID ¶ added in v1.0.1
func (a *HashicorpAsset) ID() string
type Homebrew ¶
type Homebrew struct { Source Formula string Version string Assets []*HomebrewAsset // contains filtered or unexported fields }
func (*Homebrew) GetDownloadsDir ¶ added in v1.0.1
type HomebrewAsset ¶ added in v1.0.1
type HomebrewAsset struct { *asset.Asset Homebrew *Homebrew FileVariant *homebrew.FileVariant }
func (*HomebrewAsset) Download ¶ added in v1.0.1
func (a *HomebrewAsset) Download(ctx context.Context) error
func (*HomebrewAsset) ID ¶ added in v1.0.1
func (a *HomebrewAsset) ID() string
type ISource ¶
Click to show internal directories.
Click to hide internal directories.