registry

package
v0.0.0-...-e66715b Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MAPPING is the elastic mapping for the docker registry
	MAPPING, _ = elastic.NewMapping(mappingString)
)

Functions

func DecodeKey

func DecodeKey(id string) (string, error)

func Key

func Key(id string) datastore.Key

Types

type Image

type Image struct {
	Library string
	Repo    string
	Tag     string
	UUID    string
	Hash    string
	datastore.VersionedEntity
}

func (*Image) ID

func (image *Image) ID() string

func (*Image) String

func (image *Image) String() string

func (*Image) ValidEntity

func (image *Image) ValidEntity() error

type ImageRegistryStore

type ImageRegistryStore interface {
	// Get an image by id.  Return ErrNoSuchEntity if not found
	Get(ctx datastore.Context, id string) (*Image, error)

	// Put adds/updates an image to the registry
	Put(ctx datastore.Context, image *Image) error

	// Delete removes an image from the registry
	Delete(ctx datastore.Context, id string) error

	// GetImages returns all the images that are in the registry
	GetImages(ctx datastore.Context) ([]Image, error)

	// SearchLibraryByTag looks for repos that are registered under a library and tag
	SearchLibraryByTag(ctx datastore.Context, library, tag string) ([]Image, error)
}

RegistryImageStore is the database for the docker image registry

func NewStore

func NewStore() ImageRegistryStore

NewStore creates a new image registry store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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