policy

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policer

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

Policer is an interface representing a policy implementation type.

type SemVer

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

SemVer represents 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 VersionedList) (Versioned, error)

Latest returns latest version from a provided list of strings.

type Versioned added in v0.5.0

type Versioned interface {
	GetVersion() string
}

func VersionedStrings added in v0.5.0

func VersionedStrings(versions ...string) []Versioned

VersionedStrings returns a list of VersionedString objects from a slice of strings. TODO(dkoshkin): Can we simplify this package?

type VersionedList added in v0.5.0

type VersionedList []Versioned

type VersionedString added in v0.5.0

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

func (*VersionedString) GetVersion added in v0.5.0

func (v *VersionedString) GetVersion() string

Jump to

Keyboard shortcuts

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