Documentation ¶
Index ¶
- func GetOfficialKeptnVersion(versionStr string) (string, error)
- func IsOfficialKeptnVersion(versionStr string) bool
- type KeptnVersionChecker
- func (c KeptnVersionChecker) CheckKeptnVersion(cliVersion, clusterVersion string, considerPrevCheck bool) (bool, bool)
- func (c KeptnVersionChecker) GetStableVersions(cliVersion, keptnVersion string) ([]string, error)
- func (c KeptnVersionChecker) IsUpgradable(cliVersion, currentKeptnVersion, newDesiredKeptnVersion string) (bool, error)
- type VersionChecker
- type VersionFetcherClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOfficialKeptnVersion ¶
GetOfficialKeptnVersion extracts the Keptn version from the provided string More precisely, this method returns the segments and prerelease info w/o metadata
func IsOfficialKeptnVersion ¶
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