client

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEtagToTag added in v1.1.1

func AddEtagToTag(tag, etag string) distribution.ManifestServiceOption

AddEtagToTag allows a client to supply an eTag to GetByTag which will be used for a conditional HTTP request. If the eTag matches, a nil manifest and nil error will be returned. etag is automatically quoted when added to this map.

func NewRepository added in v1.1.1

func NewRepository(ctx context.Context, name, baseURL string, transport http.RoundTripper) (distribution.Repository, error)

NewRepository creates a new Repository for the given repository name and base URL.

func SuccessStatus added in v1.1.1

func SuccessStatus(status int) bool

SuccessStatus returns true if the argument is a successful HTTP response code (in the range 200 - 399 inclusive).

Types

type Registry added in v1.1.1

type Registry interface {
	Repositories(ctx context.Context, repos []string, last string) (n int, err error)
}

Registry provides an interface for calling Repositories, which returns a catalog of repositories.

func NewRegistry added in v1.1.1

func NewRegistry(ctx context.Context, baseURL string, transport http.RoundTripper) (Registry, error)

NewRegistry creates a registry namespace which can be used to get a listing of repositories

type UnexpectedHTTPResponseError added in v1.1.1

type UnexpectedHTTPResponseError struct {
	ParseErr error
	Response []byte
}

UnexpectedHTTPResponseError is returned when an expected HTTP status code is returned, but the content was unexpected and failed to be parsed.

func (*UnexpectedHTTPResponseError) Error added in v1.1.1

type UnexpectedHTTPStatusError

type UnexpectedHTTPStatusError struct {
	Status string
}

UnexpectedHTTPStatusError is returned when an unexpected HTTP status is returned when making a registry api call.

func (*UnexpectedHTTPStatusError) Error

func (e *UnexpectedHTTPStatusError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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