version

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMinorVersionString

func GetMinorVersionString() string

GetMinorVersionString returns `client-major.minor` for burrow without a receiver, or for the version called on. MakeMinorVersionString builds the same version string with provided parameters.

func GetSemanticVersionString added in v0.17.1

func GetSemanticVersionString() string

Return the plain version string without the ClientIdentifier

func GetVersion

func GetVersion() (client string, major, minor, patch uint8)

GetVersion returns a tuple of client, major, minor, and patch as types, either for burrow without a receiver or the called version structure.

func GetVersionString

func GetVersionString() string

GetVersionString returns `client-major.minor.patch` for burrow without a receiver, or for the version called on. MakeVersionString builds the same version string with provided parameters.

func MakeMinorVersionString

func MakeMinorVersionString(client string, major, minor, patch int) string

note: similar remark applies here on the use of `int` over `uint8` for the arguments as above for MakeVersionString()

func MakeVersionString

func MakeVersionString(client string, major, minor, patch int) string

note: the arguments are passed in as int (rather than uint8) because on asserting the version constructed from the configuration file the casting of an int to uint8 is uglier than expanding the type range here. Should the configuration file have an invalid integer (that could not convert) then this will equally be reflected in a failed assertion of the version string.

func MatchesMinorVersion

func MatchesMinorVersion(referenceVersion *VersionIdentifier) bool

MatchesMinorVersion matches the client identifier, major and minor version number of the reference version identifier to be equal with the receivers.

Types

type VersionIdentifier

type VersionIdentifier struct {
	ClientIdentifier string
	MajorVersion     uint8
	MinorVersion     uint8
	PatchVersion     uint8
}

func GetBurrowVersion added in v0.17.0

func GetBurrowVersion() *VersionIdentifier

func New

func New(client string, major, minor, patch uint8) *VersionIdentifier

func (*VersionIdentifier) GetMinorVersionString

func (v *VersionIdentifier) GetMinorVersionString() string

func (*VersionIdentifier) GetSemanticVersionString added in v0.17.1

func (v *VersionIdentifier) GetSemanticVersionString() string

func (*VersionIdentifier) GetVersion

func (version *VersionIdentifier) GetVersion() (
	client string, major, minor, patch uint8)

func (*VersionIdentifier) GetVersionString

func (v *VersionIdentifier) GetVersionString() string

func (*VersionIdentifier) MatchesMinorVersion

func (version *VersionIdentifier) MatchesMinorVersion(
	referenceVersion *VersionIdentifier) bool

Jump to

Keyboard shortcuts

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