Documentation ¶
Overview ¶
Package client provides a just-enough-features client for an OCI registry (https://github.com/opencontainers/distribution-spec/blob/master/spec.md).
It uses https://github.com/google/go-containerregistry/ under the hood.
Index ¶
Constants ¶
View Source
const ContentType = "content-type"
View Source
const MetaRepository = "repository"
MetaRepository is the name of the meta property this blob was retrieved from.
Variables ¶
View Source
var ( ErrUnexpectedStatusCode = errors.New("unexpected status code") ErrInvalidDigestFromServer = errors.New("server sent invalid digest") // ErrNotRegistryV2 is returned when the endpoint indicated by the image name // does not respond to a ping to /v2/ as expected. ErrNotRegistryV2 = errors.New("endpoint is not a registry with version v2") )
View Source
var (
ErrImageNameInvalid = errors.New("image name is of the wrong format")
)
View Source
var ErrRegistryUnwilling = errors.New("registry did not accept blob upload request")
View Source
var ErrUnexpectedDigest = errors.New("unexpected digest")
Functions ¶
Types ¶
type BlobService ¶
type BlobService struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct { Manifest *ManifestService Blob *BlobService Tags *TagService // contains filtered or unexported fields }
type ImageName ¶
func ParseImageName ¶
func (ImageName) AsURLPrefix ¶
func (ImageName) RegistryPrefix ¶
func (ImageName) RegistryStr ¶
type ManifestRef ¶
func ParseManifestRef ¶
func ParseManifestRef(r string) (ManifestRef, error)
func (ManifestRef) HasDigest ¶
func (mr ManifestRef) HasDigest() bool
func (ManifestRef) ManifestURL ¶
func (mr ManifestRef) ManifestURL() string
func (ManifestRef) String ¶
func (mr ManifestRef) String() string
type ManifestService ¶
type ManifestService struct {
// contains filtered or unexported fields
}
func (*ManifestService) Get ¶
func (ms *ManifestService) Get(ctx context.Context, mr ManifestRef, opts ...requestOption) (*digest.Digest, error)
func (*ManifestService) Head ¶
func (ms *ManifestService) Head(ctx context.Context, mr ManifestRef) error
func (*ManifestService) Put ¶
func (ms *ManifestService) Put(ctx context.Context, n ImageName, mr ManifestRef, dgst digest.Digest) error
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.