docker

package
v0.0.0-...-76a6d1e Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRegistryVersionHeader = "Docker-Distribution-Api-Version"

DefaultRegistryVersionHeader is the name of the default HTTP header that carries Registry version info

Functions

func NewCredentialStore

func NewCredentialStore(username, password string) auth.CredentialStore

NewCredentialStore provides static username and password to the store.

func PingV2Registry

func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error)

PingV2Registry attempts to ping a v2 registry and on success return a challenge manager for the supported authentication types and whether v2 was confirmed by the response. If a response is received but cannot be interpreted a PingResponseError will be returned.

func Split

func Split(image string) (base string, tag string, err error)

Split takes a string consisting of image name and tag and splits them into two.

Types

type Auth

type Auth struct {
	Username  string
	Password  string
	Transport http.RoundTripper
}

Auth is a helper to store authentication details for the client.

type Client

type Client struct{}

Client is the docker implemention of Interface.

func (*Client) Tags

func (c *Client) Tags(authentication *Auth, repository string) ([]string, error)

Tags retrieves docker tags for a specific repository.

type Interface

type Interface interface {
	Tags(auth *Auth, repository string) ([]string, error)
}

Interface provides functionality to deal with container image tags.

type PingResponseError

type PingResponseError struct {
	Err error
}

PingResponseError is used when the response from a ping was received but invalid.

func (PingResponseError) Error

func (err PingResponseError) Error() string

Jump to

Keyboard shortcuts

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