versionparser

package
v0.0.0-...-1a910b2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongDistinction    = errors.New("Other Version Parser has a different distinction")
	ErrWrongVPType         = errors.New("Cannot compare with this Version Parser")
	ErrVersionNotSupported = errors.New("Version Parser does not support this version string")
)

Functions

This section is empty.

Types

type DefaultRegistry

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

func NewDefaultRegistry

func NewDefaultRegistry() *DefaultRegistry

func (*DefaultRegistry) FindForVersion

func (d *DefaultRegistry) FindForVersion(version string) VersionParser

type Major

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

func (*Major) Distinction

func (p *Major) Distinction() string

func (*Major) IsGreaterThan

func (p *Major) IsGreaterThan(other VersionParser) (bool, error)

func (*Major) String

func (p *Major) String() string

func (*Major) Weight

func (p *Major) Weight() int

type MajorMinor

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

func (*MajorMinor) Distinction

func (p *MajorMinor) Distinction() string

func (*MajorMinor) IsGreaterThan

func (p *MajorMinor) IsGreaterThan(other VersionParser) (bool, error)

func (*MajorMinor) String

func (p *MajorMinor) String() string

func (*MajorMinor) Weight

func (p *MajorMinor) Weight() int

type MajorMinorPatch

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

func (*MajorMinorPatch) Distinction

func (p *MajorMinorPatch) Distinction() string

func (*MajorMinorPatch) IsGreaterThan

func (p *MajorMinorPatch) IsGreaterThan(other VersionParser) (bool, error)

func (*MajorMinorPatch) String

func (p *MajorMinorPatch) String() string

func (*MajorMinorPatch) Weight

func (p *MajorMinorPatch) Weight() int

type NameDate

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

func (*NameDate) Distinction

func (p *NameDate) Distinction() string

func (*NameDate) IsGreaterThan

func (p *NameDate) IsGreaterThan(other VersionParser) (bool, error)

func (*NameDate) String

func (p *NameDate) String() string

func (*NameDate) Weight

func (p *NameDate) Weight() int

type Static

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

func (*Static) Distinction

func (p *Static) Distinction() string

func (*Static) IsGreaterThan

func (p *Static) IsGreaterThan(other VersionParser) (bool, error)

func (*Static) String

func (p *Static) String() string

func (*Static) Weight

func (p *Static) Weight() int

type Unknown

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

func (*Unknown) Distinction

func (p *Unknown) Distinction() string

func (*Unknown) IsGreaterThan

func (p *Unknown) IsGreaterThan(other VersionParser) (bool, error)

func (*Unknown) String

func (p *Unknown) String() string

func (*Unknown) Weight

func (p *Unknown) Weight() int

type VersionParser

type VersionParser interface {
	Distinction() string
	IsGreaterThan(other VersionParser) (bool, error)
	String() string
	Weight() int
}

func FindForVersion

func FindForVersion(version string) VersionParser

Jump to

Keyboard shortcuts

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