config

package
v0.0.0-...-e9ebc2b Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadRelease

func DownloadRelease(ctx context.Context, os, arch string, isLargeDisk, isFull bool, destination string, ver string) (version string, err error)

Types

type Asset

type Asset struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
}

Asset is a file uploaded and attached to a release.

type Release

type Release struct {
	Name        string    `json:"name"`
	TagName     string    `json:"tag_name"`
	Draft       bool      `json:"draft"`
	PreRelease  bool      `json:"prerelease"`
	PublishedAt time.Time `json:"published_at"`
	Assets      []Asset   `json:"assets"`

	Version string `json:"-"` // set manually in the code
}

Release collects data about a single release on GitHub.

func GitHubLatestRelease

func GitHubLatestRelease(ctx context.Context, ver string, owner, repo string) (Release, error)

GitHubLatestRelease uses the GitHub API to get information about the specific release of a repository.

Jump to

Keyboard shortcuts

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