client

package
v0.0.0-...-8452b8d Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfigInterface

type BuildConfigInterface interface {
	ListBuildConfigs(labels.Selector) (*buildapi.BuildConfigList, error)
	GetBuildConfig(id string) (*buildapi.BuildConfig, error)
	CreateBuildConfig(*buildapi.BuildConfig) (*buildapi.BuildConfig, error)
	UpdateBuildConfig(*buildapi.BuildConfig) (*buildapi.BuildConfig, error)
	DeleteBuildConfig(string) error
}

BuildConfigInterface exposes methods on BuildConfig resources

type BuildInterface

type BuildInterface interface {
	ListBuilds(labels.Selector) (*buildapi.BuildList, error)
	CreateBuild(*buildapi.Build) (*buildapi.Build, error)
	UpdateBuild(*buildapi.Build) (*buildapi.Build, error)
	DeleteBuild(string) error
}

BuildInterface exposes methods on Build resources.

type Client

type Client struct {
	*kubeclient.RESTClient
}

Client is an OpenShift client object

func New

func New(host, version string, auth *kubeclient.AuthInfo) (*Client, error)

New creates and returns a new Client.

func (*Client) CreateBuild

func (c *Client) CreateBuild(build *buildapi.Build) (result *buildapi.Build, err error)

CreateBuild creates new build. Returns the server's representation of the build and error if one occurs.

func (*Client) CreateBuildConfig

func (c *Client) CreateBuildConfig(build *buildapi.BuildConfig) (result *buildapi.BuildConfig, err error)

CreateBuildConfig creates a new buildconfig. Returns the server's representation of the buildconfig and error if one occurs.

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(deployment *deployapi.Deployment) (result *deployapi.Deployment, err error)

CreateDeployment creates a new deployment

func (*Client) CreateDeploymentConfig

func (c *Client) CreateDeploymentConfig(deploymentConfig *deployapi.DeploymentConfig) (result *deployapi.DeploymentConfig, err error)

CreateDeploymentConfig creates a new deploymentConfig

func (*Client) CreateImage

func (c *Client) CreateImage(image *imageapi.Image) (result *imageapi.Image, err error)

CreateImage creates a new image. Returns the server's representation of the image and error if one occurs.

func (*Client) CreateImageRepository

func (c *Client) CreateImageRepository(repo *imageapi.ImageRepository) (result *imageapi.ImageRepository, err error)

CreateImageRepository create a new imagerepository. Returns the server's representation of the imagerepository and error if one occurs.

func (*Client) CreateImageRepositoryMapping

func (c *Client) CreateImageRepositoryMapping(mapping *imageapi.ImageRepositoryMapping) error

CreateImageRepositoryMapping create a new imagerepository mapping on the server. Returns error if one occurs.

func (*Client) DeleteBuild

func (c *Client) DeleteBuild(id string) (err error)

DeleteBuild deletes a build, returns error if one occurs.

func (*Client) DeleteBuildConfig

func (c *Client) DeleteBuildConfig(id string) error

DeleteBuildConfig deletes a BuildConfig, returns error if one occurs.

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(id string) error

DeleteDeployment deletes an existing replication deployment.

func (*Client) DeleteDeploymentConfig

func (c *Client) DeleteDeploymentConfig(id string) error

DeleteDeploymentConfig deletes an existing deploymentConfig.

func (*Client) GetBuildConfig

func (c *Client) GetBuildConfig(id string) (result *buildapi.BuildConfig, err error)

GetBuildConfig returns information about a particular buildconfig and error if one occurs.

func (*Client) GetDeployment

func (c *Client) GetDeployment(id string) (result *deployapi.Deployment, err error)

GetDeployment returns information about a particular deployment

func (*Client) GetDeploymentConfig

func (c *Client) GetDeploymentConfig(id string) (result *deployapi.DeploymentConfig, err error)

GetDeploymentConfig returns information about a particular deploymentConfig

func (*Client) GetImage

func (c *Client) GetImage(id string) (result *imageapi.Image, err error)

GetImage returns information about a particular image and error if one occurs.

func (*Client) GetImageRepository

func (c *Client) GetImageRepository(id string) (result *imageapi.ImageRepository, err error)

GetImageRepository returns information about a particular imagerepository and error if one occurs.

func (*Client) ListBuildConfigs

func (c *Client) ListBuildConfigs(selector labels.Selector) (result *buildapi.BuildConfigList, err error)

ListBuildConfigs returns a list of buildconfigs that match the selector.

func (*Client) ListBuilds

func (c *Client) ListBuilds(selector labels.Selector) (result *buildapi.BuildList, err error)

ListBuilds returns a list of builds that match the selector.

func (*Client) ListDeploymentConfigs

func (c *Client) ListDeploymentConfigs(selector labels.Selector) (result *deployapi.DeploymentConfigList, err error)

ListDeploymentConfigs takes a selector, and returns the list of deploymentConfigs that match that selector

func (*Client) ListDeployments

func (c *Client) ListDeployments(selector labels.Selector) (result *deployapi.DeploymentList, err error)

ListDeployments takes a selector, and returns the list of deployments that match that selector

func (*Client) ListImageRepositories

func (c *Client) ListImageRepositories(selector labels.Selector) (result *imageapi.ImageRepositoryList, err error)

ListImageRepositories returns a list of imagerepositories that match the selector.

func (*Client) ListImages

func (c *Client) ListImages(selector labels.Selector) (result *imageapi.ImageList, err error)

ListImages returns a list of images that match the selector.

func (*Client) UpdateBuild

func (c *Client) UpdateBuild(build *buildapi.Build) (result *buildapi.Build, err error)

UpdateBuild updates the build on server. Returns the server's representation of the build and error if one occurs.

func (*Client) UpdateBuildConfig

func (c *Client) UpdateBuildConfig(build *buildapi.BuildConfig) (result *buildapi.BuildConfig, err error)

UpdateBuildConfig updates the buildconfig on server. Returns the server's representation of the buildconfig and error if one occurs.

func (*Client) UpdateDeployment

func (c *Client) UpdateDeployment(deployment *deployapi.Deployment) (result *deployapi.Deployment, err error)

UpdateDeployment updates an existing deployment

func (*Client) UpdateDeploymentConfig

func (c *Client) UpdateDeploymentConfig(deploymentConfig *deployapi.DeploymentConfig) (result *deployapi.DeploymentConfig, err error)

UpdateDeploymentConfig updates an existing deploymentConfig

func (*Client) UpdateImageRepository

func (c *Client) UpdateImageRepository(repo *imageapi.ImageRepository) (result *imageapi.ImageRepository, err error)

UpdateImageRepository updates the imagerepository on the server. Returns the server's representation of the imagerepository and error if one occurs.

func (*Client) WatchImageRepositories

func (c *Client) WatchImageRepositories(field, label labels.Selector, resourceVersion uint64) (watch.Interface, error)

WatchImageRepositories returns a watch.Interface that watches the requested imagerepositories.

type DeploymentConfigInterface

type DeploymentConfigInterface interface {
	ListDeploymentConfigs(selector labels.Selector) (*deployapi.DeploymentConfigList, error)
	GetDeploymentConfig(id string) (*deployapi.DeploymentConfig, error)
	CreateDeploymentConfig(*deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
	UpdateDeploymentConfig(*deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
	DeleteDeploymentConfig(string) error
}

DeploymentConfigInterface contains methods for working with DeploymentConfigs

type DeploymentInterface

type DeploymentInterface interface {
	ListDeployments(selector labels.Selector) (*deployapi.DeploymentList, error)
	GetDeployment(id string) (*deployapi.Deployment, error)
	CreateDeployment(*deployapi.Deployment) (*deployapi.Deployment, error)
	UpdateDeployment(*deployapi.Deployment) (*deployapi.Deployment, error)
	DeleteDeployment(string) error
}

DeploymentInterface contains methods for working with Deployments

type Fake

type Fake struct {
	// Fake by default keeps a simple list of the methods that have been called.
	Actions []FakeAction
}

Fake implements Interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func (*Fake) CreateBuild

func (c *Fake) CreateBuild(build *buildapi.Build) (*buildapi.Build, error)

func (*Fake) CreateBuildConfig

func (c *Fake) CreateBuildConfig(config *buildapi.BuildConfig) (*buildapi.BuildConfig, error)

func (*Fake) CreateDeployment

func (c *Fake) CreateDeployment(deployment *deployapi.Deployment) (*deployapi.Deployment, error)

func (*Fake) CreateDeploymentConfig

func (c *Fake) CreateDeploymentConfig(config *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)

func (*Fake) CreateImage

func (c *Fake) CreateImage(image *imageapi.Image) (*imageapi.Image, error)

func (*Fake) CreateImageRepository

func (c *Fake) CreateImageRepository(repo *imageapi.ImageRepository) (*imageapi.ImageRepository, error)

func (*Fake) CreateImageRepositoryMapping

func (c *Fake) CreateImageRepositoryMapping(mapping *imageapi.ImageRepositoryMapping) error

func (*Fake) DeleteBuild

func (c *Fake) DeleteBuild(id string) error

func (*Fake) DeleteBuildConfig

func (c *Fake) DeleteBuildConfig(id string) error

func (*Fake) DeleteDeployment

func (c *Fake) DeleteDeployment(id string) error

func (*Fake) DeleteDeploymentConfig

func (c *Fake) DeleteDeploymentConfig(id string) error

func (*Fake) GetBuildConfig

func (c *Fake) GetBuildConfig(id string) (*buildapi.BuildConfig, error)

func (*Fake) GetDeployment

func (c *Fake) GetDeployment(id string) (*deployapi.Deployment, error)

func (*Fake) GetDeploymentConfig

func (c *Fake) GetDeploymentConfig(id string) (*deployapi.DeploymentConfig, error)

func (*Fake) GetImage

func (c *Fake) GetImage(id string) (*imageapi.Image, error)

func (*Fake) GetImageRepository

func (c *Fake) GetImageRepository(id string) (*imageapi.ImageRepository, error)

func (*Fake) ListBuildConfigs

func (c *Fake) ListBuildConfigs(selector labels.Selector) (*buildapi.BuildConfigList, error)

func (*Fake) ListBuilds

func (c *Fake) ListBuilds(selector labels.Selector) (*buildapi.BuildList, error)

func (*Fake) ListDeploymentConfigs

func (c *Fake) ListDeploymentConfigs(selector labels.Selector) (*deployapi.DeploymentConfigList, error)

func (*Fake) ListDeployments

func (c *Fake) ListDeployments(selector labels.Selector) (*deployapi.DeploymentList, error)

func (*Fake) ListImageRepositories

func (c *Fake) ListImageRepositories(selector labels.Selector) (*imageapi.ImageRepositoryList, error)

func (*Fake) ListImages

func (c *Fake) ListImages(selector labels.Selector) (*imageapi.ImageList, error)

func (*Fake) UpdateBuild

func (c *Fake) UpdateBuild(build *buildapi.Build) (*buildapi.Build, error)

func (*Fake) UpdateBuildConfig

func (c *Fake) UpdateBuildConfig(config *buildapi.BuildConfig) (*buildapi.BuildConfig, error)

func (*Fake) UpdateDeployment

func (c *Fake) UpdateDeployment(deployment *deployapi.Deployment) (*deployapi.Deployment, error)

func (*Fake) UpdateDeploymentConfig

func (c *Fake) UpdateDeploymentConfig(config *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)

func (*Fake) UpdateImageRepository

func (c *Fake) UpdateImageRepository(repo *imageapi.ImageRepository) (*imageapi.ImageRepository, error)

func (*Fake) WatchImageRepositories

func (c *Fake) WatchImageRepositories(field, label labels.Selector, resourceVersion uint64) (watch.Interface, error)

type FakeAction

type FakeAction struct {
	Action string
	Value  interface{}
}

type ImageInterface

type ImageInterface interface {
	ListImages(labels.Selector) (*imageapi.ImageList, error)
	GetImage(string) (*imageapi.Image, error)
	CreateImage(*imageapi.Image) (*imageapi.Image, error)
}

ImageInterface exposes methods on Image resources.

type ImageRepositoryInterface

type ImageRepositoryInterface interface {
	ListImageRepositories(labels.Selector) (*imageapi.ImageRepositoryList, error)
	GetImageRepository(string) (*imageapi.ImageRepository, error)
	WatchImageRepositories(field, label labels.Selector, resourceVersion uint64) (watch.Interface, error)
	CreateImageRepository(*imageapi.ImageRepository) (*imageapi.ImageRepository, error)
	UpdateImageRepository(*imageapi.ImageRepository) (*imageapi.ImageRepository, error)
}

ImageRepositoryInterface exposes methods on ImageRepository resources.

type ImageRepositoryMappingInterface

type ImageRepositoryMappingInterface interface {
	CreateImageRepositoryMapping(*imageapi.ImageRepositoryMapping) error
}

ImageRepositoryMappingInterface exposes methods on ImageRepositoryMapping resources.

Jump to

Keyboard shortcuts

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