Documentation ¶
Index ¶
- Variables
- type HarvesterUpgradeVersion
- type HarvesterVersion
- func (v *HarvesterVersion) GetStableVersion() *HarvesterVersion
- func (v *HarvesterVersion) IsEqual(version *HarvesterVersion) (bool, error)
- func (v *HarvesterVersion) IsNewer(version *HarvesterVersion) (bool, error)
- func (v *HarvesterVersion) IsOlder(version *HarvesterVersion) (bool, error)
- func (v *HarvesterVersion) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidVersion = errors.New("invalid version string") ErrIncomparableVersion = errors.New("incomparable: dev version") ErrInvalidHarvesterVersion = errors.New("invalid harvester version") ErrMinUpgradeRequirement = errors.New("current version does not meet minimum upgrade requirement") ErrDowngrade = errors.New("downgrading is prohibited") ErrDevUpgrade = errors.New("upgrading from dev versions to non-dev versions is prohibited") ErrPrereleaseCrossVersionUpgrade = errors.New("cross-version upgrades from/to any prerelease version are prohibited") )
Functions ¶
This section is empty.
Types ¶
type HarvesterUpgradeVersion ¶
type HarvesterUpgradeVersion struct {
// contains filtered or unexported fields
}
func NewHarvesterUpgradeVersion ¶
func NewHarvesterUpgradeVersion(cv, uv, mv *HarvesterVersion) *HarvesterUpgradeVersion
func (*HarvesterUpgradeVersion) CheckUpgradeEligibility ¶
func (u *HarvesterUpgradeVersion) CheckUpgradeEligibility(strictMode bool) error
func (*HarvesterUpgradeVersion) IsUpgradable ¶
func (u *HarvesterUpgradeVersion) IsUpgradable() error
IsUpgradable checks that whether the current version satisfies the minimum upgrade requirement.
func (*HarvesterUpgradeVersion) IsUpgrade ¶
func (u *HarvesterUpgradeVersion) IsUpgrade() error
type HarvesterVersion ¶
type HarvesterVersion struct {
// contains filtered or unexported fields
}
func NewHarvesterVersion ¶
func NewHarvesterVersion(versionStr string) (*HarvesterVersion, error)
func (*HarvesterVersion) GetStableVersion ¶
func (v *HarvesterVersion) GetStableVersion() *HarvesterVersion
GetStableVersion returns the Version object without the suffix. For example, given "v1.2.2-rc1", it returns "v1.2.2"
func (*HarvesterVersion) IsEqual ¶
func (v *HarvesterVersion) IsEqual(version *HarvesterVersion) (bool, error)
func (*HarvesterVersion) IsNewer ¶
func (v *HarvesterVersion) IsNewer(version *HarvesterVersion) (bool, error)
func (*HarvesterVersion) IsOlder ¶
func (v *HarvesterVersion) IsOlder(version *HarvesterVersion) (bool, error)
func (*HarvesterVersion) String ¶
func (v *HarvesterVersion) String() string
Click to show internal directories.
Click to hide internal directories.