Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Crawl ¶
func Crawl(conf CrawlConfig, images chan *ImageEnvelope)
Crawl will search a registry for Docker images. Search can be filtered in the crawl Config. Will return results on images chan; will close images before returning. Returns error when it cannot proceed. Errors encountered getting image manifests are communicated in the ImageEnvelope.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// RegistryURL, Username, Password are required for obtaining a token.
// Repo and Tag are required for docker.io as as tokens must have a directed
// scope.
RegistryURL string
Repo string
Tag string
Username string
Password string
}
AuthConfig struct init
type CrawlConfig ¶
type CrawlConfig struct {
URL string `json:"url"`
Username string `json:"username"`
Password string `json:"password"`
Repos map[string]interface{} `json:"repos"`
Tags map[string]interface{} `json:"tags"`
}
CrawlConfig struct init
type Image ¶
type Image struct {
Registry string `json:"registry"`
Repo string `json:"repo"`
Tag string `json:"tag"`
Digest string `json:"digest"`
Layers []string `json:"layers"`
ManifestV2 datastore.JSONMap `json:"manifest"`
ManifestV1 datastore.JSONMap `json:"manifestv1"`
Metadata datastore.JSONMap `json:"metadata"`
}
Image struct init
type ImageEnvelope ¶
ImageEnvelope struct init
type Token ¶
type Token struct {
Token string `json:"token"`
}
Token struct init
func AuthRegistry ¶
func AuthRegistry(authConfig *AuthConfig) (*Token, error)
AuthRegistry will attempt to authenticate to a register with the provided credentials, returning the resulting token.
Click to show internal directories.
Click to hide internal directories.