imagestreamimage

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNameAndID

func ParseNameAndID(input string) (name string, id string, err error)

ParseNameAndID splits a string into its name component and ID component, and returns an error if the string is not in the right form.

Types

type REST

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

REST implements the RESTStorage interface in terms of an image registry and image stream registry. It only supports the Get method and is used to retrieve an image by id, scoped to an ImageStream. REST ensures that the requested image belongs to the specified ImageStream.

func NewREST

func NewREST(imageRegistry image.Registry, imageStreamRegistry imagestream.Registry) *REST

NewREST returns a new REST.

func (*REST) Get

func (r *REST) Get(ctx kapi.Context, id string) (runtime.Object, error)

Get retrieves an image by ID that has previously been tagged into an image stream. `id` is of the form <repo name>@<image id>.

func (*REST) New

func (r *REST) New() runtime.Object

New is only implemented to make REST implement RESTStorage

type Registry

type Registry interface {
	GetImageStreamImage(ctx kapi.Context, nameAndTag string) (*api.ImageStreamImage, error)
}

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

func NewRegistry

func NewRegistry(s Storage) Registry

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

type Storage

type Storage interface {
	rest.Getter
}

Storage is an interface for a standard REST Storage backend

Jump to

Keyboard shortcuts

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