Versions in this module Expand all Collapse all v1 v1.3.4 Apr 16, 2020 v1.0.0 May 17, 2020 Changes in this version + const LegacyConfigMediaType + var ErrInvalidAuthorization = errors.New("authorization failed") + var ErrNoToken = errors.New("authorization server did not include a token in the response") + var ErrorCodeDenied = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeTooManyRequests = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeUnauthorized = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeUnavailable = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeUnknown = Register("errcode", ErrorDescriptor{ ... }) + var ErrorCodeUnsupported = Register("errcode", ErrorDescriptor{ ... }) + var MaxManifestSize int64 = 4 * 1048 * 1048 + func AppendDistributionSourceLabel(manager content.Manager, ref string) (images.HandlerFunc, error) + func ConvertManifest(ctx context.Context, store content.Store, desc ocispec.Descriptor) (ocispec.Descriptor, error) + func DefaultHost(ns string) (string, error) + func GetGroupNames() []string + func MatchAllHosts(string) (bool, error) + func MatchLocalhost(host string) (bool, error) + func NewResolver(options ResolverOptions) remotes.Resolver + func WithScope(ctx context.Context, scope string) context.Context + type Authorizer interface + AddResponses func(context.Context, []*http.Response) error + Authorize func(context.Context, *http.Request) error + func NewAuthorizer(client *http.Client, f func(string) (string, string, error)) Authorizer + func NewDockerAuthorizer(opts ...AuthorizerOpt) Authorizer + type AuthorizerOpt func(*authorizerConfig) + func WithAuthClient(client *http.Client) AuthorizerOpt + func WithAuthCreds(creds func(string) (string, string, error)) AuthorizerOpt + func WithAuthHeader(hdr http.Header) AuthorizerOpt + type Error struct + Code ErrorCode + Detail interface{} + Message string + func (e Error) Error() string + func (e Error) ErrorCode() ErrorCode + func (e Error) WithArgs(args ...interface{}) Error + func (e Error) WithDetail(detail interface{}) Error + type ErrorCode int + func ParseErrorCode(value string) ErrorCode + func Register(group string, descriptor ErrorDescriptor) ErrorCode + func (ec *ErrorCode) UnmarshalText(text []byte) error + func (ec ErrorCode) Descriptor() ErrorDescriptor + func (ec ErrorCode) Error() string + func (ec ErrorCode) ErrorCode() ErrorCode + func (ec ErrorCode) MarshalText() (text []byte, err error) + func (ec ErrorCode) Message() string + func (ec ErrorCode) String() string + func (ec ErrorCode) WithArgs(args ...interface{}) Error + func (ec ErrorCode) WithDetail(detail interface{}) Error + func (ec ErrorCode) WithMessage(message string) Error + type ErrorCoder interface + ErrorCode func() ErrorCode + type ErrorDescriptor struct + Code ErrorCode + Description string + HTTPStatusCode int + Message string + Value string + func GetErrorAllDescriptors() []ErrorDescriptor + func GetErrorCodeGroup(name string) []ErrorDescriptor + type Errors []error + func (errs *Errors) UnmarshalJSON(data []byte) error + func (errs Errors) Error() string + func (errs Errors) Len() int + func (errs Errors) MarshalJSON() ([]byte, error) + type HostCapabilities uint8 + const HostCapabilityPull + const HostCapabilityPush + const HostCapabilityResolve + func (c HostCapabilities) Has(t HostCapabilities) bool + type RegistryHost struct + Authorizer Authorizer + Capabilities HostCapabilities + Client *http.Client + Host string + Path string + Scheme string + type RegistryHosts func(string) ([]RegistryHost, error) + func ConfigureDefaultRegistries(ropts ...RegistryOpt) RegistryHosts + func Registries(registries ...RegistryHosts) RegistryHosts + type RegistryOpt func(*registryOpts) + func WithAuthorizer(a Authorizer) RegistryOpt + func WithClient(c *http.Client) RegistryOpt + func WithHostTranslator(h func(string) (string, error)) RegistryOpt + func WithPlainHTTP(f func(string) (bool, error)) RegistryOpt + type ResolverOptions struct + Authorizer Authorizer + Client *http.Client + Credentials func(string) (string, string, error) + Headers http.Header + Host func(string) (string, error) + Hosts RegistryHosts + PlainHTTP bool + Tracker StatusTracker + type Status struct + UploadUUID string + type StatusTracker interface + GetStatus func(string) (Status, error) + SetStatus func(string, Status) + func NewInMemoryTracker() StatusTracker