release

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	FileName string
	URL      string
	OS       string
	Arch     string
}

type Assets

type Assets []*Asset

func (Assets) FindURLByOsArch

func (a Assets) FindURLByOsArch(os, arch string) string

type GithubClient

type GithubClient struct {
	Client *github.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) *GithubClient

func (*GithubClient) GetAllReleases

func (c *GithubClient) GetAllReleases(ctx context.Context, owner, repo string) (Releases, error)

func (*GithubClient) GetAllVersions

func (c *GithubClient) GetAllVersions(ctx context.Context, prefix, owner, repo string) ([]string, error)

func (*GithubClient) GetGoVersions

func (c *GithubClient) GetGoVersions(ctx context.Context) ([]string, error)

func (*GithubClient) GetLatestDownloadUrl

func (c *GithubClient) GetLatestDownloadUrl(ctx context.Context, owner, repo, os, arch string) (string, error)

func (*GithubClient) GetLatestRelease

func (c *GithubClient) GetLatestRelease(ctx context.Context, owner, repo string) (*Release, error)

func (*GithubClient) GetMatchingDownloadUrl

func (c *GithubClient) GetMatchingDownloadUrl(ctx context.Context, owner, repo, os, arch, constraint string) (string, error)

type Release

type Release struct {
	Version    *semver.Version
	Draft      bool
	Prerelease bool
	Assets     Assets
}

type Releases

type Releases []*Release

func (Releases) FindSatisfying

func (r Releases) FindSatisfying(constraint *semver.Constraints) *Release

func (Releases) Len

func (r Releases) Len() int

func (Releases) Less

func (r Releases) Less(i, j int) bool

func (Releases) Swap

func (r Releases) Swap(i, j int)

func (Releases) WithoutDraftsOrPrereleases

func (r Releases) WithoutDraftsOrPrereleases() Releases

Jump to

Keyboard shortcuts

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