Documentation ¶
Index ¶
- func ImageRepositoryToSelectableFields(ir *api.ImageRepository) labels.Set
- func MatchImageRepository(label labels.Selector, field fields.Selector) generic.Matcher
- type DefaultRegistry
- type DefaultRegistryFunc
- type Registry
- type StatusStrategy
- type Storage
- type Strategy
- func (s Strategy) AllowCreateOnUpdate() bool
- func (s Strategy) Decorate(obj runtime.Object) error
- func (s Strategy) NamespaceScoped() bool
- func (s Strategy) ResetBeforeCreate(obj runtime.Object)
- func (s Strategy) Validate(obj runtime.Object) errors.ValidationErrorList
- func (s Strategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList
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.
Types ¶
type DefaultRegistry ¶ added in v0.4.2
DefaultRegistry returns the default Docker registry (host or host:port), or false if it is not available.
type DefaultRegistryFunc ¶ added in v0.4.2
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
type Storage interface { apiserver.RESTGracefulDeleter apiserver.RESTLister apiserver.RESTGetter apiserver.ResourceWatcher Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) }
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
AllowCreateOnUpdate is false for image repositories.
func (Strategy) Decorate ¶ added in v0.4.2
Decorate decorates repo.Status.DockerImageRepository using the logic from dockerImageRepository().
func (Strategy) NamespaceScoped ¶ added in v0.4.2
NamespaceScoped is true for image repositories.
func (Strategy) ResetBeforeCreate ¶ added in v0.4.2
ResetBeforeCreate clears fields that are not allowed to be set by end users on creation.
func (Strategy) Validate ¶ added in v0.4.2
func (s Strategy) Validate(obj runtime.Object) errors.ValidationErrorList
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.