build

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewREST

func NewREST(registry Registry) apiserver.RESTStorage

NewREST creates a new REST for builds.

Types

type REST

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

REST implements the RESTStorage interface in terms of an Registry.

func (*REST) Create

func (r *REST) Create(ctx kapi.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)

Create registers a given new Build instance to r.registry.

func (*REST) Delete

func (r *REST) Delete(ctx kapi.Context, id string) (<-chan apiserver.RESTResult, error)

Delete asynchronously deletes the Build specified by its id.

func (*REST) Get

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

Get obtains the build specified by its id.

func (*REST) List

func (r *REST) List(ctx kapi.Context, selector, fields labels.Selector) (runtime.Object, error)

List obtains a list of Builds that match selector.

func (*REST) New

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

New creates a new Build object

func (*REST) NewList added in v0.2.1

func (*REST) NewList() runtime.Object

func (*REST) Update

func (r *REST) Update(ctx kapi.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)

Update replaces a given Build instance with an existing instance in r.registry.

func (*REST) Watch

func (r *REST) Watch(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

Watch begins watching for new, changed, or deleted Builds.

type Registry

type Registry interface {
	// ListBuilds obtains list of builds that match a selector.
	ListBuilds(ctx kapi.Context, labels labels.Selector) (*api.BuildList, error)
	// GetBuild retrieves a specific build.
	GetBuild(ctx kapi.Context, id string) (*api.Build, error)
	// CreateBuild creates a new build.
	CreateBuild(ctx kapi.Context, build *api.Build) error
	// UpdateBuild updates a build.
	UpdateBuild(ctx kapi.Context, build *api.Build) error
	// DeleteBuild deletes a build.
	DeleteBuild(ctx kapi.Context, id string) error
	// WatchBuilds watches builds.
	WatchBuilds(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

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

Jump to

Keyboard shortcuts

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