version

package
v0.0.0-...-318a3d5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOfficialKeptnVersion

func GetOfficialKeptnVersion(versionStr string) (string, error)

GetOfficialKeptnVersion extracts the Keptn version from the provided string More precisely, this method returns the segments and prerelease info w/o metadata

func IsOfficialKeptnVersion

func IsOfficialKeptnVersion(versionStr string) bool

IsOfficialKeptnVersion checks whether the provided version string follows a Keptn version pattern

Types

type KeptnVersionChecker

type KeptnVersionChecker struct {
	VersionFetcherClient *VersionFetcherClient
}

KeptnVersionChecker implements functions for checking the Keptn-cluster version

func NewKeptnVersionChecker

func NewKeptnVersionChecker() *KeptnVersionChecker

NewKeptnVersionChecker creates a new VersionChecker

func (KeptnVersionChecker) CheckKeptnVersion

func (c KeptnVersionChecker) CheckKeptnVersion(cliVersion, clusterVersion string, considerPrevCheck bool) (bool, bool)

CheckKeptnVersion checks whether there is a new Keptn version available and prints corresponding messages to the stdout

func (KeptnVersionChecker) GetStableVersions

func (c KeptnVersionChecker) GetStableVersions(cliVersion, keptnVersion string) ([]string, error)

GetStableVersions returns a list of all stable version to which the current version can be upgraded

func (KeptnVersionChecker) IsUpgradable

func (c KeptnVersionChecker) IsUpgradable(cliVersion, currentKeptnVersion, newDesiredKeptnVersion string) (bool, error)

IsUpgradable checks whether a Keptn version can be upgraded to a new version

type VersionChecker

type VersionChecker struct {
	VersionFetcherClient *VersionFetcherClient
}

VersionChecker manages data for checking the version

func NewVersionChecker

func NewVersionChecker() *VersionChecker

NewVersionChecker creates a new VersionChecker

func (*VersionChecker) CheckCLIVersion

func (v *VersionChecker) CheckCLIVersion(cliVersion string, considerPrevCheck bool) (bool, bool)

CheckCLIVersion checks whether there is a new CLI version available and prints corresponding messages to the stdout

type VersionFetcherClient

type VersionFetcherClient struct {
	HTTPClient *http.Client
	VersionURL string
}

Jump to

Keyboard shortcuts

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