search

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProgramCe  = "tarantool"
	ProgramEe  = "tarantool-ee"
	ProgramTt  = "tt"
	ProgramDev = "tarantool-dev"
)
View Source
const (
	GitRepoTarantool = "https://github.com/tarantool/tarantool.git"
	GitRepoTT        = "https://github.com/tarantool/tt.git"
)
View Source
const ApiURI = TntIoURI + "/api"
View Source
const PkgURI = TntIoURI + "/packages"
View Source
const TntIoURI = "https://www.tarantool.io/en/accounts/customer_zone"

Variables

This section is empty.

Functions

func GetCommitFromGitLocal added in v1.3.0

func GetCommitFromGitLocal(repo string, input string) (string, error)

GetCommitFromGitLocal returns hash or pr/ID info from specified local git repo.

func GetCommitFromGitRemote added in v1.3.0

func GetCommitFromGitRemote(repo string, input string) (string, error)

GetCommitFromGitRemote returns hash or pr/ID info from specified remote git repo.

func GetVersionsFromGitLocal

func GetVersionsFromGitLocal(repo string) ([]version.Version, error)

GetVersionsFromGitLocal returns sorted versions list from specified local git repo.

func GetVersionsFromGitRemote

func GetVersionsFromGitRemote(repo string) ([]version.Version, error)

GetVersionsFromGitRemote returns sorted versions list from specified remote git repo.

func Less added in v1.0.0

func Less(verLeft, verRight version.Version) bool

Less is a common function-comparator using for the Version type.

func RunCommandAndGetOutputInDir

func RunCommandAndGetOutputInDir(program string, dir string, args ...string) (string, error)

RunCommandAndGetOutputInDir returns output of command.

func SearchVersions

func SearchVersions(cmdCtx *cmdcontext.CmdCtx, searchCtx SearchCtx,
	cliOpts *config.CliOpts, program string) error

SearchVersions outputs available versions of program.

func SearchVersionsLocal

func SearchVersionsLocal(cmdCtx *cmdcontext.CmdCtx, cliOpts *config.CliOpts, program string) error

SearchVersionsLocal outputs available versions of program from distfiles directory.

func TntIoMakePkgURI added in v1.1.0

func TntIoMakePkgURI(Package string, Release string, Tarball string) (string, error)

TntIoMakePkgURI generates a URI for downloading a package.

Types

type BundleInfo added in v1.0.0

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 is a structure that contains specific information about SDK bundle.

func FetchBundlesInfo added in v1.0.0

func FetchBundlesInfo(searchCtx SearchCtx, cliOpts *config.CliOpts) ([]BundleInfo,
	string, error)

FetchBundlesInfo returns slice of information about all available tarantool-ee bundles. The result will be sorted in ascending order.

func FetchBundlesInfoLocal added in v1.0.0

func FetchBundlesInfoLocal(files []string) ([]BundleInfo, error)

FetchBundlesInfoLocal returns slice of information about all tarantool-ee bundles available locally. The result will be sorted in ascending order.

func GetTarantoolBundleInfo added in v1.0.0

func GetTarantoolBundleInfo(cliOpts *config.CliOpts, local bool,
	files []string, expectedVersion string) (BundleInfo, error)

GetTarantoolBundleInfo returns the available EE SDK bundle for user's OS, corresponding to the passed expected version argument.

type BundleInfoSlice added in v1.0.0

type BundleInfoSlice []BundleInfo

BundleInfoSlice attaches the methods of sort.Interface to []Version, sorting from oldest to newest.

func (BundleInfoSlice) Len added in v1.0.0

func (bundles BundleInfoSlice) Len() int

sort.Interface Len implementation

func (BundleInfoSlice) Less added in v1.0.0

func (bundles BundleInfoSlice) Less(i, j int) bool

sort.Interface Less implementation

func (BundleInfoSlice) Swap added in v1.0.0

func (bundles BundleInfoSlice) Swap(i, j int)

sort.Interface Swap implementation

type SearchCtx added in v1.0.0

type SearchCtx struct {
	// Filter out which builds of tarantool-ee must be included in the result of search.
	Filter SearchFlags
	// What package to look for.
	Package string
	// Release version to look for.
	ReleaseVersion string
	// Program name
	ProgramName string
}

SearchCtx contains information for programs searching.

type SearchFlags added in v1.1.0

type SearchFlags int64
const (
	SearchRelease SearchFlags = iota
	SearchDebug
	SearchAll
)

Jump to

Keyboard shortcuts

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