mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-28 16:07:29 +00:00
Added auto-generated changes
Kubernetes-commit: 3b4f263b6706415c97e42cf7e1772f79a2d180db
This commit is contained in:
parent
660679d0b8
commit
c16edbc0b0
@ -8,6 +8,7 @@ load(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
"controllerrevision.go",
|
||||||
"daemonset.go",
|
"daemonset.go",
|
||||||
"deployment.go",
|
"deployment.go",
|
||||||
"interface.go",
|
"interface.go",
|
||||||
|
73
informers/apps/v1beta2/controllerrevision.go
Normal file
73
informers/apps/v1beta2/controllerrevision.go
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1beta2
|
||||||
|
|
||||||
|
import (
|
||||||
|
apps_v1beta2 "k8s.io/api/apps/v1beta2"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ControllerRevisionInformer provides access to a shared informer and lister for
|
||||||
|
// ControllerRevisions.
|
||||||
|
type ControllerRevisionInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta2.ControllerRevisionLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type controllerRevisionInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewControllerRevisionInformer constructs a new informer for ControllerRevision type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
return client.AppsV1beta2().ControllerRevisions(namespace).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return client.AppsV1beta2().ControllerRevisions(namespace).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&apps_v1beta2.ControllerRevision{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func defaultControllerRevisionInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewControllerRevisionInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&apps_v1beta2.ControllerRevision{}, defaultControllerRevisionInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *controllerRevisionInformer) Lister() v1beta2.ControllerRevisionLister {
|
||||||
|
return v1beta2.NewControllerRevisionLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -24,6 +24,8 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
|
// ControllerRevisions returns a ControllerRevisionInformer.
|
||||||
|
ControllerRevisions() ControllerRevisionInformer
|
||||||
// DaemonSets returns a DaemonSetInformer.
|
// DaemonSets returns a DaemonSetInformer.
|
||||||
DaemonSets() DaemonSetInformer
|
DaemonSets() DaemonSetInformer
|
||||||
// Deployments returns a DeploymentInformer.
|
// Deployments returns a DeploymentInformer.
|
||||||
@ -43,6 +45,11 @@ func New(f internalinterfaces.SharedInformerFactory) Interface {
|
|||||||
return &version{f}
|
return &version{f}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ControllerRevisions returns a ControllerRevisionInformer.
|
||||||
|
func (v *version) ControllerRevisions() ControllerRevisionInformer {
|
||||||
|
return &controllerRevisionInformer{factory: v.SharedInformerFactory}
|
||||||
|
}
|
||||||
|
|
||||||
// DaemonSets returns a DaemonSetInformer.
|
// DaemonSets returns a DaemonSetInformer.
|
||||||
func (v *version) DaemonSets() DaemonSetInformer {
|
func (v *version) DaemonSets() DaemonSetInformer {
|
||||||
return &daemonSetInformer{factory: v.SharedInformerFactory}
|
return &daemonSetInformer{factory: v.SharedInformerFactory}
|
||||||
|
@ -85,6 +85,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil
|
||||||
|
|
||||||
// Group=Apps, Version=V1beta2
|
// Group=Apps, Version=V1beta2
|
||||||
|
case v1beta2.SchemeGroupVersion.WithResource("controllerrevisions"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().ControllerRevisions().Informer()}, nil
|
||||||
case v1beta2.SchemeGroupVersion.WithResource("daemonsets"):
|
case v1beta2.SchemeGroupVersion.WithResource("daemonsets"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().DaemonSets().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().DaemonSets().Informer()}, nil
|
||||||
case v1beta2.SchemeGroupVersion.WithResource("deployments"):
|
case v1beta2.SchemeGroupVersion.WithResource("deployments"):
|
||||||
|
@ -9,6 +9,7 @@ go_library(
|
|||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"apps_client.go",
|
"apps_client.go",
|
||||||
|
"controllerrevision.go",
|
||||||
"daemonset.go",
|
"daemonset.go",
|
||||||
"deployment.go",
|
"deployment.go",
|
||||||
"doc.go",
|
"doc.go",
|
||||||
|
@ -25,6 +25,7 @@ import (
|
|||||||
|
|
||||||
type AppsV1beta2Interface interface {
|
type AppsV1beta2Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
|
ControllerRevisionsGetter
|
||||||
DaemonSetsGetter
|
DaemonSetsGetter
|
||||||
DeploymentsGetter
|
DeploymentsGetter
|
||||||
ReplicaSetsGetter
|
ReplicaSetsGetter
|
||||||
@ -37,6 +38,10 @@ type AppsV1beta2Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *AppsV1beta2Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
|
||||||
|
return newControllerRevisions(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *AppsV1beta2Client) DaemonSets(namespace string) DaemonSetInterface {
|
func (c *AppsV1beta2Client) DaemonSets(namespace string) DaemonSetInterface {
|
||||||
return newDaemonSets(c, namespace)
|
return newDaemonSets(c, namespace)
|
||||||
}
|
}
|
||||||
|
155
kubernetes/typed/apps/v1beta2/controllerrevision.go
Normal file
155
kubernetes/typed/apps/v1beta2/controllerrevision.go
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta2
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta2 "k8s.io/api/apps/v1beta2"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type ControllerRevisionsGetter interface {
|
||||||
|
ControllerRevisions(namespace string) ControllerRevisionInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// ControllerRevisionInterface has methods to work with ControllerRevision resources.
|
||||||
|
type ControllerRevisionInterface interface {
|
||||||
|
Create(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
|
||||||
|
Update(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error)
|
||||||
|
List(opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error)
|
||||||
|
ControllerRevisionExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// controllerRevisions implements ControllerRevisionInterface
|
||||||
|
type controllerRevisions struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newControllerRevisions returns a ControllerRevisions
|
||||||
|
func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerRevisions {
|
||||||
|
return &controllerRevisions{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
|
||||||
|
func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
result = &v1beta2.ControllerRevision{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||||
|
func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||||
|
result = &v1beta2.ControllerRevisionList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested controllerRevisions.
|
||||||
|
func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||||
|
func (c *controllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
result = &v1beta2.ControllerRevision{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
Body(controllerRevision).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||||
|
func (c *controllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
result = &v1beta2.ControllerRevision{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
Name(controllerRevision.Name).
|
||||||
|
Body(controllerRevision).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched controllerRevision.
|
||||||
|
func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
result = &v1beta2.ControllerRevision{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("controllerrevisions").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -10,6 +10,7 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_apps_client.go",
|
"fake_apps_client.go",
|
||||||
|
"fake_controllerrevision.go",
|
||||||
"fake_daemonset.go",
|
"fake_daemonset.go",
|
||||||
"fake_deployment.go",
|
"fake_deployment.go",
|
||||||
"fake_replicaset.go",
|
"fake_replicaset.go",
|
||||||
|
@ -26,6 +26,10 @@ type FakeAppsV1beta2 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeAppsV1beta2) ControllerRevisions(namespace string) v1beta2.ControllerRevisionInterface {
|
||||||
|
return &FakeControllerRevisions{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *FakeAppsV1beta2) DaemonSets(namespace string) v1beta2.DaemonSetInterface {
|
func (c *FakeAppsV1beta2) DaemonSets(namespace string) v1beta2.DaemonSetInterface {
|
||||||
return &FakeDaemonSets{c, namespace}
|
return &FakeDaemonSets{c, namespace}
|
||||||
}
|
}
|
||||||
|
126
kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go
Normal file
126
kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta2 "k8s.io/api/apps/v1beta2"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeControllerRevisions implements ControllerRevisionInterface
|
||||||
|
type FakeControllerRevisions struct {
|
||||||
|
Fake *FakeAppsV1beta2
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Version: "v1beta2", Resource: "controllerrevisions"}
|
||||||
|
|
||||||
|
var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ControllerRevision"}
|
||||||
|
|
||||||
|
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
|
||||||
|
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta2.ControllerRevision), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||||
|
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta2.ControllerRevisionList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1beta2.ControllerRevisionList{}
|
||||||
|
for _, item := range obj.(*v1beta2.ControllerRevisionList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested controllerRevisions.
|
||||||
|
func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||||
|
func (c *FakeControllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta2.ControllerRevision), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||||
|
func (c *FakeControllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta2.ControllerRevision), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched controllerRevision.
|
||||||
|
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, data, subresources...), &v1beta2.ControllerRevision{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1beta2.ControllerRevision), err
|
||||||
|
}
|
@ -16,6 +16,8 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1beta2
|
package v1beta2
|
||||||
|
|
||||||
|
type ControllerRevisionExpansion interface{}
|
||||||
|
|
||||||
type DaemonSetExpansion interface{}
|
type DaemonSetExpansion interface{}
|
||||||
|
|
||||||
type DeploymentExpansion interface{}
|
type DeploymentExpansion interface{}
|
||||||
|
@ -8,6 +8,7 @@ load(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
"controllerrevision.go",
|
||||||
"daemonset.go",
|
"daemonset.go",
|
||||||
"deployment.go",
|
"deployment.go",
|
||||||
"expansion_generated.go",
|
"expansion_generated.go",
|
||||||
|
94
listers/apps/v1beta2/controllerrevision.go
Normal file
94
listers/apps/v1beta2/controllerrevision.go
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
|
package v1beta2
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta2 "k8s.io/api/apps/v1beta2"
|
||||||
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
"k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ControllerRevisionLister helps list ControllerRevisions.
|
||||||
|
type ControllerRevisionLister interface {
|
||||||
|
// List lists all ControllerRevisions in the indexer.
|
||||||
|
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
|
||||||
|
// ControllerRevisions returns an object that can list and get ControllerRevisions.
|
||||||
|
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
|
||||||
|
ControllerRevisionListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// controllerRevisionLister implements the ControllerRevisionLister interface.
|
||||||
|
type controllerRevisionLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewControllerRevisionLister returns a new ControllerRevisionLister.
|
||||||
|
func NewControllerRevisionLister(indexer cache.Indexer) ControllerRevisionLister {
|
||||||
|
return &controllerRevisionLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all ControllerRevisions in the indexer.
|
||||||
|
func (s *controllerRevisionLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1beta2.ControllerRevision))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// ControllerRevisions returns an object that can list and get ControllerRevisions.
|
||||||
|
func (s *controllerRevisionLister) ControllerRevisions(namespace string) ControllerRevisionNamespaceLister {
|
||||||
|
return controllerRevisionNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
|
||||||
|
type ControllerRevisionNamespaceLister interface {
|
||||||
|
// List lists all ControllerRevisions in the indexer for a given namespace.
|
||||||
|
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
|
||||||
|
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
|
||||||
|
Get(name string) (*v1beta2.ControllerRevision, error)
|
||||||
|
ControllerRevisionNamespaceListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// controllerRevisionNamespaceLister implements the ControllerRevisionNamespaceLister
|
||||||
|
// interface.
|
||||||
|
type controllerRevisionNamespaceLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all ControllerRevisions in the indexer for a given namespace.
|
||||||
|
func (s controllerRevisionNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) {
|
||||||
|
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1beta2.ControllerRevision))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
|
||||||
|
func (s controllerRevisionNamespaceLister) Get(name string) (*v1beta2.ControllerRevision, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1beta2.Resource("controllerrevision"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1beta2.ControllerRevision), nil
|
||||||
|
}
|
@ -18,6 +18,14 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1beta2
|
package v1beta2
|
||||||
|
|
||||||
|
// ControllerRevisionListerExpansion allows custom methods to be added to
|
||||||
|
// ControllerRevisionLister.
|
||||||
|
type ControllerRevisionListerExpansion interface{}
|
||||||
|
|
||||||
|
// ControllerRevisionNamespaceListerExpansion allows custom methods to be added to
|
||||||
|
// ControllerRevisionNamespaceLister.
|
||||||
|
type ControllerRevisionNamespaceListerExpansion interface{}
|
||||||
|
|
||||||
// DaemonSetListerExpansion allows custom methods to be added to
|
// DaemonSetListerExpansion allows custom methods to be added to
|
||||||
// DaemonSetLister.
|
// DaemonSetLister.
|
||||||
type DaemonSetListerExpansion interface{}
|
type DaemonSetListerExpansion interface{}
|
||||||
|
Loading…
Reference in New Issue
Block a user