Documentation ¶
Index ¶
- Variables
- func CheckBrewInstall(goos platformutil.Platform) (string, error)
- func GetAssetFromRelease(tag, assetName, repoName string, g GHRepoService) (*github.ReleaseAsset, error)
- func GetCommitSHA1(repoName, version string, g GHRepoService) (string, error)
- func GetFullyQualifiedImageName(prefix, version, image string, pre bool, g GHRepoService) (string, string, error)
- func GetLatestRelease(repoName string, g GHRepoService) (*github.RepositoryRelease, error)
- func GetReleaseByTag(repoName, tag string, g GHRepoService) (*github.RepositoryRelease, error)
- func GetSandboxImageSha(tag string, pre bool, g GHRepoService) (string, string, error)
- func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error)
- func ListReleases(repoName string, g GHRepoService) ([]*github.RepositoryRelease, error)
- type GHRepoService
Constants ¶
This section is empty.
Variables ¶
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 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 ¶
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.