Documentation ¶
Overview ¶
Package kubernetesversion contains important structs and method for kubernetes version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFormat is used for invalid format. ErrInvalidFormat = fmt.Errorf("invalid format") // ErrInvalidMajorVersion is used for invalid major version. ErrInvalidMajorVersion = fmt.Errorf("invalid major version") // ErrInvalidMinorVersion is used for invalid minor version. ErrInvalidMinorVersion = fmt.Errorf("invalid minor version") )
Functions ¶
This section is empty.
Types ¶
type KubernetesVersion ¶
KubernetesVersion contains major and minor version.
func New ¶
func New(majorStr, minorStr string) (KubernetesVersion, error)
New returns a kubernetes version from specified major and minor version.
func NewFromString ¶
func NewFromString(str string) (KubernetesVersion, error)
NewFromString returns a kubernetes version from a specified input.
func (KubernetesVersion) String ¶
func (kv KubernetesVersion) String() string
func (KubernetesVersion) StringWithDot ¶
func (kv KubernetesVersion) StringWithDot() string
StringWithDot returns the Kubernetes version in the format <major>.<minor>, e.g. 1.27.
func (KubernetesVersion) Validate ¶
func (kv KubernetesVersion) Validate() error
Validate validates a kubernetes version.
Click to show internal directories.
Click to hide internal directories.