 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package version implements server, cli and console version handling.
Index ¶
- Variables
- func FetchServerVersion(endpoint string) (version string, err error)
- type Version
- func (v *Version) CheckCLIServerCompatibility() (compatible bool, reason string)
- func (v *Version) GetCLIVersion() string
- func (v *Version) GetConsoleAssetsVersion() (av string)
- func (v *Version) GetConsoleTemplateVersion() (tv string)
- func (v *Version) GetServerVersion() string
- func (v *Version) SetCLIVersion(s string)
- func (v *Version) SetServerVersion(s string)
 
Constants ¶
This section is empty.
Variables ¶
var BuildVersion = "dev"
    BuildVersion is the versin string with which CLI is built. Set during the build time.
Functions ¶
func FetchServerVersion ¶
FetchServerVersion reads the version from server.
Types ¶
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
}
    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) GetConsoleAssetsVersion ¶
GetConsoleAssetsVersion returns the assets version av to be used in the console template.
func (*Version) GetConsoleTemplateVersion ¶
GetConsoleTemplateVersion returns the template version tv required to render the console html.
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