docker

package
v0.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

README

Repository DockerDaemon - Images stored in a Docker Daemon

Synopsis
type: DockerDaemon/v1
Description

This repository type provides a mapping of the image repository behind a docker daemon to the OCI registry access API.

This is only possible with a set of limitation:

  • It is only possible to store and access flat images
  • There is no access by digests, only by tags.
  • The docker image id can be used as pseudo digest (without algorithm)
Specification Versions
Version v1

The type specific specification fields are:

  • dockerHost string

    Address of the docker daemon to use.

Go Bindings

The Go binding can be found here

Documentation

Index

Constants

View Source
const (
	Type   = "DockerDaemon"
	TypeV1 = Type + runtime.VersionSeparator + "v1"
)

Variables

This section is empty.

Functions

func ArtifactAsBlobCache

func ArtifactAsBlobCache(access cpi.ArtifactAccess) accessio.BlobCache

func ImageId

func ImageId(art cpi.Artifact) digest.Digest

func NewDataAccess

func NewDataAccess(src types.ImageSource, info types.BlobInfo, delayed bool) (*dataAccess, error)

func ParseGenericRef

func ParseGenericRef(ref string) (string, string, error)

func ParseRef

func ParseRef(name, version string) (types.ImageReference, error)

Types

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

func NewNamespace

func NewNamespace(repo *Repository, name string) (*Namespace, error)

func (*Namespace) AddArtifact

func (n *Namespace) AddArtifact(artifact cpi.Artifact, tags ...string) (accessio.BlobAccess, error)

func (*Namespace) AddBlob

func (n *Namespace) AddBlob(blob cpi.BlobAccess) error

func (*Namespace) AddTags

func (n *Namespace) AddTags(digest digest.Digest, tags ...string) error

func (*Namespace) Close

func (n *Namespace) Close() error

func (*Namespace) GetArtifact

func (n *Namespace) GetArtifact(vers string) (cpi.ArtifactAccess, error)

func (*Namespace) GetBlobData

func (n *Namespace) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)

func (*Namespace) GetNamespace

func (n *Namespace) GetNamespace() string

func (*Namespace) GetRepository

func (n *Namespace) GetRepository() cpi.Repository

func (*Namespace) ListTags

func (n *Namespace) ListTags() ([]string, error)

func (*Namespace) NewArtifact

func (n *Namespace) NewArtifact(art ...*artdesc.Artifact) (cpi.ArtifactAccess, error)

type NamespaceContainer

type NamespaceContainer struct {
	// contains filtered or unexported fields
}

func (*NamespaceContainer) AddArtifact

func (n *NamespaceContainer) AddArtifact(artifact cpi.Artifact, tags ...string) (access accessio.BlobAccess, err error)

func (*NamespaceContainer) AddBlob

func (n *NamespaceContainer) AddBlob(blob cpi.BlobAccess) error

func (*NamespaceContainer) AddTags

func (n *NamespaceContainer) AddTags(digest digest.Digest, tags ...string) error

func (*NamespaceContainer) Close

func (n *NamespaceContainer) Close() error

func (*NamespaceContainer) GetArtifact

func (n *NamespaceContainer) GetArtifact(vers string) (cpi.ArtifactAccess, error)

func (*NamespaceContainer) GetBlobData

func (n *NamespaceContainer) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)

func (*NamespaceContainer) GetBlobDescriptor

func (n *NamespaceContainer) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor

func (*NamespaceContainer) GetNamepace

func (n *NamespaceContainer) GetNamepace() string

func (*NamespaceContainer) IsClosed

func (n *NamespaceContainer) IsClosed() bool

func (*NamespaceContainer) IsReadOnly

func (n *NamespaceContainer) IsReadOnly() bool

func (*NamespaceContainer) ListTags

func (n *NamespaceContainer) ListTags() ([]string, error)

func (*NamespaceContainer) NewArtifactProvider

func (n *NamespaceContainer) NewArtifactProvider(state accessobj.State) (cpi.ArtifactProvider, error)

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(ctx cpi.Context, spec *RepositorySpec) (*Repository, error)

func (*Repository) Close

func (r *Repository) Close() error

func (*Repository) ExistsArtifact

func (r *Repository) ExistsArtifact(name string, version string) (bool, error)

func (*Repository) GetNamespaces

func (r *Repository) GetNamespaces(prefix string, closure bool) ([]string, error)

func (*Repository) GetRepositories

func (r *Repository) GetRepositories() ([]string, error)

func (*Repository) GetSpecification

func (r *Repository) GetSpecification() cpi.RepositorySpec

func (*Repository) IsClosed

func (r *Repository) IsClosed() bool

func (*Repository) IsReadOnly

func (r *Repository) IsReadOnly() bool

func (*Repository) LookupArtifact

func (r *Repository) LookupArtifact(name string, version string) (cpi.ArtifactAccess, error)

func (*Repository) LookupNamespace

func (r *Repository) LookupNamespace(name string) (cpi.NamespaceAccess, error)

func (*Repository) NamespaceLister

func (r *Repository) NamespaceLister() cpi.NamespaceLister

func (*Repository) NumNamespaces

func (r *Repository) NumNamespaces(prefix string) (int, error)

type RepositorySpec

type RepositorySpec struct {
	runtime.ObjectVersionedType `json:",inline"`
	DockerHost                  string `json:"dockerHost,omitempty"`
}

RepositorySpec describes an OCI registry interface backed by an oci registry.

func NewRepositorySpec

func NewRepositorySpec(host ...string) *RepositorySpec

NewRepositorySpec creates a new RepositorySpec for an optional host.

func (*RepositorySpec) GetType

func (a *RepositorySpec) GetType() string

func (*RepositorySpec) Name

func (a *RepositorySpec) Name() string

func (*RepositorySpec) Repository

func (a *RepositorySpec) Repository(ctx cpi.Context, creds credentials.Credentials) (cpi.Repository, error)

func (*RepositorySpec) UniformRepositorySpec

func (a *RepositorySpec) UniformRepositorySpec() *cpi.UniformRepositorySpec

Jump to

Keyboard shortcuts

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