remove generated files with tpr

pull/6/head
Nikhita Raghunath 2017-11-03 01:11:33 +05:30
parent 6a87d99a38
commit e9bb42d3bc
16 changed files with 0 additions and 810 deletions

View File

@ -19,7 +19,6 @@ go_library(
"replicaset.go",
"scale.go",
"scale_expansion.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion",
deps = [

View File

@ -18,7 +18,6 @@ go_library(
"fake_replicaset.go",
"fake_scale.go",
"fake_scale_expansion.go",
"fake_thirdpartyresource.go",
],
importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake",
deps = [

View File

@ -1,118 +0,0 @@
/*
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 (
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"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
)
// FakeThirdPartyResources implements ThirdPartyResourceInterface
type FakeThirdPartyResources struct {
Fake *FakeExtensions
}
var thirdpartyresourcesResource = schema.GroupVersionResource{Group: "extensions", Version: "", Resource: "thirdpartyresources"}
var thirdpartyresourcesKind = schema.GroupVersionKind{Group: "extensions", Version: "", Kind: "ThirdPartyResource"}
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(thirdpartyresourcesResource, thirdpartyresourcesKind, opts), &extensions.ThirdPartyResourceList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &extensions.ThirdPartyResourceList{}
for _, item := range obj.(*extensions.ThirdPartyResourceList).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 thirdPartyResources.
func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts))
}
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *FakeThirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions)
_, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{})
return err
}
// Patch applies the patch and returns the patched thirdPartyResource.
func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}

View File

@ -1,145 +0,0 @@
/*
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 internalversion
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme"
)
// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
// A group's client should implement this interface.
type ThirdPartyResourcesGetter interface {
ThirdPartyResources() ThirdPartyResourceInterface
}
// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
type ThirdPartyResourceInterface interface {
Create(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
Update(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*extensions.ThirdPartyResource, error)
List(opts v1.ListOptions) (*extensions.ThirdPartyResourceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error)
ThirdPartyResourceExpansion
}
// thirdPartyResources implements ThirdPartyResourceInterface
type thirdPartyResources struct {
client rest.Interface
}
// newThirdPartyResources returns a ThirdPartyResources
func newThirdPartyResources(c *ExtensionsClient) *thirdPartyResources {
return &thirdPartyResources{
client: c.RESTClient(),
}
}
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *extensions.ThirdPartyResource, err error) {
result = &extensions.ThirdPartyResource{}
err = c.client.Get().
Resource("thirdpartyresources").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
func (c *thirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
result = &extensions.ThirdPartyResourceList{}
err = c.client.Get().
Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *thirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
result = &extensions.ThirdPartyResource{}
err = c.client.Post().
Resource("thirdpartyresources").
Body(thirdPartyResource).
Do().
Into(result)
return
}
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *thirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
result = &extensions.ThirdPartyResource{}
err = c.client.Put().
Resource("thirdpartyresources").
Name(thirdPartyResource.Name).
Body(thirdPartyResource).
Do().
Into(result)
return
}
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("thirdpartyresources").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("thirdpartyresources").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched thirdPartyResource.
func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) {
result = &extensions.ThirdPartyResource{}
err = c.client.Patch(pt).
Resource("thirdpartyresources").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -14,7 +14,6 @@ go_library(
"interface.go",
"podsecuritypolicy.go",
"replicaset.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/extensions/internalversion",
deps = [

View File

@ -1,73 +0,0 @@
/*
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 internalversion
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/internalinterfaces"
internalversion "k8s.io/kubernetes/pkg/client/listers/extensions/internalversion"
time "time"
)
// ThirdPartyResourceInformer provides access to a shared informer and lister for
// ThirdPartyResources.
type ThirdPartyResourceInformer interface {
Informer() cache.SharedIndexInformer
Lister() internalversion.ThirdPartyResourceLister
}
type thirdPartyResourceInformer struct {
factory internalinterfaces.SharedInformerFactory
}
// NewThirdPartyResourceInformer constructs a new informer for ThirdPartyResource 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 NewThirdPartyResourceInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return client.Extensions().ThirdPartyResources().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return client.Extensions().ThirdPartyResources().Watch(options)
},
},
&extensions.ThirdPartyResource{},
resyncPeriod,
indexers,
)
}
func defaultThirdPartyResourceInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewThirdPartyResourceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
}
func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&extensions.ThirdPartyResource{}, defaultThirdPartyResourceInformer)
}
func (f *thirdPartyResourceInformer) Lister() internalversion.ThirdPartyResourceLister {
return internalversion.NewThirdPartyResourceLister(f.Informer().GetIndexer())
}

View File

@ -19,7 +19,6 @@ go_library(
"replicaset.go",
"replicaset_expansion.go",
"scale.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/kubernetes/pkg/client/listers/extensions/internalversion",
deps = [

View File

@ -1,65 +0,0 @@
/*
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 internalversion
import (
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
)
// ThirdPartyResourceLister helps list ThirdPartyResources.
type ThirdPartyResourceLister interface {
// List lists all ThirdPartyResources in the indexer.
List(selector labels.Selector) (ret []*extensions.ThirdPartyResource, err error)
// Get retrieves the ThirdPartyResource from the index for a given name.
Get(name string) (*extensions.ThirdPartyResource, error)
ThirdPartyResourceListerExpansion
}
// thirdPartyResourceLister implements the ThirdPartyResourceLister interface.
type thirdPartyResourceLister struct {
indexer cache.Indexer
}
// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister.
func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister {
return &thirdPartyResourceLister{indexer: indexer}
}
// List lists all ThirdPartyResources in the indexer.
func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*extensions.ThirdPartyResource, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*extensions.ThirdPartyResource))
})
return ret, err
}
// Get retrieves the ThirdPartyResource from the index for a given name.
func (s *thirdPartyResourceLister) Get(name string) (*extensions.ThirdPartyResource, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(extensions.Resource("thirdpartyresource"), name)
}
return obj.(*extensions.ThirdPartyResource), nil
}

View File

@ -14,7 +14,6 @@ go_library(
"interface.go",
"podsecuritypolicy.go",
"replicaset.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/client-go/informers/extensions/v1beta1",
deps = [

View File

@ -1,73 +0,0 @@
/*
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 v1beta1
import (
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
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"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ThirdPartyResourceInformer provides access to a shared informer and lister for
// ThirdPartyResources.
type ThirdPartyResourceInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1beta1.ThirdPartyResourceLister
}
type thirdPartyResourceInformer struct {
factory internalinterfaces.SharedInformerFactory
}
// NewThirdPartyResourceInformer constructs a new informer for ThirdPartyResource 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 NewThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return client.ExtensionsV1beta1().ThirdPartyResources().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return client.ExtensionsV1beta1().ThirdPartyResources().Watch(options)
},
},
&extensions_v1beta1.ThirdPartyResource{},
resyncPeriod,
indexers,
)
}
func defaultThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewThirdPartyResourceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
}
func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&extensions_v1beta1.ThirdPartyResource{}, defaultThirdPartyResourceInformer)
}
func (f *thirdPartyResourceInformer) Lister() v1beta1.ThirdPartyResourceLister {
return v1beta1.NewThirdPartyResourceLister(f.Informer().GetIndexer())
}

View File

@ -19,7 +19,6 @@ go_library(
"replicaset.go",
"scale.go",
"scale_expansion.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1",
deps = [

View File

@ -18,7 +18,6 @@ go_library(
"fake_replicaset.go",
"fake_scale.go",
"fake_scale_expansion.go",
"fake_thirdpartyresource.go",
],
importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake",
deps = [

View File

@ -1,118 +0,0 @@
/*
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 (
v1beta1 "k8s.io/api/extensions/v1beta1"
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"
)
// FakeThirdPartyResources implements ThirdPartyResourceInterface
type FakeThirdPartyResources struct {
Fake *FakeExtensionsV1beta1
}
var thirdpartyresourcesResource = schema.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "thirdpartyresources"}
var thirdpartyresourcesKind = schema.GroupVersionKind{Group: "extensions", Version: "v1beta1", Kind: "ThirdPartyResource"}
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ThirdPartyResource), err
}
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(thirdpartyresourcesResource, thirdpartyresourcesKind, opts), &v1beta1.ThirdPartyResourceList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ThirdPartyResourceList{}
for _, item := range obj.(*v1beta1.ThirdPartyResourceList).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 thirdPartyResources.
func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts))
}
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ThirdPartyResource), err
}
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(thirdpartyresourcesResource, thirdPartyResource), &v1beta1.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ThirdPartyResource), err
}
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{})
return err
}
// Patch applies the patch and returns the patched thirdPartyResource.
func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &v1beta1.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ThirdPartyResource), err
}

View File

@ -1,145 +0,0 @@
/*
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 v1beta1
import (
v1beta1 "k8s.io/api/extensions/v1beta1"
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"
)
// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
// A group's client should implement this interface.
type ThirdPartyResourcesGetter interface {
ThirdPartyResources() ThirdPartyResourceInterface
}
// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
type ThirdPartyResourceInterface interface {
Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error)
List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error)
ThirdPartyResourceExpansion
}
// thirdPartyResources implements ThirdPartyResourceInterface
type thirdPartyResources struct {
client rest.Interface
}
// newThirdPartyResources returns a ThirdPartyResources
func newThirdPartyResources(c *ExtensionsV1beta1Client) *thirdPartyResources {
return &thirdPartyResources{
client: c.RESTClient(),
}
}
// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
result = &v1beta1.ThirdPartyResource{}
err = c.client.Get().
Resource("thirdpartyresources").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
result = &v1beta1.ThirdPartyResourceList{}
err = c.client.Get().
Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *thirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
result = &v1beta1.ThirdPartyResource{}
err = c.client.Post().
Resource("thirdpartyresources").
Body(thirdPartyResource).
Do().
Into(result)
return
}
// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
func (c *thirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
result = &v1beta1.ThirdPartyResource{}
err = c.client.Put().
Resource("thirdpartyresources").
Name(thirdPartyResource.Name).
Body(thirdPartyResource).
Do().
Into(result)
return
}
// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("thirdpartyresources").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("thirdpartyresources").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched thirdPartyResource.
func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
result = &v1beta1.ThirdPartyResource{}
err = c.client.Patch(pt).
Resource("thirdpartyresources").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@ -19,7 +19,6 @@ go_library(
"replicaset.go",
"replicaset_expansion.go",
"scale.go",
"thirdpartyresource.go",
],
importpath = "k8s.io/client-go/listers/extensions/v1beta1",
deps = [

View File

@ -1,65 +0,0 @@
/*
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 v1beta1
import (
v1beta1 "k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ThirdPartyResourceLister helps list ThirdPartyResources.
type ThirdPartyResourceLister interface {
// List lists all ThirdPartyResources in the indexer.
List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error)
// Get retrieves the ThirdPartyResource from the index for a given name.
Get(name string) (*v1beta1.ThirdPartyResource, error)
ThirdPartyResourceListerExpansion
}
// thirdPartyResourceLister implements the ThirdPartyResourceLister interface.
type thirdPartyResourceLister struct {
indexer cache.Indexer
}
// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister.
func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister {
return &thirdPartyResourceLister{indexer: indexer}
}
// List lists all ThirdPartyResources in the indexer.
func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ThirdPartyResource))
})
return ret, err
}
// Get retrieves the ThirdPartyResource from the index for a given name.
func (s *thirdPartyResourceLister) Get(name string) (*v1beta1.ThirdPartyResource, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("thirdpartyresource"), name)
}
return obj.(*v1beta1.ThirdPartyResource), nil
}