search

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: BSD-2-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProgramCe = "tarantool"
	ProgramEe = "tarantool-ee"
	ProgramTt = "tt"
)
View Source
const (
	GitRepoTarantool = "https://github.com/tarantool/tarantool.git"
	GitRepoTT        = "https://github.com/tarantool/tt.git"
)

Variables

This section is empty.

Functions

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.

Types

type BundleInfo added in v1.0.0

type BundleInfo struct {
	// Version represents the info about the bundle's version.
	Version version.Version
	// Prefix represents the relative URL of the bundle.
	Prefix 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,
	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. If the passed expected version is an empty string, it will return the latest release version.

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 {
	// Dbg is set if debug builds of tarantool-ee must be included in the result of search.
	Dbg bool
	// Dev is set if dev builds of tarantool-ee must be included in the result of search.
	Dev bool
}

SearchCtx contains information for programs searching.

Jump to

Keyboard shortcuts

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