kubernetesversion

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

type KubernetesVersion struct {
	Major int
	Minor int
}

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.

Jump to

Keyboard shortcuts

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