epoch

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package epoch wraps the epoch registry client behind a SnapshotRegistry interface for testability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client adapts the upstream epoch registry client to SnapshotRegistry.

func New

func New(baseURL, token string) *Client

New creates a Client that talks to the epoch registry at baseURL.

func (*Client) DeleteManifest

func (c *Client) DeleteManifest(ctx context.Context, name, tag string) error

DeleteManifest removes the manifest identified by (name, tag).

func (*Client) HasManifest

func (c *Client) HasManifest(ctx context.Context, name, tag string) (bool, error)

HasManifest folds ErrManifestNotFound into (false, nil); other errors propagate.

type SnapshotRegistry

type SnapshotRegistry interface {
	// HasManifest reports whether (name, tag) exists. Missing returns (false, nil).
	HasManifest(ctx context.Context, name, tag string) (bool, error)
	// DeleteManifest removes the manifest at (name, tag).
	DeleteManifest(ctx context.Context, name, tag string) error
}

SnapshotRegistry is the subset of epoch's HTTP API the operator needs.

Jump to

Keyboard shortcuts

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