constraint

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotatedConstraint

type AnnotatedConstraint struct {
	C          Constraint
	Annotation string
}

func (*AnnotatedConstraint) DetailedString

func (ac *AnnotatedConstraint) DetailedString() string

func (*AnnotatedConstraint) FitConstraint

func (ac *AnnotatedConstraint) FitConstraint(v version.Version) bool

func (*AnnotatedConstraint) String

func (ac *AnnotatedConstraint) String() string

type AnyConstraint

type AnyConstraint struct{}

func (*AnyConstraint) DetailedString

func (ac *AnyConstraint) DetailedString() string

func (*AnyConstraint) FitConstraint

func (ac *AnyConstraint) FitConstraint(v version.Version) bool

func (*AnyConstraint) String

func (ac *AnyConstraint) String() string

type Constraint

type Constraint interface {
	FitConstraint(v version.Version) bool
	String() string
	DetailedString() string
}

func Any

func Any() Constraint

func New

func New(lower version.Version, upper version.Version) Constraint

func NewMajorOnly

func NewMajorOnly(c Constraint) Constraint

func NewMinorOnly

func NewMinorOnly(c Constraint) Constraint

func ParseFromString

func ParseFromString(str string) (Constraint, error)

type MajorOnlyConstraint

type MajorOnlyConstraint struct {
	C Constraint
}

func (*MajorOnlyConstraint) DetailedString

func (mc *MajorOnlyConstraint) DetailedString() string

func (*MajorOnlyConstraint) FitConstraint

func (mc *MajorOnlyConstraint) FitConstraint(v version.Version) bool

func (*MajorOnlyConstraint) String

func (mc *MajorOnlyConstraint) String() string

type MinorOnlyConstraint

type MinorOnlyConstraint struct {
	C Constraint
}

func (*MinorOnlyConstraint) DetailedString

func (mc *MinorOnlyConstraint) DetailedString() string

func (*MinorOnlyConstraint) FitConstraint

func (mc *MinorOnlyConstraint) FitConstraint(v version.Version) bool

func (*MinorOnlyConstraint) String

func (mc *MinorOnlyConstraint) String() string

type RangedConstraint

type RangedConstraint struct {
	Lower version.Version
	Upper version.Version
}

func (*RangedConstraint) DetailedString

func (rc *RangedConstraint) DetailedString() string

func (*RangedConstraint) FitConstraint

func (rc *RangedConstraint) FitConstraint(v version.Version) bool

func (*RangedConstraint) String

func (rc *RangedConstraint) String() string

Jump to

Keyboard shortcuts

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