common

package
v0.17.31 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StdVersionEncDec = VersionEncDecImpl{}

Functions

This section is empty.

Types

type SemVer added in v0.15.10

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

func ParseSemVer added in v0.15.10

func ParseSemVer(version string) *SemVer

func (*SemVer) CompareTo added in v0.15.10

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

func (*SemVer) Equals added in v0.15.10

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

func (*SemVer) String added in v0.15.10

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 added in v0.15.10

func (self *VersionInfo) GetVersion() *SemVer

func (*VersionInfo) HasMinimumVersion added in v0.15.10

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

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