version

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version provides the version types of the Secrets Engine.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyVersion = errors.New("empty version")
	ErrVPrefix      = errors.New("missing version prefix")
)
View Source
var ErrEmptyName = errors.New("empty name")

Functions

func Compare

func Compare(a, b Version) int

Compare returns an integer comparing two versions according to semantic versioning. The result will be 0 if a == b, -1 if a < b, or +1 if a > b. An invalid semver string is considered less than a valid one.

Types

type DaemonVersion

type DaemonVersion struct {
	Version    Version
	Date       string
	CommitHash string
}

DaemonVersion holds version information reported by the daemon.

type Name

type Name interface {
	String() string
}

func MustNewName

func MustNewName(s string) Name

MustNewName creates a new Name as NewName does, but panics when a validation error occurs.

func NewName

func NewName(s string) (Name, error)

NewName creates a new Name from a string If a validation error occurs, it returns nil and the error.

type Version

type Version interface {
	String() string
}

func MustNewVersion

func MustNewVersion(s string) Version

MustNewVersion creates a new Version as NewVersion does, but panics when a validation error occurs.

func NewVersion

func NewVersion(s string) (Version, error)

NewVersion creates a new Version from a string If a validation error occurs, it returns nil and the error.

Jump to

Keyboard shortcuts

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