policy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlphabeticalOrderAsc ascending order
	AlphabeticalOrderAsc = "ASC"
	// AlphabeticalOrderDesc descending order
	AlphabeticalOrderDesc = "DESC"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alphabetical

type Alphabetical struct {
	Order string
}

Alphabetical representes a alphabetical ordering policy

func NewAlphabetical

func NewAlphabetical(order string) (*Alphabetical, error)

NewAlphabetical constructs a Alphabetical object validating the provided semver constraint

func (*Alphabetical) Latest

func (p *Alphabetical) Latest(versions []string) (string, error)

Latest returns latest version from a provided list of strings

type Policer

type Policer interface {
	Latest([]string) (string, error)
}

Policer is an interface representing a policy implementation type

func PolicerFromSpec

func PolicerFromSpec(choice imagev1.ImagePolicyChoice) (Policer, error)

PolicerFromSpec constructs a new policy object based on

type SemVer

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

SemVer representes a SemVer policy

func NewSemVer

func NewSemVer(r string) (*SemVer, error)

NewSemVer constructs a SemVer object validating the provided semver constraint

func (*SemVer) Latest

func (p *SemVer) Latest(versions []string) (string, error)

Latest returns latest version from a provided list of strings

Jump to

Keyboard shortcuts

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