Documentation ¶
Index ¶
- func AddObjectsFromPath(path string, o ObjectRetriever, decoder runtime.Decoder) error
- type Action
- type ActionImpl
- type CreateAction
- type CreateActionImpl
- type DeleteAction
- type DeleteActionImpl
- type Fake
- func (c *Fake) Actions() []Action
- func (c *Fake) ClearActions()
- func (c *Fake) ComponentStatuses() client.ComponentStatusInterface
- func (c *Fake) Daemons(namespace string) client.DaemonInterface
- func (c *Fake) Endpoints(namespace string) client.EndpointsInterface
- func (c *Fake) Err() error
- func (c *Fake) Events(namespace string) client.EventInterface
- func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime.Object, error)
- func (c *Fake) LimitRanges(namespace string) client.LimitRangeInterface
- func (c *Fake) Namespaces() client.NamespaceInterface
- func (c *Fake) Nodes() client.NodeInterface
- func (c *Fake) PersistentVolumeClaims(namespace string) client.PersistentVolumeClaimInterface
- func (c *Fake) PersistentVolumes() client.PersistentVolumeInterface
- func (c *Fake) PodTemplates(namespace string) client.PodTemplateInterface
- func (c *Fake) Pods(namespace string) client.PodInterface
- func (c *Fake) ReplicationControllers(namespace string) client.ReplicationControllerInterface
- func (c *Fake) ResourceQuotas(namespace string) client.ResourceQuotaInterface
- func (c *Fake) Secrets(namespace string) client.SecretsInterface
- func (c *Fake) ServerAPIVersions() (*api.APIVersions, error)
- func (c *Fake) ServerVersion() (*version.Info, error)
- func (c *Fake) ServiceAccounts(namespace string) client.ServiceAccountsInterface
- func (c *Fake) Services(namespace string) client.ServiceInterface
- func (c *Fake) SetErr(err error)
- type FakeComponentStatuses
- type FakeDaemons
- func (c *FakeDaemons) Create(daemon *expapi.Daemon) (*expapi.Daemon, error)
- func (c *FakeDaemons) Delete(name string) error
- func (c *FakeDaemons) Get(name string) (*expapi.Daemon, error)
- func (c *FakeDaemons) List(label labels.Selector) (*expapi.DaemonList, error)
- func (c *FakeDaemons) Update(daemon *expapi.Daemon) (*expapi.Daemon, error)
- func (c *FakeDaemons) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeEndpoints
- func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (*api.Endpoints, error)
- func (c *FakeEndpoints) Delete(name string) error
- func (c *FakeEndpoints) Get(name string) (*api.Endpoints, error)
- func (c *FakeEndpoints) List(label labels.Selector) (*api.EndpointsList, error)
- func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (*api.Endpoints, error)
- func (c *FakeEndpoints) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeEvents
- func (c *FakeEvents) Create(event *api.Event) (*api.Event, error)
- func (c *FakeEvents) Delete(name string) error
- func (c *FakeEvents) Get(name string) (*api.Event, error)
- func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, ... *string) fields.Selector
- func (c *FakeEvents) List(label labels.Selector, field fields.Selector) (*api.EventList, error)
- func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error)
- func (c *FakeEvents) Update(event *api.Event) (*api.Event, error)
- func (c *FakeEvents) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeLimitRanges
- func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (*api.LimitRange, error)
- func (c *FakeLimitRanges) Delete(name string) error
- func (c *FakeLimitRanges) Get(name string) (*api.LimitRange, error)
- func (c *FakeLimitRanges) List(label labels.Selector) (*api.LimitRangeList, error)
- func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (*api.LimitRange, error)
- func (c *FakeLimitRanges) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeNamespaces
- func (c *FakeNamespaces) Create(namespace *api.Namespace) (*api.Namespace, error)
- func (c *FakeNamespaces) Delete(name string) error
- func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error)
- func (c *FakeNamespaces) Get(name string) (*api.Namespace, error)
- func (c *FakeNamespaces) List(label labels.Selector, field fields.Selector) (*api.NamespaceList, error)
- func (c *FakeNamespaces) Status(namespace *api.Namespace) (*api.Namespace, error)
- func (c *FakeNamespaces) Update(namespace *api.Namespace) (*api.Namespace, error)
- func (c *FakeNamespaces) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeNodes
- func (c *FakeNodes) Create(minion *api.Node) (*api.Node, error)
- func (c *FakeNodes) Delete(name string) error
- func (c *FakeNodes) Get(name string) (*api.Node, error)
- func (c *FakeNodes) List(label labels.Selector, field fields.Selector) (*api.NodeList, error)
- func (c *FakeNodes) Update(minion *api.Node) (*api.Node, error)
- func (c *FakeNodes) UpdateStatus(minion *api.Node) (*api.Node, error)
- func (c *FakeNodes) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakePersistentVolumeClaims
- func (c *FakePersistentVolumeClaims) Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
- func (c *FakePersistentVolumeClaims) Delete(name string) error
- func (c *FakePersistentVolumeClaims) Get(name string) (*api.PersistentVolumeClaim, error)
- func (c *FakePersistentVolumeClaims) List(label labels.Selector, field fields.Selector) (*api.PersistentVolumeClaimList, error)
- func (c *FakePersistentVolumeClaims) Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
- func (c *FakePersistentVolumeClaims) UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
- func (c *FakePersistentVolumeClaims) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakePersistentVolumes
- func (c *FakePersistentVolumes) Create(pv *api.PersistentVolume) (*api.PersistentVolume, error)
- func (c *FakePersistentVolumes) Delete(name string) error
- func (c *FakePersistentVolumes) Get(name string) (*api.PersistentVolume, error)
- func (c *FakePersistentVolumes) List(label labels.Selector, field fields.Selector) (*api.PersistentVolumeList, error)
- func (c *FakePersistentVolumes) Update(pv *api.PersistentVolume) (*api.PersistentVolume, error)
- func (c *FakePersistentVolumes) UpdateStatus(pv *api.PersistentVolume) (*api.PersistentVolume, error)
- func (c *FakePersistentVolumes) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakePodTemplates
- func (c *FakePodTemplates) Create(pod *api.PodTemplate) (*api.PodTemplate, error)
- func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error
- func (c *FakePodTemplates) Get(name string) (*api.PodTemplate, error)
- func (c *FakePodTemplates) List(label labels.Selector, field fields.Selector) (*api.PodTemplateList, error)
- func (c *FakePodTemplates) Update(pod *api.PodTemplate) (*api.PodTemplate, error)
- func (c *FakePodTemplates) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakePods
- func (c *FakePods) Bind(binding *api.Binding) error
- func (c *FakePods) Create(pod *api.Pod) (*api.Pod, error)
- func (c *FakePods) Delete(name string, options *api.DeleteOptions) error
- func (c *FakePods) Get(name string) (*api.Pod, error)
- func (c *FakePods) List(label labels.Selector, field fields.Selector) (*api.PodList, error)
- func (c *FakePods) Update(pod *api.Pod) (*api.Pod, error)
- func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error)
- func (c *FakePods) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeReplicationControllers
- func (c *FakeReplicationControllers) Create(controller *api.ReplicationController) (*api.ReplicationController, error)
- func (c *FakeReplicationControllers) Delete(name string) error
- func (c *FakeReplicationControllers) Get(name string) (*api.ReplicationController, error)
- func (c *FakeReplicationControllers) List(label labels.Selector) (*api.ReplicationControllerList, error)
- func (c *FakeReplicationControllers) Update(controller *api.ReplicationController) (*api.ReplicationController, error)
- func (c *FakeReplicationControllers) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeResourceQuotas
- func (c *FakeResourceQuotas) Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
- func (c *FakeResourceQuotas) Delete(name string) error
- func (c *FakeResourceQuotas) Get(name string) (*api.ResourceQuota, error)
- func (c *FakeResourceQuotas) List(label labels.Selector) (*api.ResourceQuotaList, error)
- func (c *FakeResourceQuotas) Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
- func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
- func (c *FakeResourceQuotas) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeSecrets
- func (c *FakeSecrets) Create(secret *api.Secret) (*api.Secret, error)
- func (c *FakeSecrets) Delete(name string) error
- func (c *FakeSecrets) Get(name string) (*api.Secret, error)
- func (c *FakeSecrets) List(label labels.Selector, field fields.Selector) (*api.SecretList, error)
- func (c *FakeSecrets) Update(secret *api.Secret) (*api.Secret, error)
- func (c *FakeSecrets) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeServiceAccounts
- func (c *FakeServiceAccounts) Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
- func (c *FakeServiceAccounts) Delete(name string) error
- func (c *FakeServiceAccounts) Get(name string) (*api.ServiceAccount, error)
- func (c *FakeServiceAccounts) List(label labels.Selector, field fields.Selector) (*api.ServiceAccountList, error)
- func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
- func (c *FakeServiceAccounts) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type FakeServices
- func (c *FakeServices) Create(service *api.Service) (*api.Service, error)
- func (c *FakeServices) Delete(name string) error
- func (c *FakeServices) Get(name string) (*api.Service, error)
- func (c *FakeServices) List(label labels.Selector) (*api.ServiceList, error)
- func (c *FakeServices) ProxyGet(name, path string, params map[string]string) unversioned.ResponseWrapper
- func (c *FakeServices) Update(service *api.Service) (*api.Service, error)
- func (c *FakeServices) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- type GenericAction
- type GenericActionImpl
- type GetAction
- type GetActionImpl
- type ListAction
- type ListActionImpl
- type ListRestrictions
- type ObjectRetriever
- type ProxyGetAction
- type ProxyGetActionImpl
- type ReactionFunc
- type UpdateAction
- type UpdateActionImpl
- type WatchAction
- type WatchActionImpl
- type WatchRestrictions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddObjectsFromPath ¶
func AddObjectsFromPath(path string, o ObjectRetriever, decoder runtime.Decoder) error
AddObjectsFromPath loads the JSON or YAML file containing Kubernetes API resources and adds them to the provided ObjectRetriever.
Types ¶
type ActionImpl ¶
func (ActionImpl) GetNamespace ¶
func (a ActionImpl) GetNamespace() string
func (ActionImpl) GetResource ¶
func (a ActionImpl) GetResource() string
func (ActionImpl) GetSubresource ¶
func (a ActionImpl) GetSubresource() string
func (ActionImpl) GetVerb ¶
func (a ActionImpl) GetVerb() string
func (ActionImpl) Matches ¶
func (a ActionImpl) Matches(verb, resource string) bool
type CreateAction ¶
type CreateActionImpl ¶
type CreateActionImpl struct { ActionImpl Object runtime.Object }
func NewCreateAction ¶
func NewCreateAction(resource, namespace string, object runtime.Object) CreateActionImpl
func NewRootCreateAction ¶
func NewRootCreateAction(resource string, object runtime.Object) CreateActionImpl
func (CreateActionImpl) GetObject ¶
func (a CreateActionImpl) GetObject() runtime.Object
type DeleteAction ¶
type DeleteActionImpl ¶
type DeleteActionImpl struct { ActionImpl Name string }
func NewDeleteAction ¶
func NewDeleteAction(resource, namespace, name string) DeleteActionImpl
func NewRootDeleteAction ¶
func NewRootDeleteAction(resource, name string) DeleteActionImpl
func (DeleteActionImpl) GetName ¶
func (a DeleteActionImpl) GetName() string
type Fake ¶
type Fake struct { sync.RWMutex Watch watch.Interface // ReactFn is an optional function that will be invoked with the provided action // and return a response. It can implement scenario specific behavior. The type // of object returned must match the expected type from the caller (even if nil). ReactFn ReactionFunc // contains filtered or unexported fields }
Fake implements client.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 NewSimpleFake ¶
NewSimpleFake returns a client that will respond with the provided objects
func (*Fake) Actions ¶
Actions returns a chronologically ordered slice fake actions called on the fake client
func (*Fake) ClearActions ¶
func (c *Fake) ClearActions()
ClearActions clears the history of actions called on the fake client
func (*Fake) ComponentStatuses ¶
func (c *Fake) ComponentStatuses() client.ComponentStatusInterface
func (*Fake) Invokes ¶
Invokes records the provided Action and then invokes the ReactFn (if provided). defaultReturnObj is expected to be of the same type a normal call would return.
func (*Fake) LimitRanges ¶
func (c *Fake) LimitRanges(namespace string) client.LimitRangeInterface
func (*Fake) Namespaces ¶
func (c *Fake) Namespaces() client.NamespaceInterface
func (*Fake) Nodes ¶
func (c *Fake) Nodes() client.NodeInterface
func (*Fake) PersistentVolumeClaims ¶
func (c *Fake) PersistentVolumeClaims(namespace string) client.PersistentVolumeClaimInterface
func (*Fake) PersistentVolumes ¶
func (c *Fake) PersistentVolumes() client.PersistentVolumeInterface
func (*Fake) PodTemplates ¶
func (c *Fake) PodTemplates(namespace string) client.PodTemplateInterface
func (*Fake) ReplicationControllers ¶
func (c *Fake) ReplicationControllers(namespace string) client.ReplicationControllerInterface
func (*Fake) ResourceQuotas ¶
func (c *Fake) ResourceQuotas(namespace string) client.ResourceQuotaInterface
func (*Fake) ServerAPIVersions ¶
func (c *Fake) ServerAPIVersions() (*api.APIVersions, error)
func (*Fake) ServiceAccounts ¶
func (c *Fake) ServiceAccounts(namespace string) client.ServiceAccountsInterface
type FakeComponentStatuses ¶
type FakeComponentStatuses struct {
Fake *Fake
}
Fake implements ComponentStatusInterface.
func (*FakeComponentStatuses) Get ¶
func (c *FakeComponentStatuses) Get(name string) (*api.ComponentStatus, error)
func (*FakeComponentStatuses) List ¶
func (c *FakeComponentStatuses) List(label labels.Selector, field fields.Selector) (result *api.ComponentStatusList, err error)
type FakeDaemons ¶
FakeDaemons implements DaemonInterface. 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 (*FakeDaemons) Delete ¶
func (c *FakeDaemons) Delete(name string) error
func (*FakeDaemons) List ¶
func (c *FakeDaemons) List(label labels.Selector) (*expapi.DaemonList, error)
type FakeEndpoints ¶
FakeEndpoints implements EndpointInterface. 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 (*FakeEndpoints) Delete ¶
func (c *FakeEndpoints) Delete(name string) error
func (*FakeEndpoints) List ¶
func (c *FakeEndpoints) List(label labels.Selector) (*api.EndpointsList, error)
type FakeEvents ¶
FakeEvents implements EventInterface. 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 (*FakeEvents) Create ¶
Create makes a new event. Returns the copy of the event the server returns, or an error.
func (*FakeEvents) Delete ¶
func (c *FakeEvents) Delete(name string) error
func (*FakeEvents) Get ¶
func (c *FakeEvents) Get(name string) (*api.Event, error)
Get returns the given event, or an error.
func (*FakeEvents) GetFieldSelector ¶
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
type FakeLimitRanges ¶
FakeLimitRanges implements PodsInterface. 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 (*FakeLimitRanges) Create ¶
func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (*api.LimitRange, error)
func (*FakeLimitRanges) Delete ¶
func (c *FakeLimitRanges) Delete(name string) error
func (*FakeLimitRanges) Get ¶
func (c *FakeLimitRanges) Get(name string) (*api.LimitRange, error)
func (*FakeLimitRanges) List ¶
func (c *FakeLimitRanges) List(label labels.Selector) (*api.LimitRangeList, error)
func (*FakeLimitRanges) Update ¶
func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (*api.LimitRange, error)
type FakeNamespaces ¶
type FakeNamespaces struct {
Fake *Fake
}
FakeNamespaces implements NamespacesInterface. 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 (*FakeNamespaces) Delete ¶
func (c *FakeNamespaces) Delete(name string) error
func (*FakeNamespaces) List ¶
func (c *FakeNamespaces) List(label labels.Selector, field fields.Selector) (*api.NamespaceList, error)
type FakeNodes ¶
type FakeNodes struct {
Fake *Fake
}
FakeNodes implements MinionInterface. 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 (*FakeNodes) UpdateStatus ¶
type FakePersistentVolumeClaims ¶
func (*FakePersistentVolumeClaims) Create ¶
func (c *FakePersistentVolumeClaims) Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
func (*FakePersistentVolumeClaims) Delete ¶
func (c *FakePersistentVolumeClaims) Delete(name string) error
func (*FakePersistentVolumeClaims) Get ¶
func (c *FakePersistentVolumeClaims) Get(name string) (*api.PersistentVolumeClaim, error)
func (*FakePersistentVolumeClaims) List ¶
func (c *FakePersistentVolumeClaims) List(label labels.Selector, field fields.Selector) (*api.PersistentVolumeClaimList, error)
func (*FakePersistentVolumeClaims) Update ¶
func (c *FakePersistentVolumeClaims) Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
func (*FakePersistentVolumeClaims) UpdateStatus ¶
func (c *FakePersistentVolumeClaims) UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
type FakePersistentVolumes ¶
type FakePersistentVolumes struct {
Fake *Fake
}
func (*FakePersistentVolumes) Create ¶
func (c *FakePersistentVolumes) Create(pv *api.PersistentVolume) (*api.PersistentVolume, error)
func (*FakePersistentVolumes) Delete ¶
func (c *FakePersistentVolumes) Delete(name string) error
func (*FakePersistentVolumes) Get ¶
func (c *FakePersistentVolumes) Get(name string) (*api.PersistentVolume, error)
func (*FakePersistentVolumes) List ¶
func (c *FakePersistentVolumes) List(label labels.Selector, field fields.Selector) (*api.PersistentVolumeList, error)
func (*FakePersistentVolumes) Update ¶
func (c *FakePersistentVolumes) Update(pv *api.PersistentVolume) (*api.PersistentVolume, error)
func (*FakePersistentVolumes) UpdateStatus ¶
func (c *FakePersistentVolumes) UpdateStatus(pv *api.PersistentVolume) (*api.PersistentVolume, error)
type FakePodTemplates ¶
FakePodTemplates implements PodTemplatesInterface. 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 (*FakePodTemplates) Create ¶
func (c *FakePodTemplates) Create(pod *api.PodTemplate) (*api.PodTemplate, error)
func (*FakePodTemplates) Delete ¶
func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error
func (*FakePodTemplates) Get ¶
func (c *FakePodTemplates) Get(name string) (*api.PodTemplate, error)
func (*FakePodTemplates) List ¶
func (c *FakePodTemplates) List(label labels.Selector, field fields.Selector) (*api.PodTemplateList, error)
func (*FakePodTemplates) Update ¶
func (c *FakePodTemplates) Update(pod *api.PodTemplate) (*api.PodTemplate, error)
type FakePods ¶
FakePods implements PodsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.
type FakeReplicationControllers ¶
FakeReplicationControllers implements ReplicationControllerInterface. 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 (*FakeReplicationControllers) Create ¶
func (c *FakeReplicationControllers) Create(controller *api.ReplicationController) (*api.ReplicationController, error)
func (*FakeReplicationControllers) Delete ¶
func (c *FakeReplicationControllers) Delete(name string) error
func (*FakeReplicationControllers) Get ¶
func (c *FakeReplicationControllers) Get(name string) (*api.ReplicationController, error)
func (*FakeReplicationControllers) List ¶
func (c *FakeReplicationControllers) List(label labels.Selector) (*api.ReplicationControllerList, error)
func (*FakeReplicationControllers) Update ¶
func (c *FakeReplicationControllers) Update(controller *api.ReplicationController) (*api.ReplicationController, error)
type FakeResourceQuotas ¶
FakeResourceQuotas implements ResourceQuotaInterface. 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 (*FakeResourceQuotas) Create ¶
func (c *FakeResourceQuotas) Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
func (*FakeResourceQuotas) Delete ¶
func (c *FakeResourceQuotas) Delete(name string) error
func (*FakeResourceQuotas) Get ¶
func (c *FakeResourceQuotas) Get(name string) (*api.ResourceQuota, error)
func (*FakeResourceQuotas) List ¶
func (c *FakeResourceQuotas) List(label labels.Selector) (*api.ResourceQuotaList, error)
func (*FakeResourceQuotas) Update ¶
func (c *FakeResourceQuotas) Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
func (*FakeResourceQuotas) UpdateStatus ¶
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
type FakeSecrets ¶
Fake implements SecretInterface. 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 (*FakeSecrets) Delete ¶
func (c *FakeSecrets) Delete(name string) error
func (*FakeSecrets) List ¶
func (c *FakeSecrets) List(label labels.Selector, field fields.Selector) (*api.SecretList, error)
type FakeServiceAccounts ¶
FakeServiceAccounts implements ServiceAccountsInterface. 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 (*FakeServiceAccounts) Create ¶
func (c *FakeServiceAccounts) Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
func (*FakeServiceAccounts) Delete ¶
func (c *FakeServiceAccounts) Delete(name string) error
func (*FakeServiceAccounts) Get ¶
func (c *FakeServiceAccounts) Get(name string) (*api.ServiceAccount, error)
func (*FakeServiceAccounts) List ¶
func (c *FakeServiceAccounts) List(label labels.Selector, field fields.Selector) (*api.ServiceAccountList, error)
func (*FakeServiceAccounts) Update ¶
func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error)
type FakeServices ¶
Fake implements ServiceInterface. 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 (*FakeServices) Delete ¶
func (c *FakeServices) Delete(name string) error
func (*FakeServices) List ¶
func (c *FakeServices) List(label labels.Selector) (*api.ServiceList, error)
func (*FakeServices) ProxyGet ¶
func (c *FakeServices) ProxyGet(name, path string, params map[string]string) unversioned.ResponseWrapper
type GenericAction ¶
type GenericAction interface { Action GetValue() interface{} }
type GenericActionImpl ¶
type GenericActionImpl struct { ActionImpl Value interface{} }
func (GenericActionImpl) GetValue ¶
func (a GenericActionImpl) GetValue() interface{}
type GetActionImpl ¶
type GetActionImpl struct { ActionImpl Name string }
func NewGetAction ¶
func NewGetAction(resource, namespace, name string) GetActionImpl
func NewRootGetAction ¶
func NewRootGetAction(resource, name string) GetActionImpl
func (GetActionImpl) GetName ¶
func (a GetActionImpl) GetName() string
type ListAction ¶
type ListAction interface { Action GetListRestrictions() ListRestrictions }
type ListActionImpl ¶
type ListActionImpl struct { ActionImpl ListRestrictions ListRestrictions }
func NewListAction ¶
func NewRootListAction ¶
func (ListActionImpl) GetListRestrictions ¶
func (a ListActionImpl) GetListRestrictions() ListRestrictions
type ListRestrictions ¶
type ObjectRetriever ¶
type ObjectRetriever interface { // Kind should return a resource or a list of resources (depending on the provided kind and // name). It should return an error if the caller should communicate an error to the server. Kind(kind, name string) (runtime.Object, error) // Add adds a runtime object for test purposes into this object. Add(runtime.Object) error }
ObjectRetriever abstracts the implementation for retrieving or setting generic objects. It is intended to be used to fake calls to a server by returning objects based on their kind and name.
func NewObjects ¶
func NewObjects(scheme runtime.ObjectScheme, decoder runtime.ObjectDecoder) ObjectRetriever
NewObjects implements the ObjectRetriever interface by introspecting the objects provided to Add() and returning them when the Kind method is invoked. If an api.List object is provided to Add(), each child item is added. If an object is added that is itself a list (PodList, ServiceList) then that is added to the "PodList" kind. If no PodList is added, the retriever will take any loaded Pods and return them in a list. If an api.Status is added, and the Details.Kind field is set, that status will be returned instead (as an error if Status != Success, or as a runtime.Object if Status == Success). If multiple PodLists are provided, they will be returned in order by the Kind call, and the last PodList will be reused for subsequent calls.
type ProxyGetAction ¶
type ProxyGetActionImpl ¶
type ProxyGetActionImpl struct { ActionImpl Name string Path string Params map[string]string }
func NewProxyGetAction ¶
func NewProxyGetAction(resource, namespace, name, path string, params map[string]string) ProxyGetActionImpl
func (ProxyGetActionImpl) GetName ¶
func (a ProxyGetActionImpl) GetName() string
func (ProxyGetActionImpl) GetParams ¶
func (a ProxyGetActionImpl) GetParams() map[string]string
func (ProxyGetActionImpl) GetPath ¶
func (a ProxyGetActionImpl) GetPath() string
type ReactionFunc ¶
ReactionFunc is a function that returns an object or error for a given Action
func ObjectReaction ¶
func ObjectReaction(o ObjectRetriever, mapper meta.RESTMapper) ReactionFunc
ObjectReaction returns a ReactionFunc that takes a generic action string of the form <verb>-<resource> or <verb>-<subresource>-<resource> and attempts to return a runtime Object or error that matches the requested action. For instance, list-replicationControllers should attempt to return a list of replication controllers. This method delegates to the ObjectRetriever interface to satisfy retrieval of lists or retrieval of single items. TODO: add support for sub resources
type UpdateAction ¶
type UpdateActionImpl ¶
type UpdateActionImpl struct { ActionImpl Object runtime.Object }
func NewRootUpdateAction ¶
func NewRootUpdateAction(resource string, object runtime.Object) UpdateActionImpl
func NewUpdateAction ¶
func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateActionImpl
func (UpdateActionImpl) GetObject ¶
func (a UpdateActionImpl) GetObject() runtime.Object
type WatchAction ¶
type WatchAction interface { Action GetWatchRestrictions() WatchRestrictions }
type WatchActionImpl ¶
type WatchActionImpl struct { ActionImpl WatchRestrictions WatchRestrictions }
func NewRootWatchAction ¶
func NewWatchAction ¶
func (WatchActionImpl) GetWatchRestrictions ¶
func (a WatchActionImpl) GetWatchRestrictions() WatchRestrictions
Source Files ¶
- actions.go
- fake_componentstatuses.go
- fake_daemons.go
- fake_endpoints.go
- fake_events.go
- fake_limit_ranges.go
- fake_namespaces.go
- fake_nodes.go
- fake_persistent_volume_claims.go
- fake_persistent_volumes.go
- fake_pod_templates.go
- fake_pods.go
- fake_replication_controllers.go
- fake_resource_quotas.go
- fake_secrets.go
- fake_service_accounts.go
- fake_services.go
- fixture.go
- testclient.go