forked from kubernetes/client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated files for MutatingWebhookConfiguration
Kubernetes-commit: 4568e0530c53df81d1bbd5e700daca041a1d8439
- Loading branch information
1 parent
67de9e0
commit c32c36a
Showing
14 changed files
with
443 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
informers/admissionregistration/v1alpha1/mutatingwebhookconfiguration.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
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 v1alpha1 | ||
|
||
import ( | ||
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" | ||
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" | ||
v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" | ||
cache "k8s.io/client-go/tools/cache" | ||
time "time" | ||
) | ||
|
||
// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for | ||
// MutatingWebhookConfigurations. | ||
type MutatingWebhookConfigurationInformer interface { | ||
Informer() cache.SharedIndexInformer | ||
Lister() v1alpha1.MutatingWebhookConfigurationLister | ||
} | ||
|
||
type mutatingWebhookConfigurationInformer struct { | ||
factory internalinterfaces.SharedInformerFactory | ||
tweakListOptions internalinterfaces.TweakListOptionsFunc | ||
} | ||
|
||
// NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration 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 NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { | ||
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) | ||
} | ||
|
||
// NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration 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 NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { | ||
return cache.NewSharedIndexInformer( | ||
&cache.ListWatch{ | ||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) { | ||
if tweakListOptions != nil { | ||
tweakListOptions(&options) | ||
} | ||
return client.AdmissionregistrationV1alpha1().MutatingWebhookConfigurations().List(options) | ||
}, | ||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { | ||
if tweakListOptions != nil { | ||
tweakListOptions(&options) | ||
} | ||
return client.AdmissionregistrationV1alpha1().MutatingWebhookConfigurations().Watch(options) | ||
}, | ||
}, | ||
&admissionregistration_v1alpha1.MutatingWebhookConfiguration{}, | ||
resyncPeriod, | ||
indexers, | ||
) | ||
} | ||
|
||
func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { | ||
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) | ||
} | ||
|
||
func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { | ||
return f.factory.InformerFor(&admissionregistration_v1alpha1.MutatingWebhookConfiguration{}, f.defaultInformer) | ||
} | ||
|
||
func (f *mutatingWebhookConfigurationInformer) Lister() v1alpha1.MutatingWebhookConfigurationLister { | ||
return v1alpha1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
kubernetes/typed/admissionregistration/v1alpha1/fake/fake_mutatingwebhookconfiguration.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* | ||
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 ( | ||
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" | ||
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" | ||
) | ||
|
||
// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface | ||
type FakeMutatingWebhookConfigurations struct { | ||
Fake *FakeAdmissionregistrationV1alpha1 | ||
} | ||
|
||
var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "mutatingwebhookconfigurations"} | ||
|
||
var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "MutatingWebhookConfiguration"} | ||
|
||
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. | ||
func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.MutatingWebhookConfiguration, err error) { | ||
obj, err := c.Fake. | ||
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{}) | ||
if obj == nil { | ||
return nil, err | ||
} | ||
return obj.(*v1alpha1.MutatingWebhookConfiguration), err | ||
} | ||
|
||
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. | ||
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.MutatingWebhookConfigurationList, err error) { | ||
obj, err := c.Fake. | ||
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1alpha1.MutatingWebhookConfigurationList{}) | ||
if obj == nil { | ||
return nil, err | ||
} | ||
|
||
label, _, _ := testing.ExtractFromListOptions(opts) | ||
if label == nil { | ||
label = labels.Everything() | ||
} | ||
list := &v1alpha1.MutatingWebhookConfigurationList{} | ||
for _, item := range obj.(*v1alpha1.MutatingWebhookConfigurationList).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 mutatingWebhookConfigurations. | ||
func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { | ||
return c.Fake. | ||
InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) | ||
} | ||
|
||
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. | ||
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) { | ||
obj, err := c.Fake. | ||
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{}) | ||
if obj == nil { | ||
return nil, err | ||
} | ||
return obj.(*v1alpha1.MutatingWebhookConfiguration), err | ||
} | ||
|
||
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. | ||
func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) { | ||
obj, err := c.Fake. | ||
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{}) | ||
if obj == nil { | ||
return nil, err | ||
} | ||
return obj.(*v1alpha1.MutatingWebhookConfiguration), err | ||
} | ||
|
||
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. | ||
func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { | ||
_, err := c.Fake. | ||
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{}) | ||
return err | ||
} | ||
|
||
// DeleteCollection deletes a collection of objects. | ||
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { | ||
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) | ||
|
||
_, err := c.Fake.Invokes(action, &v1alpha1.MutatingWebhookConfigurationList{}) | ||
return err | ||
} | ||
|
||
// Patch applies the patch and returns the patched mutatingWebhookConfiguration. | ||
func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MutatingWebhookConfiguration, err error) { | ||
obj, err := c.Fake. | ||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, data, subresources...), &v1alpha1.MutatingWebhookConfiguration{}) | ||
if obj == nil { | ||
return nil, err | ||
} | ||
return obj.(*v1alpha1.MutatingWebhookConfiguration), err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.