docker

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 30 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 NewNamespace

func NewNamespace(repo *RepositoryImpl, name string) (cpi.NamespaceAccess, error)

func NewRepository

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

func ParseGenericRef

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

func ParseRef

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

Types

type RepositoryImpl

type RepositoryImpl struct {
	cpi.RepositoryImplBase
	// contains filtered or unexported fields
}

func (*RepositoryImpl) Close

func (r *RepositoryImpl) Close() error

func (*RepositoryImpl) ExistsArtifact

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

func (*RepositoryImpl) GetNamespaces

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

func (*RepositoryImpl) GetRepositories

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

func (*RepositoryImpl) GetSpecification

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

func (*RepositoryImpl) IsReadOnly

func (r *RepositoryImpl) IsReadOnly() bool

func (*RepositoryImpl) LookupArtifact

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

func (*RepositoryImpl) LookupNamespace

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

func (*RepositoryImpl) NamespaceLister

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

func (*RepositoryImpl) NumNamespaces

func (r *RepositoryImpl) 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