Documentation ¶
Index ¶
- func AddEtagToTag(tag, etag string) distribution.ManifestServiceOption
- func NewRepository(ctx context.Context, name, baseURL string, transport http.RoundTripper) (distribution.Repository, error)
- func SuccessStatus(status int) bool
- type Registry
- type UnexpectedHTTPResponseError
- type UnexpectedHTTPStatusError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEtagToTag ¶
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 ¶
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
Types ¶
type Registry ¶
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.
type UnexpectedHTTPResponseError ¶
UnexpectedHTTPResponseError is returned when an expected HTTP status code is returned, but the content was unexpected and failed to be parsed.
func (*UnexpectedHTTPResponseError) Error ¶
func (e *UnexpectedHTTPResponseError) Error() string
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