version_checker

package
v0.0.0-...-b4ab8a9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(
	t testing.TestingT,
	params CheckVersionParams)

CheckVersion checks whether the given Binary version is greater than or equal to the given expected version and fails if it's not.

func CheckVersionE

func CheckVersionE(
	t testing.TestingT,
	params CheckVersionParams) error

CheckVersionE checks whether the given Binary version is greater than or equal to the given expected version.

Types

type CheckVersionParams

type CheckVersionParams struct {
	// BinaryPath is a path to the binary you want to check the version for.
	BinaryPath string
	// Binary is the name of the binary you want to check the version for.
	Binary VersionCheckerBinary
	// VersionConstraint is a string literal containing one or more conditions, which are separated by commas.
	// More information here:https://www.terraform.io/language/expressions/version-constraints
	VersionConstraint string
	// WorkingDir is a directory you want to run the shell command.
	WorkingDir string
}

type VersionCheckerBinary

type VersionCheckerBinary int

VersionCheckerBinary is an enum for supported version checking.

const (
	Docker VersionCheckerBinary = iota
	Terraform
	Packer
)

List of binaries supported for version checking.

type VersionMismatchErr

type VersionMismatchErr struct {
	// contains filtered or unexported fields
}

VersionMismatchErr is an error to indicate version mismatch.

func (*VersionMismatchErr) Error

func (r *VersionMismatchErr) Error() string

Jump to

Keyboard shortcuts

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