Versions in this module Expand all Collapse all v1 v1.0.0 May 11, 2015 Changes in this version + const APIVersion1 + const APIVersion2 + const APIVersionUnknown + const CONFIGFILE + const DockerDigestHeader + const INDEXNAME + const INDEXSERVER + const REGISTRYSERVER + var ErrAlreadyExists = errors.New("Image already exists") + var ErrConfigFileMissing = errors.New("The Auth config file is missing") + var ErrDoesNotExist = errors.New("Image does not exist") + var ErrInvalidRepositoryName = errors.New("Invalid repository name (ex: \"registry.domain.tld/myrepos\")") + func AddRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Request) error + func HTTPRequestFactory(metaHeaders map[string][]string) *utils.HTTPRequestFactory + func IndexServerAddress() string + func IndexServerName() string + func Login(authConfig *AuthConfig, registryEndpoint *Endpoint, ...) (string, error) + func NormalizeLocalName(name string) string + func SaveConfig(configFile *ConfigFile) error + func ValidateIndexName(val string) (string, error) + func ValidateMirror(val string) (string, error) + func ValidateRepositoryName(reposName string) error + type APIVersion int + func (av APIVersion) String() string + type AuthConfig struct + Auth string + Email string + Password string + ServerAddress string + Username string + type AuthorizationChallenge struct + Parameters map[string]string + Scheme string + type ConfigFile struct + Configs map[string]AuthConfig + func LoadConfig(rootPath string) (*ConfigFile, error) + func (config *ConfigFile) ResolveAuthConfig(index *IndexInfo) AuthConfig + type Endpoint struct + AuthChallenges []*AuthorizationChallenge + IsSecure bool + URL *url.URL + URLBuilder *v2.URLBuilder + Version APIVersion + func NewEndpoint(index *IndexInfo) (*Endpoint, error) + func (e *Endpoint) HTTPClient() *http.Client + func (e *Endpoint) Path(path string) string + func (e *Endpoint) Ping() (RegistryInfo, error) + func (e *Endpoint) String() string + func (e *Endpoint) VersionString(version APIVersion) string + type FSLayer struct + BlobSum string + type ImgData struct + Checksum string + ChecksumPayload string + ID string + Tag string + type IndexInfo struct + Mirrors []string + Name string + Official bool + Secure bool + func ResolveIndexInfo(jobContext *engine.Job, indexName string) (*IndexInfo, error) + func (index *IndexInfo) GetAuthConfigKey() string + type ManifestData struct + Architecture string + FSLayers []*FSLayer + History []*ManifestHistory + Name string + SchemaVersion int + Tag string + type ManifestHistory struct + V1Compatibility string + type Options struct + InsecureRegistries opts.ListOpts + Mirrors opts.ListOpts + func (options *Options) InstallFlags() + type RegistryInfo struct + Standalone bool + Version string + type RepositoryData struct + Endpoints []string + ImgList map[string]*ImgData + Tokens []string + type RepositoryInfo struct + CanonicalName string + Index *IndexInfo + LocalName string + Official bool + RemoteName string + func ParseRepositoryInfo(reposName string) (*RepositoryInfo, error) + func ResolveRepositoryInfo(jobContext *engine.Job, reposName string) (*RepositoryInfo, error) + func (repoInfo *RepositoryInfo) GetEndpoint() (*Endpoint, error) + func (repoInfo *RepositoryInfo) GetSearchTerm() string + type RequestAuthorization struct + func NewRequestAuthorization(authConfig *AuthConfig, registryEndpoint *Endpoint, resource, scope string, ...) *RequestAuthorization + func (auth *RequestAuthorization) Authorize(req *http.Request) error + type SearchResult struct + Description string + IsOfficial bool + IsTrusted bool + Name string + StarCount int + type SearchResults struct + NumResults int + Query string + Results []SearchResult + type Service struct + Config *ServiceConfig + func NewService(options *Options) *Service + func (s *Service) Auth(job *engine.Job) engine.Status + func (s *Service) GetRegistryConfig(job *engine.Job) engine.Status + func (s *Service) Install(eng *engine.Engine) error + func (s *Service) ResolveIndex(job *engine.Job) engine.Status + func (s *Service) ResolveRepository(job *engine.Job) engine.Status + func (s *Service) Search(job *engine.Job) engine.Status + type ServiceConfig struct + IndexConfigs map[string]*IndexInfo + InsecureRegistryCIDRs []*netIPNet + func NewServiceConfig(options *Options) *ServiceConfig + func (config *ServiceConfig) NewIndexInfo(indexName string) (*IndexInfo, error) + func (config *ServiceConfig) NewRepositoryInfo(reposName string) (*RepositoryInfo, error) + type Session struct + func NewSession(authConfig *AuthConfig, factory *utils.HTTPRequestFactory, endpoint *Endpoint, ...) (r *Session, err error) + func (r *Session) GetAuthConfig(withPasswd bool) *AuthConfig + func (r *Session) GetRemoteHistory(imgID, registry string, token []string) ([]string, error) + func (r *Session) GetRemoteImageJSON(imgID, registry string, token []string) ([]byte, int, error) + func (r *Session) GetRemoteImageLayer(imgID, registry string, token []string, imgSize int64) (io.ReadCloser, error) + func (r *Session) GetRemoteTags(registries []string, repository string, token []string) (map[string]string, error) + func (r *Session) GetRepositoryData(remote string) (*RepositoryData, error) + func (r *Session) GetV2Authorization(ep *Endpoint, imageName string, readOnly bool) (auth *RequestAuthorization, err error) + func (r *Session) GetV2ImageBlob(ep *Endpoint, imageName, sumType, sum string, blobWrtr io.Writer, ...) error + func (r *Session) GetV2ImageBlobReader(ep *Endpoint, imageName, sumType, sum string, auth *RequestAuthorization) (io.ReadCloser, int64, error) + func (r *Session) GetV2ImageManifest(ep *Endpoint, imageName, tagName string, auth *RequestAuthorization) ([]byte, string, error) + func (r *Session) GetV2RemoteTags(ep *Endpoint, imageName string, auth *RequestAuthorization) ([]string, error) + func (r *Session) HeadV2ImageBlob(ep *Endpoint, imageName, sumType, sum string, auth *RequestAuthorization) (bool, error) + func (r *Session) LookupRemoteImage(imgID, registry string, token []string) error + func (r *Session) PushImageChecksumRegistry(imgData *ImgData, registry string, token []string) error + func (r *Session) PushImageJSONIndex(remote string, imgList []*ImgData, validate bool, regs []string) (*RepositoryData, error) + func (r *Session) PushImageJSONRegistry(imgData *ImgData, jsonRaw []byte, registry string, token []string) error + func (r *Session) PushImageLayerRegistry(imgID string, layer io.Reader, registry string, token []string, jsonRaw []byte) (checksum string, checksumPayload string, err error) + func (r *Session) PushRegistryTag(remote, revision, tag, registry string, token []string) error + func (r *Session) PutV2ImageBlob(ep *Endpoint, imageName, sumType, sumStr string, blobRdr io.Reader, ...) error + func (r *Session) PutV2ImageManifest(ep *Endpoint, imageName, tagName string, signedManifest, rawManifest []byte, ...) (digest.Digest, error) + func (r *Session) SearchRepositories(term string) (*SearchResults, error) + func (r *Session) V2RegistryEndpoint(index *IndexInfo) (ep *Endpoint, err error) + type TimeoutType uint32 + const ConnectTimeout + const NoTimeout + const ReceiveTimeout