registryutil

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegistryDockerHub = "docker.io"
	RegistryGHCR      = "ghcr.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FindOption

type FindOption func(*finder)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) FindOption

func WithListRemoteTags

func WithListRemoteTags(fn func(context.Context, name.Repository) ([]string, error)) FindOption

func WithPlatform

func WithPlatform(platform string) FindOption

func WithResolveTagCreatedAt

func WithResolveTagCreatedAt(fn func(context.Context, name.Repository, string, string, string) (time.Time, error)) FindOption

func WithTagCreatedAtCache

func WithTagCreatedAtCache(lru *expirable.LRU[string, time.Time]) FindOption

WithTagCreatedAtCache sets the LRU cache for tag created at times.

func WithTagNamesCache

func WithTagNamesCache(lru *expirable.LRU[string, []string]) FindOption

WithTagNamesCache sets the LRU cache for tag names.

type Finder

type Finder interface {
	Images(ctx context.Context, registry, query string, limit int) ([]Image, error)
	Tags(ctx context.Context, registry, image, keyword string, limit int) ([]Tag, error)
}

func NewFinder

func NewFinder(options ...FindOption) Finder

type Image

type Image struct {
	Registry    string
	Name        string
	Description string
}

type Tag

type Tag struct {
	Name      string
	CreatedAt time.Time
}

Jump to

Keyboard shortcuts

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