github

package
v0.8.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FlytectlReleaseConfig = &updater.Updater{
	Provider: &provider.Github{
		RepositoryURL: flytectlRepository,
		ArchiveName:   getFlytectlAssetName(),
	},
	ExecutableName: flytectl,
	Version:        stdlibversion.Version,
}

FlytectlReleaseConfig represent the updater config for flytectl binary

Functions

func CheckBrewInstall

func CheckBrewInstall(goos platformutil.Platform) (string, error)

CheckBrewInstall returns the path of symlink if flytectl is installed from brew

func GetAssetFromRelease

func GetAssetFromRelease(tag, assetName, repoName string, g GHRepoService) (*github.ReleaseAsset, error)

GetAssetFromRelease returns the asset using assetName from github release with tag

func GetCommitSHA1

func GetCommitSHA1(repoName, version string, g GHRepoService) (string, error)

GetCommitSHA1 returns sha hash against the version

func GetFullyQualifiedImageName

func GetFullyQualifiedImageName(prefix, version, image string, pre bool, g GHRepoService) (string, string, error)

func GetLatestRelease

func GetLatestRelease(repoName string, g GHRepoService) (*github.RepositoryRelease, error)

GetLatestRelease returns the latest non-prerelease version of provided repoName, as described in https://docs.github.com/en/rest/reference/releases#get-the-latest-release

func GetReleaseByTag

func GetReleaseByTag(repoName, tag string, g GHRepoService) (*github.RepositoryRelease, error)

GetReleaseByTag returns the provided tag release if tag exist in repository

func GetSandboxImageSha

func GetSandboxImageSha(tag string, pre bool, g GHRepoService) (string, string, error)

GetSandboxImageSha returns the sha as per input

func GetUpgradeMessage

func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error)

GetUpgradeMessage return the upgrade message

func ListReleases

func ListReleases(repoName string, g GHRepoService) ([]*github.RepositoryRelease, error)

ListReleases returns the list of release of provided repoName

Types

type GHRepoService

type GHRepoService interface {
	GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)
	ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
	GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*github.RepositoryRelease, *github.Response, error)
	GetCommitSHA1(ctx context.Context, owner, repo, ref, lastSHA string) (string, *github.Response, error)
}
var Client GHRepoService

func GetGHRepoService

func GetGHRepoService() GHRepoService

GetGHRepoService returns the initialized github repo service client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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