Documentation
¶
Overview ¶
v1 is a Docker v1 Registry API client implementation. The v1 API has been deprecated by the public Docker Hub as of December 7th, 2015.
See: https://docs.docker.com/v1.6/reference/api/registry_api/
Index ¶
- Variables
- type Image
- func (i *Image) AuthorizationHeader() string
- func (i *Image) Cookie(u string) (string, error)
- func (i *Image) History(tagName string) ([]string, error)
- func (i *Image) LayerReader(id string) (io.ReadCloser, error)
- func (i *Image) LayerURLs(id string) []string
- func (i *Image) Metadata(tagName string, v interface{}) error
- func (i *Image) TagLayerID(tagName string) (string, error)
- func (i *Image) Tags() []string
Constants ¶
This section is empty.
Variables ¶
var (
// DockerHubRegistryURL points to the official Docker registry.
DockerHubRegistryURL = "https://index.docker.io"
)
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { Name string // contains filtered or unexported fields }
Image is a Docker image info (constructed from Docker API response).
func GetImage ¶
GetImage fetches Docker repository information from the specified Docker registry. If the registry is an empty string it defaults to the DockerHub. The integer return value is the status code of the HTTP response.
func (*Image) AuthorizationHeader ¶
AuthorizationHeader exposes the authorization header created for the image for external layer downloads.
func (*Image) Cookie ¶
Cookie returns the string representation of the first cookie stored in stored client's cookie jar.
func (*Image) History ¶
History returns an ordered list of layers that make up Docker. The order is reverse, it goes from the latest layer to the base layer. Client can iterate these layers and download them using LayerReader.
func (*Image) LayerReader ¶
func (i *Image) LayerReader(id string) (io.ReadCloser, error)
LayerReader returns io.ReadCloser that can be used to read Docker layer data.
func (*Image) TagLayerID ¶
TagLayerID returns a layer ID for a given tag.