version

package
v17.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentVersionWarningType

type AgentVersionWarningType string
const (
	AgentVersionNoWarning      AgentVersionWarningType = "NO_WARNING"
	AgentVersionWarningUnknown AgentVersionWarningType = "UNKNOWN"
	AgentVersionOutdated       AgentVersionWarningType = "OUTDATED"
	AgentVersionTooNew         AgentVersionWarningType = "TOO_NEW"
)

func WarningIfOutdatedAgent

func WarningIfOutdatedAgent(serverVersion, agentVersion Version, gitlabReleasesList []string) (AgentVersionWarningType, string)

type Version

type Version struct {
	Raw   string
	Major uint64
	Minor uint64
	Patch uint64
	IsPre bool

	// Helpers
	MajorMinor string
}

Version represents a semantic version It's implemented according to https://semver.org Limitations: it currently does not expose the pre-release and build metadata extension data.

func NewVersion

func NewVersion(v string) (Version, error)

func (Version) Previous

func (v Version) Previous(releasesList []string) (Version, error)

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL