cosmosver

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CosmosModulePath defines Cosmos SDK import path.
	CosmosModulePath = "github.com/cosmos/cosmos-sdk"
)

Variables

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

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

Functions

This section is empty.

Types

type AppVersion added in v0.27.0

type AppVersion string
const (
	AppV1 AppVersion = "app_v1"
	AppV2 AppVersion = "app_v2"
)

func DefaultVersion added in v0.27.0

func DefaultVersion() AppVersion

DefaultVersion returns the default app version for build. TODO change the default value after update the version.

func (AppVersion) String added in v0.27.0

func (v AppVersion) String() string

String returns the string value.

type Version

type Version struct {
	// 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) 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