github

package
v0.0.0-...-3ac216a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package github provides a library for downloading release assets from GitHub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decompress

func Decompress(archiveStream io.ReadCloser, filename, findPattern, writeToBin string) (string, error)

func DownloadStream

func DownloadStream(archiveStream io.ReadCloser, filename, findPattern, writeToBin string) (string, error)

func GetAssetStream

func GetAssetStream(
	client *gh.Client,
	ownerRepo []string,
	release *gh.RepositoryRelease,
	pattern string,
) (archiveStream io.ReadCloser, name string, err error)

func GetLatestRelease

func GetLatestRelease(client *gh.Client, owner, repo string) (*gh.RepositoryRelease, error)

func GetLatestTag

func GetLatestTag(client *gh.Client, owner, repo, constraint string) (*version.Version, error)

func GetReleaseVersion

func GetReleaseVersion(client *gh.Client, owner, repo, tag string) (*gh.RepositoryRelease, error)

func InvertTag

func InvertTag(tag string) string

func NewClient

func NewClient(input *NewClientInput) (*gh.Client, error)

func ParseDomain

func ParseDomain(domain string) (
	apiEndpoint,
	uploadEndpoint string,
	subdomainIsolation bool,
)

func RemoveVFromTag

func RemoveVFromTag(tag string) string

Types

type NewClientInput

type NewClientInput struct {
	Endpoint string
	Token    string
}

Jump to

Keyboard shortcuts

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