Documentation ¶
Index ¶
- Constants
- Variables
- type APIRepositories
- type APIRepository
- type APIRepositoryList
- type Image
- func (r *Image) Catalog() *APIRepositories
- func (r *Image) DeleteManifest(manifest *ImageManifest) error
- func (r *Image) ExistBlob() (bool, error)
- func (r *Image) GetImageNameWithHost() string
- func (r *Image) GetManifest() (*ImageManifest, error)
- func (r *Image) GetToken(scope string) (auth.Token, error)
- func (r *Image) NormalizeNamed(image string) (reference.Named, error)
- func (r *Image) PullBlob() (io.ReadCloser, int64, error)
- func (r *Image) PushBlob(blob []byte, size int64) (string, string, error)
- func (r *Image) PutManifest(manifest *ImageManifest) error
- func (r *Image) SetImage(image string) error
- func (r *Image) SetServerURL(url string)
- func (r *Image) Tags() *APIRepository
- type ImageManifest
- type Manifest
Constants ¶
View Source
const ( // DefaultServerHostName is the default registry server hostname DefaultServerHostName = "registry-1.docker.io" // DefaultServer is the default registry server DefaultServer = "https://" + DefaultServerHostName // DefaultHostname is the default built-in hostname DefaultHostname = "docker.io" // LegacyDefaultDomain is ... LegacyDefaultDomain = "index.docker.io" // LegacyV1Server is FQDN of legacy v1 server LegacyV1Server = "https://index.docker.io/v1" // LegacyV2Server is FQDN of legacy v2 server LegacyV2Server = "https://index.docker.io/v2" )
Variables ¶
View Source
var Logger = log.Log.WithName("image-client")
Functions ¶
This section is empty.
Types ¶
type APIRepositories ¶
type APIRepositories struct {
Repositories []string `json:"repositories"`
}
API
type APIRepository ¶
type APIRepositoryList ¶
type APIRepositoryList []APIRepository
func (*APIRepositoryList) AddRepository ¶
func (l *APIRepositoryList) AddRepository(repo APIRepository)
func (APIRepositoryList) GetRepository ¶
func (l APIRepositoryList) GetRepository(name string) *APIRepository
type Image ¶
type Image struct { ServerURL string Host string Name string FamiliarName string Tag string Digest string // username:password string encrypted by base64 BasicAuth string Token auth.Token HttpClient http.Client }
func (*Image) DeleteManifest ¶
func (r *Image) DeleteManifest(manifest *ImageManifest) error
DeleteManifest deletes manifest in the registry
func (*Image) GetImageNameWithHost ¶
func (*Image) GetManifest ¶
func (r *Image) GetManifest() (*ImageManifest, error)
GetManifest gets manifests of image in the registry
func (*Image) NormalizeNamed ¶
NormalizeNamed normalize image for default server
func (*Image) PutManifest ¶
func (r *Image) PutManifest(manifest *ImageManifest) error
func (*Image) SetImage ¶
SetImage sets image from "[<server>/]<imageName>[:<tag>|@<digest>]" form argument
func (*Image) SetServerURL ¶
SetServerURL sets registry server URL
func (*Image) Tags ¶
func (r *Image) Tags() *APIRepository
type ImageManifest ¶
type ImageManifest struct { Digest string ContentLength int64 Manifest distribution.Manifest }
Click to show internal directories.
Click to hide internal directories.