Documentation ¶
Overview ¶
Package registry implements a simple HTTP client for Docker Registry
Package registry implements a simple HTTP client for Docker Registry
Index ¶
- Constants
- type ClientFactory
- type Registry
- func (r *Registry) GetCatalog() ([]reference.Named, error)
- func (r *Registry) GetImage(digest reference.Canonical) (*types.ImageInspect, error)
- func (r *Registry) GetImageFromTag(tag reference.NamedTagged) (*types.ImageInspect, error)
- func (r *Registry) GetManifest(tagged reference.NamedTagged) (*schema2.Manifest, error)
- func (r *Registry) GetTags(repositoryName reference.Named) ([]reference.NamedTagged, error)
- func (r *Registry) Hostname() string
Constants ¶
const (
// AuthClientID is the client ID used by the client created by GetV2AuthHTTPClient
AuthClientID = "registryindexer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
type ClientFactory interface { // GetTransport creates a new http.RoundTripper authenticated with a specific scope. // GetTransport is not memoized, and will create a new http.RoundTripper instance // every time. GetTransport(...auth.Scope) http.RoundTripper // GetRegistry creates a client.Registry. GetRegistry is memoized and safe to call // naively whenever needed. GetRegistry() (client.Registry, error) // GetRepository creates a distribution.Repository for a specific repository. // GetRepository is memoized and safe to call naively whenever needed. GetRepository(reference.Named) (distribution.Repository, error) }
ClientFactory produces client.Registry and distribution.Repository instances while hiding authentication complexity
func NewClientFactory ¶
func NewClientFactory(baseURL *url.URL, concurrency int, credentialStore auth.CredentialStore) (ClientFactory, error)
NewClientFactory produces a new ClientFactory
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a simple HTTP client for Docker Registry. This client only subset of the Docker Registry API endpoints.
func NewRegistry ¶
func NewRegistry(baseURL *url.URL, prefixes []string, concurrency int, credentialStore auth.CredentialStore) (*Registry, error)
NewRegistry creates a new Registry client.
func (*Registry) GetCatalog ¶
GetCatalog returns a list of all repositories
func (*Registry) GetImageFromTag ¶
func (r *Registry) GetImageFromTag(tag reference.NamedTagged) (*types.ImageInspect, error)
GetImageFromTag returns a specific blob from a repository based on tag
func (*Registry) GetManifest ¶
GetManifest returns a schema for a specific tag for a specific repository