version

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.37.0

type Option func(opts *Options)

Option represents a function that applies a configuration to a Version instance.

func WithDefaultVersion added in v0.37.0

func WithDefaultVersion(defaultVersion string) Option

WithDefaultVersion sets a default version if parsing the Docker image tag fails.

func WithLogger added in v0.37.0

func WithLogger(logger logr.Logger) Option

WithLogger sets a logger for the Version instance.

type Options added in v0.37.0

type Options struct {
	// contains filtered or unexported fields
}

Options to be used with Version.

type Version added in v0.37.0

type Version struct {
	// contains filtered or unexported fields
}

Version wraps a HashiCorp version.Version struct to provide additional functionalities for better convenience.

func NewVersion added in v0.37.0

func NewVersion(image string, vOpts ...Option) (*Version, error)

NewVersion constructs a new Version instance from a given Docker image tag.

func (*Version) Compare added in v0.37.0

func (v *Version) Compare(other string) (int, error)

Compare compares the current version with another semantic version string.

func (*Version) GetMinorVersion added in v0.37.0

func (v *Version) GetMinorVersion() (string, error)

GetMinorVersion extracts and returns the "major.minor" part of the version.

func (*Version) GreaterThanOrEqual added in v0.37.0

func (v *Version) GreaterThanOrEqual(other string) (bool, error)

GreaterThanOrEqual checks if the current version is greater than or equal to another version.

Jump to

Keyboard shortcuts

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

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy