registry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: BSD-3-Clause Imports: 7 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 provides methods to interact with Docker Hub registry API.

func NewClient

func NewClient() *Client

NewClient creates a new Docker Hub registry client with default settings.

func (*Client) ImageExists

func (c *Client) ImageExists(ctx context.Context, repository, tag string) (bool, error)

ImageExists checks if a specific tag exists in the repository. repository should be in the format "namespace/repo" (e.g., "lexfrei/papermc"). Returns true if the tag exists, false if it doesn't exist (404), and error for other failures.

func (*Client) ListTags

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

ListTags retrieves all tags for a repository. repository should be in the format "namespace/repo" (e.g., "lexfrei/papermc"). pageSize controls how many tags to fetch per API call (0 uses default).

type TagResult

type TagResult struct {
	Name string `json:"name"`
}

TagResult represents a single tag in the response.

type TagsResponse

type TagsResponse struct {
	Count    int         `json:"count"`
	Next     string      `json:"next,omitempty"`
	Previous string      `json:"previous,omitempty"`
	Results  []TagResult `json:"results"`
}

TagsResponse represents Docker Hub API response for tags listing.

Jump to

Keyboard shortcuts

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