Documentation
¶
Index ¶
- Constants
- func GetAPIPackage(program binary.Program) string
- func GetCommitFromGitLocal(repo, ref string) (string, error)
- func GetCommitFromGitRemote(repo, ref string) (string, error)
- func GetPullRequestCommitFromGitLocal(repo, pullRequestID string) (string, error)
- func GetPullRequestCommitFromGitRemote(repo, pullRequestID string) (string, error)
- func GetVersionsFromGitLocal(repo string, program binary.Program) (version.VersionSlice, error)
- func GetVersionsFromGitRemote(repo string) (version.VersionSlice, error)
- func Less(verLeft, verRight version.Version) bool
- func NewPlatformInformer() *realInfo
- func NewTntIoDoer() *httpDoer
- func SearchVersions(searchCtx SearchCtx) error
- func SearchVersionsLocal(searchCtx SearchCtx) error
- func TntIoMakePkgURI(searchCtx *SearchCtx, tarball string) (string, error)
- type BundleInfo
- type BundleInfoSlice
- type PlatformInformer
- type SearchCtx
- type SearchFlags
Constants ¶
const ( TntIoURI = "https://www.tarantool.io/en/accounts/customer_zone" APIURI = TntIoURI + "/api" PkgURI = TntIoURI + "/packages" )
Variables ¶
This section is empty.
Functions ¶
func GetAPIPackage ¶
GetAPIPackage returns the package name at tarantool.io for the given program.
func GetCommitFromGitLocal ¶
GetCommitFromGitLocal reads the revision reported by git show without fetching. For an annotated tag object, git show reports the tag name before the commit.
func GetCommitFromGitRemote ¶
GetCommitFromGitRemote clones the remote repository and resolves a commit, tag or branch.
func GetPullRequestCommitFromGitLocal ¶
GetPullRequestCommitFromGitLocal fetches the pull request and resolves its head commit.
func GetPullRequestCommitFromGitRemote ¶
GetPullRequestCommitFromGitRemote clones the repository and fetches the pull request's head.
func GetVersionsFromGitLocal ¶
GetVersionsFromGitLocal returns sorted versions list from specified local git repo.
func GetVersionsFromGitRemote ¶
func GetVersionsFromGitRemote(repo string) (version.VersionSlice, error)
GetVersionsFromGitRemote returns sorted versions list from specified remote git repo.
func NewPlatformInformer ¶
func NewPlatformInformer() *realInfo
func NewTntIoDoer ¶
func NewTntIoDoer() *httpDoer
func SearchVersions ¶
SearchVersions outputs available versions of program.
func SearchVersionsLocal ¶
SearchVersionsLocal outputs available versions of program found locally.
Types ¶
type BundleInfo ¶
type BundleInfo struct {
// Version represents the info about the bundle's version.
Version version.Version
// Package represents package name.
Package string
// Release represents the release version (e.g: 2.10).
Release string
// Download token.
Token string
}
BundleInfo contains the version and download information of an archive.
func SelectVersion ¶
func SelectVersion(bundles BundleInfoSlice, ver string) (BundleInfo, error)
SelectVersion selects a specific version from the list of available bundles. If no version is specified, it returns the latest version.
type BundleInfoSlice ¶
type BundleInfoSlice []BundleInfo
BundleInfoSlice attaches the methods of sort.Interface to []Version, sorting from oldest to newest.
func FetchBundlesInfo ¶
func FetchBundlesInfo(searchCtx *SearchCtx) ( BundleInfoSlice, error, )
FetchBundlesInfo returns available product archives in ascending version order.
func FindLocalBundles ¶
FindLocalBundles finds and parses local product archives.
func (BundleInfoSlice) Len ¶
func (bundles BundleInfoSlice) Len() int
Len implements sort.Interface.
func (BundleInfoSlice) Less ¶
func (bundles BundleInfoSlice) Less(i, j int) bool
Less implements sort.Interface.
func (BundleInfoSlice) Swap ¶
func (bundles BundleInfoSlice) Swap(i, j int)
Swap implements sort.Interface.
type PlatformInformer ¶
type PlatformInformer interface {
// GetOs returns the operating system type.
GetOs() (binary.OsType, error)
// GetArch returns the architecture type.
GetArch() (string, error)
}
PlatformInformer is an interface that provides methods to get platform information.
type SearchCtx ¶
type SearchCtx struct {
binary.BinaryContext
// LocalRepo is the source directory: --local-repo for Git repositories,
// or --local-dir for SDK or standalone archives.
LocalRepo string
// CredentialsFile contains customer-zone credentials for remote EE and TCM searches.
CredentialsFile string
// Debug includes debug builds instead of release builds.
Debug bool
// Filter out which builds of tarantool-ee must be included in the result of search.
Filter SearchFlags
// What package to look for.
// FIXME: It looks like this is not needed here, as it is then auto filled via [GetApiPackage].
Package string
// Release version to look for.
ReleaseVersion string
// Search for development builds.
DevBuilds bool
// TntIoDoer tarantool.io API handler with interface of TntIoDoer.
TntIoDoer binary.TntIoDoer
// contains filtered or unexported fields
}
SearchCtx contains information for programs searching.
func NewSearchCtx ¶
func NewSearchCtx(informer PlatformInformer, doer binary.TntIoDoer) SearchCtx
NewSearchCtx creates a new SearchCtx with default production values.
type SearchFlags ¶
type SearchFlags int64
const ( SearchRelease SearchFlags = iota SearchDebug SearchAll )