Versions in this module Expand all Collapse all v0 v0.2.2 Feb 4, 2015 v0.2.1 Jan 28, 2015 Changes in this version + const APIVersion1 + const APIVersion2 + const CONFIGFILE + 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\")") + var IndexServerURL *url.URL + func AddRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Request) error + func IndexServerAddress() string + func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, error) + func ResolveRepositoryName(reposName string) (string, string, error) + func SaveConfig(configFile *ConfigFile) error + type APIVersion int + var DefaultAPIVersion APIVersion = APIVersion1 + func (av APIVersion) String() string + type AuthConfig struct + Auth string + Email string + Password string + ServerAddress string + Username string + type ConfigFile struct + Configs map[string]AuthConfig + func LoadConfig(rootPath string) (*ConfigFile, error) + func (config *ConfigFile) ResolveAuthConfig(hostname string) AuthConfig + type Endpoint struct + URL *url.URL + Version APIVersion + func NewEndpoint(hostname string, insecureRegistries []string) (*Endpoint, error) + 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 ManifestData struct + Architecture string + FSLayers []*FSLayer + History []*ManifestHistory + Name string + SchemaVersion int + Tag string + type ManifestHistory struct + V1Compatibility string + type RegistryInfo struct + Standalone bool + Version string + type RepositoryData struct + Endpoints []string + ImgList map[string]*ImgData + Tokens []string + type SearchResult struct + Description string + IsOfficial bool + IsTrusted bool + Name string + StarCount int + type SearchResults struct + NumResults int + Query string + Results []SearchResult + 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) GetV2ImageBlob(imageName, sumType, sum string, blobWrtr io.Writer, token []string) error + func (r *Session) GetV2ImageBlobReader(imageName, sumType, sum string, token []string) (io.ReadCloser, int64, error) + func (r *Session) GetV2ImageManifest(imageName, tagName string, token []string) ([]byte, error) + func (r *Session) GetV2RemoteTags(imageName string, token []string) ([]string, error) + func (r *Session) GetV2Version(token []string) (*RegistryInfo, error) + func (r *Session) LookupRemoteImage(imgID, registry string, token []string) error + func (r *Session) PostV2ImageMountBlob(imageName, sumType, sum string, token []string) (bool, 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(imageName, sumType string, blobRdr io.Reader, token []string) (serverChecksum string, err error) + func (r *Session) PutV2ImageManifest(imageName, tagName string, manifestRdr io.Reader, token []string) error + func (r *Session) SearchRepositories(term string) (*SearchResults, error) + type TimeoutType uint32 + const ConnectTimeout + const NoTimeout + const ReceiveTimeout