oci

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMatchingTag = errors.New("no tag matches channel")

ErrNoMatchingTag is returned when no tag in a list satisfies the requested channel.

Functions

func DefaultChannel

func DefaultChannel(currentTag string) string

DefaultChannel returns "<major>.x" for the given current tag, or "*" if not semver.

func HighestMatching

func HighestMatching(tags []string, channel string) (string, error)

HighestMatching returns the highest semver tag in `tags` that satisfies the channel. Non-semver tags are silently skipped. Per Masterminds/semver semantics, prereleases are NOT included in a range unless explicitly opted into.

Types

type Client

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

Client is the production Registry implementation, backed by go-containerregistry.

func NewClient

func NewClient(ttl time.Duration) *Client

func (*Client) ListTags

func (c *Client) ListTags(ctx context.Context, repository string) ([]string, error)

type Fake

type Fake struct {
	CallCount map[string]int
	// contains filtered or unexported fields
}

Fake is an in-memory Registry for tests.

func NewFake

func NewFake() *Fake

func (*Fake) ListTags

func (f *Fake) ListTags(_ context.Context, repository string) ([]string, error)

func (*Fake) SetTags

func (f *Fake) SetTags(repository string, tags []string)

type Registry

type Registry interface {
	ListTags(ctx context.Context, repository string) ([]string, error)
}

Registry abstracts an OCI registry tag-listing API.

Jump to

Keyboard shortcuts

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