version

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NullVersion is the v0.0.0 constant
	NullVersion = semver.MustParse("0.0.0")

	// SupportedVersions holds all supported temporal versions.
	SupportedVersions = []VersionInfo{
		{
			Range: semver.MustParseRange(">= 1.16.0"),
			DefaultSchemaVersions: SchemaVersions{
				v1alpha1.PostgresSQLDatastore: semver.MustParse("1.8.0"),
				v1alpha1.MySQLDatastore:       semver.MustParse("1.8.0"),
				v1alpha1.CassandraDatastore:   semver.MustParse("1.7.0"),
			},
			VisibilitySchemaVersion: SchemaVersions{
				v1alpha1.PostgresSQLDatastore: semver.MustParse("1.1.0"),
				v1alpha1.MySQLDatastore:       semver.MustParse("1.1.0"),
				v1alpha1.CassandraDatastore:   semver.MustParse("1.0.0"),
			},
			AdvancedVisibilitySchemaVersion: SchemaVersions{
				v1alpha1.ElasticsearchDatastore: semver.MustParse("1.0.0"),
			},
		},
		{
			Range: semver.MustParseRange(">= 1.14.0 <1.16.0"),
			DefaultSchemaVersions: SchemaVersions{
				v1alpha1.PostgresSQLDatastore: semver.MustParse("1.7.0"),
				v1alpha1.MySQLDatastore:       semver.MustParse("1.7.0"),
				v1alpha1.CassandraDatastore:   semver.MustParse("1.6.0"),
			},
			VisibilitySchemaVersion: SchemaVersions{
				v1alpha1.PostgresSQLDatastore: semver.MustParse("1.1.0"),
				v1alpha1.MySQLDatastore:       semver.MustParse("1.1.0"),
				v1alpha1.CassandraDatastore:   semver.MustParse("1.0.0"),
			},
			AdvancedVisibilitySchemaVersion: SchemaVersions{
				v1alpha1.ElasticsearchDatastore: semver.MustParse("1.0.0"),
			},
		},
	}
)

Functions

func Parse

func Parse(v string) (semver.Version, error)

Parse is a utility function to parse the provided version.

func ParseAndValidateTemporalVersion

func ParseAndValidateTemporalVersion(v string) (semver.Version, error)

ParseAndValidateTemporalVersion parses the provided version and determines if it's a supported one.

Types

type SchemaVersions

type SchemaVersions map[v1alpha1.DatastoreType]semver.Version

SchemaVersions is temporal schemas versions by datastore type.

type VersionInfo added in v0.1.0

type VersionInfo struct {
	Range                           semver.Range
	DefaultSchemaVersions           SchemaVersions
	VisibilitySchemaVersion         SchemaVersions
	AdvancedVisibilitySchemaVersion SchemaVersions
}

VersionInfo holds a temporal version range depedencies versions.

func GetMatchingSupportedVersion added in v0.1.0

func GetMatchingSupportedVersion(v semver.Version) (*VersionInfo, bool)

GetMatchingSupportedVersion retrives the matching supported VersionInfo from the provided version.

Jump to

Keyboard shortcuts

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