client

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 12 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 {
	List(label, field labels.Selector) (*buildapi.BuildConfigList, error)
	Get(name string) (*buildapi.BuildConfig, error)
	Create(config *buildapi.BuildConfig) (*buildapi.BuildConfig, error)
	Update(config *buildapi.BuildConfig) (*buildapi.BuildConfig, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

BuildConfigInterface exposes methods on BuildConfig resources

type BuildConfigsNamespacer added in v0.2.1

type BuildConfigsNamespacer interface {
	BuildConfigs(namespace string) BuildConfigInterface
}

BuildConfigsNamespacer has methods to work with BuildConfig resources in a namespace

type BuildInterface

type BuildInterface interface {
	List(label, field labels.Selector) (*buildapi.BuildList, error)
	Get(name string) (*buildapi.Build, error)
	Create(build *buildapi.Build) (*buildapi.Build, error)
	Update(build *buildapi.Build) (*buildapi.Build, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

BuildInterface exposes methods on Build resources.

type BuildsNamespacer added in v0.2.1

type BuildsNamespacer interface {
	Builds(namespace string) BuildInterface
}

BuildsNamespacer has methods to work with Build resources in a namespace

type Client

type Client struct {
	*kclient.RESTClient
}

Client is an OpenShift client object

func New

func New(c *kclient.Config) (*Client, error)

New creates an OpenShift client for the given config. This client works with builds, deployments, templates, routes, and images. It allows operations such as list, get, update and delete on these objects. An error is returned if the provided configuration is not valid.

func NewOrDie

func NewOrDie(c *kclient.Config) *Client

NewOrDie creates an OpenShift client and panics if the provided API version is not recognized.

func (*Client) BuildConfigs added in v0.2.1

func (c *Client) BuildConfigs(namespace string) BuildConfigInterface

func (*Client) Builds added in v0.2.1

func (c *Client) Builds(namespace string) BuildInterface

func (*Client) DeploymentConfigs added in v0.2.1

func (c *Client) DeploymentConfigs(namespace string) DeploymentConfigInterface

func (*Client) Deployments added in v0.2.1

func (c *Client) Deployments(namespace string) DeploymentInterface

func (*Client) ImageRepositories added in v0.2.1

func (c *Client) ImageRepositories(namespace string) ImageRepositoryInterface

func (*Client) ImageRepositoryMappings added in v0.2.1

func (c *Client) ImageRepositoryMappings(namespace string) ImageRepositoryMappingInterface

func (*Client) ImageRepositoryTags added in v0.2.1

func (c *Client) ImageRepositoryTags(namespace string) ImageRepositoryTagInterface

func (*Client) Images added in v0.2.1

func (c *Client) Images(namespace string) ImageInterface

func (*Client) Projects added in v0.2.1

func (c *Client) Projects() ProjectInterface

func (*Client) Routes added in v0.2.1

func (c *Client) Routes(namespace string) RouteInterface

func (*Client) UserIdentityMappings added in v0.2.1

func (c *Client) UserIdentityMappings() UserIdentityMappingInterface

func (*Client) Users added in v0.2.1

func (c *Client) Users() UserInterface

type DeploymentConfigInterface

type DeploymentConfigInterface interface {
	List(label, field labels.Selector) (*deployapi.DeploymentConfigList, error)
	Get(name string) (*deployapi.DeploymentConfig, error)
	Create(config *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
	Update(config *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
	Generate(name string) (*deployapi.DeploymentConfig, error)
}

DeploymentConfigInterface contains methods for working with DeploymentConfigs

type DeploymentConfigsNamespacer added in v0.2.1

type DeploymentConfigsNamespacer interface {
	DeploymentConfigs(namespace string) DeploymentConfigInterface
}

DeploymentConfigsNamespacer has methods to work with DeploymentConfig resources in a namespace

type DeploymentInterface

type DeploymentInterface interface {
	List(label, field labels.Selector) (*deployapi.DeploymentList, error)
	Get(name string) (*deployapi.Deployment, error)
	Create(deployment *deployapi.Deployment) (*deployapi.Deployment, error)
	Update(deployment *deployapi.Deployment) (*deployapi.Deployment, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

DeploymentInterface contains methods for working with Deployments

type DeploymentsNamespacer added in v0.2.1

type DeploymentsNamespacer interface {
	Deployments(namespace string) DeploymentInterface
}

DeploymentsNamespacer has methods to work with Deployment resources in a namespace

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) BuildConfigs added in v0.2.1

func (c *Fake) BuildConfigs(namespace string) BuildConfigInterface

func (*Fake) Builds added in v0.2.1

func (c *Fake) Builds(namespace string) BuildInterface

func (*Fake) DeploymentConfigs added in v0.2.1

func (c *Fake) DeploymentConfigs(namespace string) DeploymentConfigInterface

func (*Fake) Deployments added in v0.2.1

func (c *Fake) Deployments(namespace string) DeploymentInterface

func (*Fake) ImageRepositories added in v0.2.1

func (c *Fake) ImageRepositories(namespace string) ImageRepositoryInterface

func (*Fake) ImageRepositoryMappings added in v0.2.1

func (c *Fake) ImageRepositoryMappings(namespace string) ImageRepositoryMappingInterface

func (*Fake) ImageRepositoryTags added in v0.2.1

func (c *Fake) ImageRepositoryTags(namespace string) ImageRepositoryTagInterface

func (*Fake) Images added in v0.2.1

func (c *Fake) Images(namespace string) ImageInterface

func (*Fake) Projects added in v0.2.1

func (c *Fake) Projects() ProjectInterface

func (*Fake) Routes added in v0.2.1

func (c *Fake) Routes(namespace string) RouteInterface

func (*Fake) UserIdentityMappings added in v0.2.1

func (c *Fake) UserIdentityMappings() UserIdentityMappingInterface

func (*Fake) Users added in v0.2.1

func (c *Fake) Users() UserInterface

type FakeAction

type FakeAction struct {
	Action string
	Value  interface{}
}

type FakeBuildConfigs added in v0.2.1

type FakeBuildConfigs struct {
	Fake      *Fake
	Namespace string
}

FakeBuildConfigs implements BuildConfigInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeBuildConfigs) Create added in v0.2.1

func (*FakeBuildConfigs) Delete added in v0.2.1

func (c *FakeBuildConfigs) Delete(name string) error

func (*FakeBuildConfigs) Get added in v0.2.1

func (*FakeBuildConfigs) List added in v0.2.1

func (c *FakeBuildConfigs) List(label, field labels.Selector) (*buildapi.BuildConfigList, error)

func (*FakeBuildConfigs) Update added in v0.2.1

func (*FakeBuildConfigs) Watch added in v0.2.1

func (c *FakeBuildConfigs) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeBuilds added in v0.2.1

type FakeBuilds struct {
	Fake      *Fake
	Namespace string
}

FakeBuilds implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeBuilds) Create added in v0.2.1

func (c *FakeBuilds) Create(build *buildapi.Build) (*buildapi.Build, error)

func (*FakeBuilds) Delete added in v0.2.1

func (c *FakeBuilds) Delete(name string) error

func (*FakeBuilds) Get added in v0.2.1

func (c *FakeBuilds) Get(name string) (*buildapi.Build, error)

func (*FakeBuilds) List added in v0.2.1

func (c *FakeBuilds) List(label, field labels.Selector) (*buildapi.BuildList, error)

func (*FakeBuilds) Update added in v0.2.1

func (c *FakeBuilds) Update(build *buildapi.Build) (*buildapi.Build, error)

func (*FakeBuilds) Watch added in v0.2.1

func (c *FakeBuilds) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeDeploymentConfigs added in v0.2.1

type FakeDeploymentConfigs struct {
	Fake      *Fake
	Namespace string
}

FakeDeploymentConfigs implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeDeploymentConfigs) Create added in v0.2.1

func (*FakeDeploymentConfigs) Delete added in v0.2.1

func (c *FakeDeploymentConfigs) Delete(name string) error

func (*FakeDeploymentConfigs) Generate added in v0.2.1

func (*FakeDeploymentConfigs) Get added in v0.2.1

func (*FakeDeploymentConfigs) List added in v0.2.1

func (*FakeDeploymentConfigs) Update added in v0.2.1

func (*FakeDeploymentConfigs) Watch added in v0.2.1

func (c *FakeDeploymentConfigs) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeDeployments added in v0.2.1

type FakeDeployments struct {
	Fake      *Fake
	Namespace string
}

FakeDeployments implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeDeployments) Create added in v0.2.1

func (c *FakeDeployments) Create(deployment *deployapi.Deployment) (*deployapi.Deployment, error)

func (*FakeDeployments) Delete added in v0.2.1

func (c *FakeDeployments) Delete(name string) error

func (*FakeDeployments) Get added in v0.2.1

func (c *FakeDeployments) Get(name string) (*deployapi.Deployment, error)

func (*FakeDeployments) List added in v0.2.1

func (c *FakeDeployments) List(label, field labels.Selector) (*deployapi.DeploymentList, error)

func (*FakeDeployments) Update added in v0.2.1

func (c *FakeDeployments) Update(deployment *deployapi.Deployment) (*deployapi.Deployment, error)

func (*FakeDeployments) Watch added in v0.2.1

func (c *FakeDeployments) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeImageRepositories added in v0.2.1

type FakeImageRepositories struct {
	Fake      *Fake
	Namespace string
}

FakeImageRepositories implements ImageInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeImageRepositories) Create added in v0.2.1

func (*FakeImageRepositories) Delete added in v0.2.1

func (c *FakeImageRepositories) Delete(name string) error

func (*FakeImageRepositories) Get added in v0.2.1

func (*FakeImageRepositories) List added in v0.2.1

func (*FakeImageRepositories) Update added in v0.2.1

func (*FakeImageRepositories) Watch added in v0.2.1

func (c *FakeImageRepositories) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeImageRepositoryMappings added in v0.2.1

type FakeImageRepositoryMappings struct {
	Fake      *Fake
	Namespace string
}

FakeImageRepositories implements ImageInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeImageRepositoryMappings) Create added in v0.2.1

type FakeImageRepositoryTags added in v0.2.1

type FakeImageRepositoryTags struct {
	Fake      *Fake
	Namespace string
}

FakeImageRepositories implements ImageInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeImageRepositoryTags) Get added in v0.2.1

func (c *FakeImageRepositoryTags) Get(name, tag string) (result *imageapi.Image, err error)

type FakeImages added in v0.2.1

type FakeImages struct {
	Fake      *Fake
	Namespace string
}

FakeImages implements ImageInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeImages) Create added in v0.2.1

func (c *FakeImages) Create(image *imageapi.Image) (*imageapi.Image, error)

func (*FakeImages) Delete added in v0.2.1

func (c *FakeImages) Delete(name string) error

func (*FakeImages) Get added in v0.2.1

func (c *FakeImages) Get(name string) (*imageapi.Image, error)

func (*FakeImages) List added in v0.2.1

func (c *FakeImages) List(label, field labels.Selector) (*imageapi.ImageList, error)

type FakeProjects added in v0.2.1

type FakeProjects struct {
	Fake *Fake
}

func (*FakeProjects) Create added in v0.2.1

func (c *FakeProjects) Create(project *projectapi.Project) (*projectapi.Project, error)

func (*FakeProjects) Delete added in v0.2.1

func (c *FakeProjects) Delete(name string) error

func (*FakeProjects) Get added in v0.2.1

func (c *FakeProjects) Get(name string) (*projectapi.Project, error)

func (*FakeProjects) List added in v0.2.1

func (c *FakeProjects) List(label, field labels.Selector) (*projectapi.ProjectList, error)

func (*FakeProjects) Update added in v0.2.1

func (c *FakeProjects) Update(project *projectapi.Project) (*projectapi.Project, error)

type FakeRoutes added in v0.2.1

type FakeRoutes struct {
	Fake      *Fake
	Namespace string
}

FakeRoutes implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeRoutes) Create added in v0.2.1

func (c *FakeRoutes) Create(route *routeapi.Route) (*routeapi.Route, error)

func (*FakeRoutes) Delete added in v0.2.1

func (c *FakeRoutes) Delete(name string) error

func (*FakeRoutes) Get added in v0.2.1

func (c *FakeRoutes) Get(name string) (*routeapi.Route, error)

func (*FakeRoutes) List added in v0.2.1

func (c *FakeRoutes) List(label, field labels.Selector) (*routeapi.RouteList, error)

func (*FakeRoutes) Update added in v0.2.1

func (c *FakeRoutes) Update(route *routeapi.Route) (*routeapi.Route, error)

func (*FakeRoutes) Watch added in v0.2.1

func (c *FakeRoutes) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)

type FakeUserIdentityMappings added in v0.2.1

type FakeUserIdentityMappings struct {
	Fake *Fake
}

FakeUserIdentityMappings implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeUserIdentityMappings) CreateOrUpdate added in v0.2.1

type FakeUsers added in v0.2.1

type FakeUsers struct {
	Fake *Fake
}

FakeUserss implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeUsers) Get added in v0.2.1

func (c *FakeUsers) Get(name string) (*userapi.User, error)

type ImageInterface

type ImageInterface interface {
	List(label, field labels.Selector) (*imageapi.ImageList, error)
	Get(name string) (*imageapi.Image, error)
	Create(image *imageapi.Image) (*imageapi.Image, error)
	Delete(name string) error
}

ImageInterface exposes methods on Image resources.

type ImageRepositoriesNamespacer added in v0.2.1

type ImageRepositoriesNamespacer interface {
	ImageRepositories(namespace string) ImageRepositoryInterface
}

ImageRepositoriesNamespacer has methods to work with ImageRepository resources in a namespace

type ImageRepositoryInterface

type ImageRepositoryInterface interface {
	List(label, field labels.Selector) (*imageapi.ImageRepositoryList, error)
	Get(name string) (*imageapi.ImageRepository, error)
	Create(repo *imageapi.ImageRepository) (*imageapi.ImageRepository, error)
	Update(repo *imageapi.ImageRepository) (*imageapi.ImageRepository, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

ImageRepositoryInterface exposes methods on ImageRepository resources.

type ImageRepositoryMappingInterface

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

ImageRepositoryMappingInterface exposes methods on ImageRepositoryMapping resources.

type ImageRepositoryMappingsNamespacer added in v0.2.1

type ImageRepositoryMappingsNamespacer interface {
	ImageRepositoryMappings(namespace string) ImageRepositoryMappingInterface
}

ImageRepositoryMappingsNamespacer has methods to work with ImageRepositoryMapping resources in a namespace

type ImageRepositoryTagInterface added in v0.2.1

type ImageRepositoryTagInterface interface {
	Get(name, tag string) (*api.Image, error)
}

ImageRepositoryTagInterface exposes methods on ImageRepositoryTag resources.

type ImageRepositoryTagsNamespacer added in v0.2.1

type ImageRepositoryTagsNamespacer interface {
	ImageRepositoryTags(namespace string) ImageRepositoryTagInterface
}

ImageRepositoryTagsNamespacer has methods to work with ImageRepositoryTag resources in a namespace

type ImagesNamespacer added in v0.2.1

type ImagesNamespacer interface {
	Images(namespace string) ImageInterface
}

ImagesNamespacer has methods to work with Image resources in a namespace

type ProjectInterface added in v0.2.1

type ProjectInterface interface {
	Get(name string) (*projectapi.Project, error)
	List(label, field labels.Selector) (*projectapi.ProjectList, error)
}

UserInterface exposes methods on user resources.

type ProjectsInterface added in v0.2.1

type ProjectsInterface interface {
	Projects() ProjectInterface
}

UsersInterface has methods to work with User resources in a namespace

type RouteInterface

type RouteInterface interface {
	List(label, field labels.Selector) (*routeapi.RouteList, error)
	Get(name string) (*routeapi.Route, error)
	Create(route *routeapi.Route) (*routeapi.Route, error)
	Update(route *routeapi.Route) (*routeapi.Route, error)
	Delete(name string) error
	Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

RouteInterface exposes methods on Route resources

type RoutesNamespacer added in v0.2.1

type RoutesNamespacer interface {
	Routes(namespace string) RouteInterface
}

RoutesNamespacer has methods to work with Route resources in a namespace

type UserIdentityMappingInterface

type UserIdentityMappingInterface interface {
	CreateOrUpdate(*userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, bool, error)
}

UserIdentityMappingInterface exposes methods on UserIdentityMapping resources.

type UserIdentityMappingsInterface added in v0.2.1

type UserIdentityMappingsInterface interface {
	UserIdentityMappings() UserIdentityMappingInterface
}

UserIdentityMappingsInterface has methods to work with UserIdentityMapping resources in a namespace

type UserInterface

type UserInterface interface {
	Get(name string) (*userapi.User, error)
}

UserInterface exposes methods on user resources.

type UsersInterface added in v0.2.1

type UsersInterface interface {
	Users() UserInterface
}

UsersInterface has methods to work with User resources in a namespace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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