imagerepository

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageRepositoryToSelectableFields added in v0.4.2

func ImageRepositoryToSelectableFields(ir *api.ImageRepository) labels.Set

ImageRepositoryToSelectableFields returns a label set that represents the object.

func MatchImageRepository added in v0.4.2

func MatchImageRepository(label labels.Selector, field fields.Selector) generic.Matcher

MatchImageRepository returns a generic matcher for a given label and field selector.

Types

type DefaultRegistry added in v0.4.2

type DefaultRegistry interface {
	DefaultRegistry() (string, bool)
}

DefaultRegistry returns the default Docker registry (host or host:port), or false if it is not available.

type DefaultRegistryFunc added in v0.4.2

type DefaultRegistryFunc func() (string, bool)

DefaultRegistryFunc implements DefaultRegistry for a simple function.

func (DefaultRegistryFunc) DefaultRegistry added in v0.4.2

func (fn DefaultRegistryFunc) DefaultRegistry() (string, bool)

DefaultRegistry implements the DefaultRegistry interface for a function.

type Registry

type Registry interface {
	// ListImageRepositories obtains a list of image repositories that match a selector.
	ListImageRepositories(ctx kapi.Context, selector labels.Selector) (*api.ImageRepositoryList, error)
	// GetImageRepository retrieves a specific image repository.
	GetImageRepository(ctx kapi.Context, id string) (*api.ImageRepository, error)
	// CreateImageRepository creates a new image repository.
	CreateImageRepository(ctx kapi.Context, repo *api.ImageRepository) error
	// UpdateImageRepository updates an image repository.
	UpdateImageRepository(ctx kapi.Context, repo *api.ImageRepository) error
	// UpdateImageRepository updates an image repository's status.
	UpdateImageRepositoryStatus(ctx kapi.Context, repo *api.ImageRepository) error
	// DeleteImageRepository deletes an image repository.
	DeleteImageRepository(ctx kapi.Context, id string) error
	// WatchImageRepositories watches for new/changed/deleted image repositories.
	WatchImageRepositories(ctx kapi.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
}

Registry is an interface for things that know how to store ImageRepository objects.

func NewRegistry added in v0.4.2

func NewRegistry(s Storage, status apiserver.RESTUpdater) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type StatusStrategy added in v0.4.2

type StatusStrategy struct {
	Strategy
}

func NewStatusStrategy added in v0.4.2

func NewStatusStrategy(strategy Strategy) StatusStrategy

NewStatusStrategy creates a status update strategy around an existing repository strategy.

func (StatusStrategy) ValidateUpdate added in v0.4.2

func (StatusStrategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList

type Storage added in v0.4.2

Storage is an interface for a standard REST Storage backend

type Strategy added in v0.4.2

type Strategy struct {
	runtime.ObjectTyper
	kapi.NameGenerator
	// contains filtered or unexported fields
}

Strategy implements behavior for ImageRepositories.

func NewStrategy added in v0.4.2

func NewStrategy(defaultRegistry DefaultRegistry) Strategy

Strategy is the default logic that applies when creating and updating ImageRepository objects via the REST API.

func (Strategy) AllowCreateOnUpdate added in v0.4.2

func (s Strategy) AllowCreateOnUpdate() bool

AllowCreateOnUpdate is false for image repositories.

func (Strategy) Decorate added in v0.4.2

func (s Strategy) Decorate(obj runtime.Object) error

Decorate decorates repo.Status.DockerImageRepository using the logic from dockerImageRepository().

func (Strategy) NamespaceScoped added in v0.4.2

func (s Strategy) NamespaceScoped() bool

NamespaceScoped is true for image repositories.

func (Strategy) ResetBeforeCreate added in v0.4.2

func (s Strategy) ResetBeforeCreate(obj runtime.Object)

ResetBeforeCreate clears fields that are not allowed to be set by end users on creation.

func (Strategy) Validate added in v0.4.2

Validate validates a new image repository.

func (Strategy) ValidateUpdate added in v0.4.2

func (s Strategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList

ValidateUpdate is the default update validation for an end user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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