registryclient

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

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 wraps the Epoch HTTP API and registry endpoints.

func New

func New(baseURL, token string) *Client

New creates a client for the given base URL and bearer token.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the configured base URL.

func (*Client) BlobExists

func (c *Client) BlobExists(ctx context.Context, name, digest string) (bool, error)

BlobExists checks whether a blob exists in a repository.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, path string) error

Delete performs a DELETE on /api/... and expects a 2xx response.

func (*Client) GetBlob

func (c *Client) GetBlob(ctx context.Context, name, digest string) (io.ReadCloser, error)

GetBlob downloads a blob and returns the body for the caller to consume.

func (*Client) GetJSON

func (c *Client) GetJSON(ctx context.Context, path string, out any) error

GetJSON performs a GET on /api/... and decodes JSON into out.

func (*Client) GetManifest

func (c *Client) GetManifest(ctx context.Context, name, tag string) (*manifest.Manifest, error)

GetManifest downloads and decodes a manifest for name:tag.

func (*Client) GetManifestJSON

func (c *Client) GetManifestJSON(ctx context.Context, name, tag string) ([]byte, error)

GetManifestJSON downloads the raw manifest JSON for name:tag.

func (*Client) PutBlob

func (c *Client) PutBlob(ctx context.Context, name, digest string, body io.Reader, size int64) error

PutBlob uploads a blob with a fixed content length.

func (*Client) PutManifestJSON

func (c *Client) PutManifestJSON(ctx context.Context, name, tag string, data []byte) error

PutManifestJSON uploads raw manifest JSON for name:tag.

Jump to

Keyboard shortcuts

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