version

package
v1.0.9-2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Fabric versions
	V1     = "1"
	V1_0_0 = "1.0.0"
	V1_4_0 = "1.4.0"
	V1_4_6 = "1.4.6"
	V1_4_7 = "1.4.7"
	V1_4_8 = "1.4.8"
	V1_4_9 = "1.4.9"
	V1_5_3 = "1.5.3"
	V2     = "2"
	V2_0_0 = "2.0.0"
	V2_0_1 = "2.0.1"
	V2_1_0 = "2.1.0"
	V2_1_1 = "2.1.1"
	V2_2_0 = "2.2.0"
	V2_2_1 = "2.2.1"
	V2_2_3 = "2.2.3"
	V2_2_4 = "2.2.4"
	V2_2_5 = "2.2.5"

	V2_4_1 = "2.4.1"
	V2_5_1 = "2.5.1"

	V1_4 = "V1.4"

	Unsupported = "unsupported"
)
View Source
const (
	// DEPRECATED: operator versions for IBP logic
	V210        = "2.1.0"
	V212        = "2.1.2"
	V213        = "2.1.3"
	V250        = "2.5.0"
	V251        = "2.5.1"
	V252        = "2.5.2"
	V253        = "2.5.3"
	IBPOperator = "2.5.3"

	// IBM Support for Hyperledger Fabric product version
	V100     = "1.0.0"
	Operator = "1.0.0"
)

Variables

View Source
var OldFabricVersionsLookup = map[string]interface{}{
	"1.4.2":       nil,
	"1.4.3":       nil,
	"1.4.4":       nil,
	"1.4.5":       nil,
	"1.4.6":       nil,
	"V1.4":        nil,
	"unsupported": nil,
}

OldFabricVersionsLookup map contains old fabric versions keyed by image tag. Used to set the fabric version of migrated instances that don't have fabric version set in their specs. This should not contain newer fabric versions as instances with newer fabric versions should have fabric version set in their spec.

Functions

func GetFabricVersionFrom

func GetFabricVersionFrom(imageTag string) string

GetFabricVersionFrom extracts fabric version from image tag in the format: <version>-<releasedate>-<arch>

func GetMajorReleaseVersion

func GetMajorReleaseVersion(version string) string

func GetOldFabricVersionFrom

func GetOldFabricVersionFrom(imageTag string) string

GetOldFabricVersionFrom is only to be used when we need to find the fabric version of a migrated instance where instance.Spec.FabricVersion was not set previously.

func IsMigratedFabricVersion

func IsMigratedFabricVersion(fabricVersion string) bool

IsMigratedFabricVersion returns true if the given fabric version was set during migration to 2.5.2 or above

Types

type String

type String string

func (String) Equal

func (s String) Equal(new string) bool

func (String) EqualWithoutTag

func (s String) EqualWithoutTag(new string) bool

func (String) GreaterThan

func (s String) GreaterThan(new string) bool

func (String) LessThan

func (s String) LessThan(new string) bool

type Version

type Version struct {
	Major   int `json:"major"`
	Minor   int `json:"minor"`
	Fixpack int `json:"fixpack"`
	Tag     int `json:"tag"`
}

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