github

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// Owner specifies the organization or user this tool belongs to
	Owner string

	// Repo specifies the repository of the tool
	Repo string
	// contains filtered or unexported fields
}

func NewSource

func NewSource(owner, repo string) *Source

func (Source) DownloadReleaseAssets

func (s Source) DownloadReleaseAssets(assets []*github.ReleaseAsset, dir string) error

DownloadReleaseAssets downloads the provided GitHub release assets and stores them in the given directory. The resulting files will match the assets' names

func (Source) FetchLatestRelease

func (s Source) FetchLatestRelease() (*github.RepositoryRelease, error)

FetchLatestRelease returns the latest release of the tool from GitHub

func (Source) FetchLatestTag

func (s Source) FetchLatestTag() (string, error)

FetchTags returns the latest tag FetchLatestTag returns the latest tag

func (Source) FetchRelease

func (s Source) FetchRelease(releaseID int64) (*github.RepositoryRelease, error)

FetchRelease returns the specified release of the tool from GitHub

func (Source) ListReleases

func (s Source) ListReleases(opts *github.ListOptions) ([]*github.RepositoryRelease, error)

ListReleases returns all releases of the tool from GitHub

Jump to

Keyboard shortcuts

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