Documentation ¶
Index ¶
- type ImageInfo
- type ImageList
- type Info
- type InfoService
- func (hub *InfoService) Info(image registry.Image) (hubInfo Info, err error)
- func (hub *InfoService) Login(user string, password string) (token string, err error)
- func (hub *InfoService) UserNamespaceImages(user string, password string, namespace string, page int) (imageList ImageList, notfound bool, err error)
- func (hub *InfoService) UserNamespaces(user string, password string) (namespaceList NamespaceList, err error)
- type NamespaceList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { Name string `json:"name"` Namespace string `json:"namespace"` Description string `json:"description"` FullDescription string `json:"full_description"` IsAutomated bool `json:"is_automated"` IsPrivate bool `json:"is_private"` LastUpdated *time.Time `json:"last_updated"` PullCount int `json:"pull_count"` StarCount int `json:"star_count"` }
Info is returned from the hub.docker.com/v2/repositories API
type InfoService ¶
type InfoService struct {
// contains filtered or unexported fields
}
InfoService connects to the Docker Hub over the internet
func NewMockService ¶
func NewMockService(transport *http.Transport) InfoService
NewMockService is for testing
func (*InfoService) Info ¶
func (hub *InfoService) Info(image registry.Image) (hubInfo Info, err error)
Info gets information about this image
func (*InfoService) Login ¶
func (hub *InfoService) Login(user string, password string) (token string, err error)
Login logs in to get an auth token from Docker Hub
func (*InfoService) UserNamespaceImages ¶
func (hub *InfoService) UserNamespaceImages(user string, password string, namespace string, page int) (imageList ImageList, notfound bool, err error)
UserNamespaceImages gets the list of images within a namespace
func (*InfoService) UserNamespaces ¶
func (hub *InfoService) UserNamespaces(user string, password string) (namespaceList NamespaceList, err error)
UserNamespaces gets the namespaces the user belongs to including any orgs they are a member of
type NamespaceList ¶
type NamespaceList struct {
Namespaces []string
}
Click to show internal directories.
Click to hide internal directories.