Documentation
¶
Overview ¶
Copyright © 2025 KubeRocketAI Team
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2025 KubeRocketAI Team ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func CompareVersions(current, latest string) (bool, error)
- func GetCompatibilityMatrix() map[string][]string
- func GetCompatibleFrameworkVersions(cliVersion string) ([]string, error)
- func GetCurrentVersion() string
- func IsFrameworkVersionCompatible(cliVersion, frameworkVersion string) bool
- func ParseVersion(version string) (*semver.Version, error)
- func ValidateCompatibility(cliVersion, frameworkVersion string) error
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" Commit = "unknown" Date = "unknown" BuiltBy = "unknown" Framework = "1.0.0" )
Build variables (set during build time)
var CompatibilityMatrix = map[string][]string{
"1.0.0": {"1.0.0", "1.0.1", "1.0.2"},
"1.1.0": {"1.0.0", "1.0.1", "1.0.2", "1.1.0", "1.1.1"},
"1.2.0": {"1.1.0", "1.1.1", "1.2.0", "1.2.1"},
"2.0.0": {"2.0.0", "2.0.1", "2.1.0"},
}
CompatibilityMatrix defines CLI-framework version compatibility
Functions ¶
func CompareVersions ¶
CompareVersions compares current version with latest version Returns true if latest is newer than current, false otherwise
func GetCompatibilityMatrix ¶
GetCompatibilityMatrix returns the current compatibility matrix
func GetCompatibleFrameworkVersions ¶
GetCompatibleFrameworkVersions returns compatible framework versions for given CLI version
func GetCurrentVersion ¶
func GetCurrentVersion() string
GetCurrentVersion returns the current CLI version
func IsFrameworkVersionCompatible ¶
IsFrameworkVersionCompatible checks if a specific framework version is compatible with CLI
func ParseVersion ¶
ParseVersion parses a version string and returns a semver.Version
func ValidateCompatibility ¶
ValidateCompatibility checks if CLI and framework versions are compatible
Types ¶
type VersionInfo ¶
type VersionInfo struct {
Version string `json:"version"`
Commit string `json:"commit"`
Date string `json:"date"`
BuiltBy string `json:"built_by"`
Framework string `json:"framework"`
GoVersion string `json:"go_version"`
Platform string `json:"platform"`
}
VersionInfo contains detailed version information
func GetVersionInfo ¶
func GetVersionInfo() VersionInfo
GetVersionInfo returns detailed version information
func (VersionInfo) String ¶
func (v VersionInfo) String() string
String returns a formatted version string