github

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const MeansTypeGitHubRelease updater.MeansType = "github-release"

Variables

View Source
var (
	// IsGitHubReleasedBinary means the app is installed by GitHub Releases.
	// The app must change this value to true to use GitHub means.
	IsGitHubReleasedBinary bool
)

Functions

func GitHubReleaseMeans

func GitHubReleaseMeans(owner, repo string, dec Decompresser) updater.MeansBuilder

GitHubReleaseMeans returns updater.MeansBuilder for GitHubReleases. if dec is nil, DefaultDecompresser is used for extract binary from the compressed file.

Types

type Decompresser

type Decompresser func(io.Reader) (io.Reader, error)
var (
	DefaultDecompresser              = TarGZIPDecompresser
	TarDecompresser     Decompresser = tarDecompresser
	TarGZIPDecompresser Decompresser = tarGZIPDecompresser
)

type GitHubClient

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

func (*GitHubClient) CommandText

func (c *GitHubClient) CommandText(v *version.Version) string

func (*GitHubClient) Installed

func (c *GitHubClient) Installed(_ context.Context) bool

func (*GitHubClient) LatestTag

func (c *GitHubClient) LatestTag(ctx context.Context) (*version.Version, error)

func (*GitHubClient) Type

func (c *GitHubClient) Type() updater.MeansType

func (*GitHubClient) Update

func (c *GitHubClient) Update(ctx context.Context, latest *version.Version) error

Jump to

Keyboard shortcuts

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