Documentation
¶
Overview ¶
Package version implements server, cli and console version handling.
Index ¶
- Constants
- Variables
- func FetchServerVersion(endpoint string, client *httpc.Client) (version string, err error)
- type ServerFeatureFlags
- type Version
- func (v *Version) CheckCLIServerCompatibility() (compatible bool, reason string)
- func (v *Version) GetCLIVersion() string
- func (v *Version) GetServerFeatureFlags() error
- func (v *Version) GetServerVersion() string
- func (v *Version) SetCLIVersion(s string)
- func (v *Version) SetServerVersion(s string)
Constants ¶
const DevVersion = "dev"
DevVersion is the version string for development versions.
Variables ¶
var BuildVersion = DevVersion
BuildVersion is the versin string with which CLI is built. Set during the build time.
Functions ¶
Types ¶
type ServerFeatureFlags ¶
ServerFeatureFlags indicates what features are supported by this version of server.
type Version ¶
type Version struct {
// CLI is the version of CLI
CLI string
// CLISemver is the parsed semantic version for CLI
CLISemver *semver.Version
// Server is the version of server CLI is interacting with
Server string
// ServerSemver is the parsed semantic version for server
ServerSemver *semver.Version
// ServerFeatureFlags indicates what features are supported by this
// version of server.
ServerFeatureFlags *ServerFeatureFlags
}
Version defines the version object.
func NewCLIVersion ¶
NewCLIVersion returns a new version object with CLI info filled in
func (*Version) CheckCLIServerCompatibility ¶
CheckCLIServerCompatibility compares server and cli for compatibility, subject to certain conditions. compatible boolean is returned along with a message which states the reason for the result.
func (*Version) GetCLIVersion ¶
GetCLIVersion return the CLI version string.
func (*Version) GetServerFeatureFlags ¶
GetServerFeatureFlags returns the feature flags for server.
func (*Version) GetServerVersion ¶
GetServerVersion return the server version string.
func (*Version) SetCLIVersion ¶
SetCLIVersion parses the version string vs and sets it as CLI version
func (*Version) SetServerVersion ¶
SetServerVersion parses the version string vs and sets it as server version