docker-reg-client is an API wrapper for the Docker Registry v1 API written in Go.
For detailed documentation, see the GoDocs.
This repo is no longer being maintained. Users are welcome to fork it, but we make no warranty of its functionality.
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
Please note that the GetWriteToken()
only works on non automated builds.