chooser

package
v0.0.0-...-b0d2a77 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainSelector

func MainSelector(tag string) bool

MainSelector returns true if tag starts with `.main`.

Types

type Chooser

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

Chooser chooses tags from a registry.

func New

func New(registry registry.Registry, selector TagSelector) *Chooser

New returns a new Chooser that chooses tags from registry. If selector is nil, all tags are considered when choosing the latest. If selector is not nil, only tags that cause selector to return true are considrered when choosing the latest.

func (*Chooser) Latest

func (ch *Chooser) Latest(image string) (string, error)

Latest returns a URI for the latest version of the given image.

type TagSelector

type TagSelector func(tag string) bool

TagSelector returns true if tag should be considered when choosing.

Jump to

Keyboard shortcuts

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