Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Repo = "k0sproject/k0s"
var TimeOut = time.Second * 10
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection []*Version
Collection is a type that implements the sort.Interface interface so that versions can be sorted.
func NewCollection ¶
func NewCollection(versions ...string) (Collection, error)
func (Collection) Len ¶
func (v Collection) Len() int
func (Collection) Less ¶
func (v Collection) Less(i, j int) bool
func (Collection) Swap ¶
func (v Collection) Swap(i, j int)
type Release ¶
type Release struct {
URL string `json:"html_url"`
TagName string `json:"tag_name"`
PreRelease bool `json:"prerelease"`
Assets []Asset `json:"assets"`
}
Release is a k0s release
func LatestRelease ¶
LatestStableRelease returns the semantically sorted latest version even if it is a prerelease from the online repository
func LatestStableRelease ¶
LatestStableRelease returns the semantically sorted latest non-prerelease version from the online repository
func (*Release) GreaterThan ¶
GreaterThan returns true if the version of the Release is greater than the supplied version
type Version ¶
Version is a k0s version
func NewVersion ¶
NewVersion returns a new Version created from the supplied string or an error if the string is not a valid version number
func (*Version) Compare ¶
Compare compares two versions and returns one of the integers: -1, 0 or 1 (less than, equal, greater than)
func (*Version) GreaterThan ¶
GreaterThan returns true if the version is greater than the supplied version
func (*Version) GreaterThanOrEqual ¶
GreaterThanOrEqual returns true if the version is greater than the supplied version or equal
func (*Version) LessThanOrEqual ¶
LessThanOrEqual returns true if the version is lower than the supplied version or equal