registry

package
v0.0.0-...-c295410 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2016 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 3 more Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ManifestVersion1 : schema 1
	ManifestVersion1 = manifest.Versioned{
		SchemaVersion: 1,
		MediaType:     schema1.MediaTypeManifest,
	}
	// ManifestVersion2 : schema 2
	ManifestVersion2 = manifest.Versioned{
		SchemaVersion: 2,
		MediaType:     schema2.MediaTypeManifest,
	}
)

Functions

func NewAuthTransport

func NewAuthTransport(transport http.RoundTripper, handlers []auth.Handler) http.RoundTripper

NewAuthTransport wraps the AuthHandlers to be http.RounTripper

func NewClient

func NewClient(handlers []auth.Handler) *http.Client

NewClient returns a http.Client according to the handlers provided

func NewClientStandardAuthHandlerEmbeded

func NewClientStandardAuthHandlerEmbeded(credential auth.Credential) *http.Client

NewClientStandardAuthHandlerEmbeded return a http.Client which will authorize the request according to the credential provided and send it again when encounters a 401 error

func NewClientUsernameAuthHandlerEmbeded

func NewClientUsernameAuthHandlerEmbeded(username string) *http.Client

NewClientUsernameAuthHandlerEmbeded return a http.Client which will authorize the request according to the user's privileges and send it again when encounters a 401 error

func UnMarshal

func UnMarshal(mediaType string, data []byte) (distribution.Manifest, distribution.Descriptor, error)

UnMarshal converts []byte to be distribution.Manifest

Types

type Registry

type Registry struct {
	Endpoint *url.URL
	// contains filtered or unexported fields
}

Registry holds information of a registry entiry

func New

func New(endpoint string, client *http.Client) (*Registry, error)

New returns an instance of Registry

func (*Registry) Catalog

func (r *Registry) Catalog() ([]string, error)

Catalog ...

func (*Registry) DeleteBlob

func (r *Registry) DeleteBlob(name, digest string) error

DeleteBlob ...

func (*Registry) DeleteManifest

func (r *Registry) DeleteManifest(name, digest string) error

DeleteManifest ...

func (*Registry) DeleteTag

func (r *Registry) DeleteTag(name, tag string) error

DeleteTag ...

func (*Registry) ListTag

func (r *Registry) ListTag(name string) ([]string, error)

ListTag ...

func (*Registry) ManifestExist

func (r *Registry) ManifestExist(name, reference string) (digest string, exist bool, err error)

ManifestExist ...

func (*Registry) PullManifest

func (r *Registry) PullManifest(name, reference string, version manifest.Versioned) (digest, mediaType string, payload []byte, err error)

PullManifest ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL