versions

package
v2.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdVersionEncDec = VersionEncDecImpl{}

Functions

This section is empty.

Types

type SemVer

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

func MustParseSemVer

func MustParseSemVer(version string) *SemVer

func ParseSemVer

func ParseSemVer(version string) (*SemVer, error)

func (*SemVer) CompareTo

func (self *SemVer) CompareTo(version *SemVer) int

func (*SemVer) Equals

func (self *SemVer) Equals(version *SemVer) bool

func (*SemVer) String

func (self *SemVer) String() string

type VersionEncDec

type VersionEncDec interface {
	Encode(*VersionInfo) ([]byte, error)
	Decode([]byte) (*VersionInfo, error)
}

type VersionEncDecImpl

type VersionEncDecImpl struct{}

func (*VersionEncDecImpl) Decode

func (encDec *VersionEncDecImpl) Decode(info []byte) (*VersionInfo, error)

func (*VersionEncDecImpl) Encode

func (encDec *VersionEncDecImpl) Encode(info *VersionInfo) ([]byte, error)

type VersionInfo

type VersionInfo struct {
	Version   string
	Revision  string
	BuildDate string
	OS        string
	Arch      string
}

func (*VersionInfo) GetVersion

func (self *VersionInfo) GetVersion() (*SemVer, error)

func (*VersionInfo) HasMinimumVersion

func (self *VersionInfo) HasMinimumVersion(compareVersionStr string) (bool, error)

type VersionProvider

type VersionProvider interface {
	Version() string
	BuildDate() string
	Revision() string
	Branch() string
	AsVersionInfo() *VersionInfo
	EncoderDecoder() VersionEncDec
}

Jump to

Keyboard shortcuts

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