cosmosver

package
v0.0.0-...-7149754 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxLaunchpadVersion           = newVersion("0.39.99", Launchpad)
	StargateFortyVersion          = newVersion("0.40.0", Stargate)
	StargateFortyFourVersion      = newVersion("0.44.0-alpha", Stargate)
	StargateFortyFiveThreeVersion = newVersion("0.45.3", Stargate)
)
View Source
var (
	// Versions is a list of known, sorted Cosmos-SDK versions.
	Versions = []Version{
		MaxLaunchpadVersion,
		StargateFortyVersion,
		StargateFortyFourVersion,
	}

	// Latest is the latest known version of the Cosmos-SDK.
	Latest = Versions[len(Versions)-1]
)

Functions

This section is empty.

Types

type Family

type Family string

Family represents the family(named versions) of Cosmos-SDK.

const (
	// Launchpad represents the launchpad family of Cosmos-SDK.
	Launchpad Family = "launchpad"

	// Stargate represents the stargate family of Cosmos-SDK.
	Stargate Family = "stargate"
)

type Version

type Version struct {
	// Family of the version
	Family Family

	// Version is the exact sdk version string.
	Version string

	// Semantic is the parsed version.
	Semantic semver.Version
}

Version represents a range of Cosmos SDK versions.

func Detect

func Detect(appPath string) (version Version, err error)

Detect detects major version of Cosmos.

func Parse

func Parse(version string) (v Version, err error)

Parse parses a Cosmos-SDK version.

func (Version) GTE

func (v Version) GTE(version Version) bool

GTE checks if v is greater than or equal to version.

func (Version) Is

func (v Version) Is(version Version) bool

Is checks if v is equal to version.

func (Version) IsFamily

func (v Version) IsFamily(family Family) bool

func (Version) LT

func (v Version) LT(version Version) bool

LT checks if v is less than version.

func (Version) LTE

func (v Version) LTE(version Version) bool

LTE checks if v is less than or equal to version.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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