Documentation ¶
Index ¶
- func Log(format string, args ...interface{})
- func Quiet(format string, args ...interface{})
- type BasicTransport
- type ErrorTransport
- type LogfCallback
- type Opt
- type Registry
- func (r *Registry) Catalog(u string) ([]string, error)
- func (r *Registry) Delete(repository, digest string) error
- func (r *Registry) Digest(repository, ref string) (string, error)
- func (r *Registry) DownloadLayer(repository string, digest digest.Digest) (io.ReadCloser, error)
- func (r *Registry) HasLayer(repository string, digest digest.Digest) (bool, error)
- func (r *Registry) Headers(uri string) (map[string]string, error)
- func (r *Registry) Manifest(repository, ref string) (distribution.Manifest, error)
- func (r *Registry) ManifestList(repository, ref string) (manifestlist.ManifestList, error)
- func (r *Registry) ManifestV1(repository, ref string) (schema1.SignedManifest, error)
- func (r *Registry) ManifestV2(repository, ref string) (schema2.Manifest, error)
- func (r *Registry) Ping() error
- func (r *Registry) Tags(repository string) ([]string, error)
- func (r *Registry) Token(url string) (string, error)
- func (r *Registry) UploadLayer(repository string, digest reference.Reference, content io.Reader) error
- type TokenTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicTransport ¶
type BasicTransport struct { Transport http.RoundTripper URL string Username string Password string }
BasicTransport defines the data structure for authentication via basic auth.
type ErrorTransport ¶
type ErrorTransport struct {
Transport http.RoundTripper
}
ErrorTransport defines the data structure for returning errors from the round tripper.
type LogfCallback ¶
type LogfCallback func(format string, args ...interface{})
LogfCallback is the callback for formatting logs.
type Registry ¶
type Registry struct { URL string Domain string Username string Password string Client *http.Client Logf LogfCallback Opt Opt }
Registry defines the client for retriving information from the registry API.
func New ¶
func New(auth types.AuthConfig, opt Opt) (*Registry, error)
New creates a new Registry struct with the given URL and credentials.
func (*Registry) Delete ¶
Delete removes a repository digest or reference from the registry. https://docs.docker.com/registry/spec/api/#deleting-an-image
func (*Registry) DownloadLayer ¶
func (r *Registry) DownloadLayer(repository string, digest digest.Digest) (io.ReadCloser, error)
DownloadLayer downloads a specific layer by digest for a repository.
func (*Registry) HasLayer ¶
HasLayer returns if the registry contains the specific digest for a repository.
func (*Registry) Headers ¶ added in v0.13.2
Headers returns the authorization headers for a specific uri.
func (*Registry) Manifest ¶
func (r *Registry) Manifest(repository, ref string) (distribution.Manifest, error)
Manifest returns the manifest for a specific repository:tag.
func (*Registry) ManifestList ¶
func (r *Registry) ManifestList(repository, ref string) (manifestlist.ManifestList, error)
ManifestList gets the registry v2 manifest list.
func (*Registry) ManifestV1 ¶
func (r *Registry) ManifestV1(repository, ref string) (schema1.SignedManifest, error)
ManifestV1 gets the registry v1 manifest.
func (*Registry) ManifestV2 ¶
ManifestV2 gets the registry v2 manifest.
type TokenTransport ¶
type TokenTransport struct { Transport http.RoundTripper Username string Password string }
TokenTransport defines the data structure for authentication via tokens.