Versions in this module Expand all Collapse all v0 v0.13.1 Oct 16, 2014 v0.13.0 Oct 9, 2014 Changes in this version + const CONFIGFILE + const INDEXSERVER + var ErrAlreadyExists = errors.New("Image already exists") + var ErrConfigFileMissing = errors.New("The Auth config file is missing") + var ErrInvalidRepositoryName = errors.New("Invalid repository name (ex: \"registry.domain.tld/myrepos\")") + func AddRequiredHeadersToRedirectedRequests(req *http.Request, via []*http.Request) error + func ExpandAndVerifyRegistryUrl(hostname string) (string, error) + func HTTPRequestFactory(metaHeaders map[string][]string) *utils.HTTPRequestFactory + 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 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 ImgData struct + Checksum string + ChecksumPayload string + ID string + Tag 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 Service struct + func NewService() *Service + func (s *Service) Auth(job *engine.Job) engine.Status + func (s *Service) Install(eng *engine.Engine) error + func (s *Service) Search(job *engine.Job) engine.Status + type Session struct + func NewSession(authConfig *AuthConfig, factory *utils.HTTPRequestFactory, ...) (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) LookupRemoteImage(imgID, registry string, token []string) bool + 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) SearchRepositories(term string) (*SearchResults, error) + type TimeoutType uint32 + const ConnectTimeout + const NoTimeout + const ReceiveTimeout