docker

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIRateLimit = 500
)

Values taken from: https://docs.docker.com/docker-hub/usage/#abuse-rate-limit

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	Token string `json:"token"`
}

type Client

type Client struct {
	*http.Client
	Options
	// contains filtered or unexported fields
}

func New

func New(opts Options, log *logrus.Entry) (*Client, error)

func (*Client) IsHost added in v0.1.1

func (c *Client) IsHost(host string) bool

func (*Client) Name added in v0.2.0

func (c *Client) Name() string

func (*Client) RepoImageFromPath added in v0.1.1

func (c *Client) RepoImageFromPath(path string) (string, string)

func (*Client) Tags

func (c *Client) Tags(ctx context.Context, _, repo, image string) ([]api.ImageTag, error)

type Image

type Image struct {
	Digest       string           `json:"digest"`
	OS           api.OS           `json:"os"`
	Architecture api.Architecture `json:"Architecture"`
}

type Options

type Options struct {
	Transporter http.RoundTripper
	Username    string
	Password    string
	Token       string
}

type Result

type Result struct {
	Name      string `json:"name"`
	Timestamp string `json:"last_updated"`
	TagStatus string `json:"tag_status"` // String of "active" or "inactive"
	MediaType string `json:"media_type,omitempty"`
	// Digest is only set with `application/vnd.oci.image.index.v1+json` media_type
	Digest string `json:"digest,omitempty"`

	Images []Image `json:"images"`
}

type TagResponse

type TagResponse struct {
	Next    string   `json:"next"`
	Results []Result `json:"results"`
}

Jump to

Keyboard shortcuts

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