Regenerate code
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>pull/157/head
parent
9249a13661
commit
4957dfce61
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +0,0 @@
|
||||||
// This package is generated by client-gen with custom arguments.
|
|
||||||
|
|
||||||
// This package has the automatically generated clientset.
|
|
||||||
package clientset
|
|
|
@ -1,4 +0,0 @@
|
||||||
// This package is generated by client-gen with custom arguments.
|
|
||||||
|
|
||||||
// This package has the automatically generated fake clientset.
|
|
||||||
package fake
|
|
|
@ -1,4 +0,0 @@
|
||||||
// This package is generated by client-gen with custom arguments.
|
|
||||||
|
|
||||||
// This package contains the scheme of the automatically generated clientset.
|
|
||||||
package scheme
|
|
|
@ -1,4 +0,0 @@
|
||||||
// This package is generated by client-gen with custom arguments.
|
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
|
||||||
package v1
|
|
|
@ -1,4 +0,0 @@
|
||||||
// This package is generated by client-gen with custom arguments.
|
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
|
||||||
package fake
|
|
|
@ -1,114 +0,0 @@
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
||||||
meta_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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeBackups implements BackupInterface
|
|
||||||
type FakeBackups struct {
|
|
||||||
Fake *FakeArkV1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var backupsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "backups"}
|
|
||||||
|
|
||||||
var backupsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Backup"}
|
|
||||||
|
|
||||||
func (c *FakeBackups) Create(backup *v1.Backup) (result *v1.Backup, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(backupsResource, c.ns, backup), &v1.Backup{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Backup), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) Update(backup *v1.Backup) (result *v1.Backup, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(backupsResource, c.ns, backup), &v1.Backup{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Backup), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) UpdateStatus(backup *v1.Backup) (*v1.Backup, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(backupsResource, "status", c.ns, backup), &v1.Backup{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Backup), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(backupsResource, c.ns, name), &v1.Backup{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(backupsResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1.BackupList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) Get(name string, options meta_v1.GetOptions) (result *v1.Backup, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(backupsResource, c.ns, name), &v1.Backup{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Backup), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBackups) List(opts meta_v1.ListOptions) (result *v1.BackupList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(backupsResource, backupsKind, c.ns, opts), &v1.BackupList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1.BackupList{}
|
|
||||||
for _, item := range obj.(*v1.BackupList).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 backups.
|
|
||||||
func (c *FakeBackups) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(backupsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched backup.
|
|
||||||
func (c *FakeBackups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Backup, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(backupsResource, c.ns, name, data, subresources...), &v1.Backup{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Backup), err
|
|
||||||
}
|
|
|
@ -1,104 +0,0 @@
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
||||||
meta_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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeConfigs implements ConfigInterface
|
|
||||||
type FakeConfigs struct {
|
|
||||||
Fake *FakeArkV1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var configsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "configs"}
|
|
||||||
|
|
||||||
var configsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Config"}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) Create(config *v1.Config) (result *v1.Config, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(configsResource, c.ns, config), &v1.Config{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Config), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) Update(config *v1.Config) (result *v1.Config, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(configsResource, c.ns, config), &v1.Config{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Config), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(configsResource, c.ns, name), &v1.Config{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(configsResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1.ConfigList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) Get(name string, options meta_v1.GetOptions) (result *v1.Config, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(configsResource, c.ns, name), &v1.Config{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Config), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeConfigs) List(opts meta_v1.ListOptions) (result *v1.ConfigList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(configsResource, configsKind, c.ns, opts), &v1.ConfigList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1.ConfigList{}
|
|
||||||
for _, item := range obj.(*v1.ConfigList).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 configs.
|
|
||||||
func (c *FakeConfigs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(configsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched config.
|
|
||||||
func (c *FakeConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Config, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(configsResource, c.ns, name, data, subresources...), &v1.Config{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Config), err
|
|
||||||
}
|
|
|
@ -1,114 +0,0 @@
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
||||||
meta_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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeDownloadRequests implements DownloadRequestInterface
|
|
||||||
type FakeDownloadRequests struct {
|
|
||||||
Fake *FakeArkV1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var downloadrequestsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "downloadrequests"}
|
|
||||||
|
|
||||||
var downloadrequestsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "DownloadRequest"}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) Create(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(downloadrequestsResource, c.ns, downloadRequest), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.DownloadRequest), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) Update(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(downloadrequestsResource, c.ns, downloadRequest), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.DownloadRequest), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) UpdateStatus(downloadRequest *v1.DownloadRequest) (*v1.DownloadRequest, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(downloadrequestsResource, "status", c.ns, downloadRequest), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.DownloadRequest), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(downloadrequestsResource, c.ns, name), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(downloadrequestsResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1.DownloadRequestList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) Get(name string, options meta_v1.GetOptions) (result *v1.DownloadRequest, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(downloadrequestsResource, c.ns, name), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.DownloadRequest), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeDownloadRequests) List(opts meta_v1.ListOptions) (result *v1.DownloadRequestList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(downloadrequestsResource, downloadrequestsKind, c.ns, opts), &v1.DownloadRequestList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1.DownloadRequestList{}
|
|
||||||
for _, item := range obj.(*v1.DownloadRequestList).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 downloadRequests.
|
|
||||||
func (c *FakeDownloadRequests) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(downloadrequestsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched downloadRequest.
|
|
||||||
func (c *FakeDownloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DownloadRequest, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(downloadrequestsResource, c.ns, name, data, subresources...), &v1.DownloadRequest{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.DownloadRequest), err
|
|
||||||
}
|
|
|
@ -1,114 +0,0 @@
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
||||||
meta_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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeRestores implements RestoreInterface
|
|
||||||
type FakeRestores struct {
|
|
||||||
Fake *FakeArkV1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var restoresResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "restores"}
|
|
||||||
|
|
||||||
var restoresKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Restore"}
|
|
||||||
|
|
||||||
func (c *FakeRestores) Create(restore *v1.Restore) (result *v1.Restore, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(restoresResource, c.ns, restore), &v1.Restore{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Restore), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) Update(restore *v1.Restore) (result *v1.Restore, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(restoresResource, c.ns, restore), &v1.Restore{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Restore), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) UpdateStatus(restore *v1.Restore) (*v1.Restore, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(restoresResource, "status", c.ns, restore), &v1.Restore{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Restore), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(restoresResource, c.ns, name), &v1.Restore{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(restoresResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1.RestoreList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) Get(name string, options meta_v1.GetOptions) (result *v1.Restore, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(restoresResource, c.ns, name), &v1.Restore{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Restore), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeRestores) List(opts meta_v1.ListOptions) (result *v1.RestoreList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(restoresResource, restoresKind, c.ns, opts), &v1.RestoreList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1.RestoreList{}
|
|
||||||
for _, item := range obj.(*v1.RestoreList).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 restores.
|
|
||||||
func (c *FakeRestores) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(restoresResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched restore.
|
|
||||||
func (c *FakeRestores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Restore, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(restoresResource, c.ns, name, data, subresources...), &v1.Restore{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Restore), err
|
|
||||||
}
|
|
|
@ -1,114 +0,0 @@
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
|
||||||
meta_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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeSchedules implements ScheduleInterface
|
|
||||||
type FakeSchedules struct {
|
|
||||||
Fake *FakeArkV1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var schedulesResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "schedules"}
|
|
||||||
|
|
||||||
var schedulesKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Schedule"}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) Create(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(schedulesResource, c.ns, schedule), &v1.Schedule{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Schedule), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) Update(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(schedulesResource, c.ns, schedule), &v1.Schedule{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Schedule), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) UpdateStatus(schedule *v1.Schedule) (*v1.Schedule, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(schedulesResource, "status", c.ns, schedule), &v1.Schedule{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Schedule), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) Delete(name string, options *meta_v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(schedulesResource, c.ns, name), &v1.Schedule{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(schedulesResource, c.ns, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1.ScheduleList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) Get(name string, options meta_v1.GetOptions) (result *v1.Schedule, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(schedulesResource, c.ns, name), &v1.Schedule{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Schedule), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeSchedules) List(opts meta_v1.ListOptions) (result *v1.ScheduleList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(schedulesResource, schedulesKind, c.ns, opts), &v1.ScheduleList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1.ScheduleList{}
|
|
||||||
for _, item := range obj.(*v1.ScheduleList).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 schedules.
|
|
||||||
func (c *FakeSchedules) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(schedulesResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched schedule.
|
|
||||||
func (c *FakeSchedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Schedule, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(schedulesResource, c.ns, name, data, subresources...), &v1.Schedule{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1.Schedule), err
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package v1
|
|
||||||
|
|
||||||
type BackupExpansion interface{}
|
|
||||||
|
|
||||||
type ConfigExpansion interface{}
|
|
||||||
|
|
||||||
type DownloadRequestExpansion interface{}
|
|
||||||
|
|
||||||
type RestoreExpansion interface{}
|
|
||||||
|
|
||||||
type ScheduleExpansion interface{}
|
|
|
@ -1,8 +1,23 @@
|
||||||
package clientset
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 versioned
|
||||||
|
|
||||||
import (
|
import (
|
||||||
glog "github.com/golang/glog"
|
glog "github.com/golang/glog"
|
||||||
arkv1 "github.com/heptio/ark/pkg/generated/clientset/typed/ark/v1"
|
arkv1 "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||||
discovery "k8s.io/client-go/discovery"
|
discovery "k8s.io/client-go/discovery"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
|
@ -19,24 +34,18 @@ type Interface interface {
|
||||||
// version included in a Clientset.
|
// version included in a Clientset.
|
||||||
type Clientset struct {
|
type Clientset struct {
|
||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*arkv1.ArkV1Client
|
arkV1 *arkv1.ArkV1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// ArkV1 retrieves the ArkV1Client
|
// ArkV1 retrieves the ArkV1Client
|
||||||
func (c *Clientset) ArkV1() arkv1.ArkV1Interface {
|
func (c *Clientset) ArkV1() arkv1.ArkV1Interface {
|
||||||
if c == nil {
|
return c.arkV1
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return c.ArkV1Client
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Ark retrieves the default version of ArkClient.
|
// Deprecated: Ark retrieves the default version of ArkClient.
|
||||||
// Please explicitly pick a version.
|
// Please explicitly pick a version.
|
||||||
func (c *Clientset) Ark() arkv1.ArkV1Interface {
|
func (c *Clientset) Ark() arkv1.ArkV1Interface {
|
||||||
if c == nil {
|
return c.arkV1
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return c.ArkV1Client
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Discovery retrieves the DiscoveryClient
|
// Discovery retrieves the DiscoveryClient
|
||||||
|
@ -55,7 +64,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
}
|
}
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
var err error
|
var err error
|
||||||
cs.ArkV1Client, err = arkv1.NewForConfig(&configShallowCopy)
|
cs.arkV1, err = arkv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -72,7 +81,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
// panics if there is an error in the config.
|
// panics if there is an error in the config.
|
||||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.ArkV1Client = arkv1.NewForConfigOrDie(c)
|
cs.arkV1 = arkv1.NewForConfigOrDie(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
return &cs
|
return &cs
|
||||||
|
@ -81,7 +90,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
// New creates a new Clientset for the given RESTClient.
|
// New creates a new Clientset for the given RESTClient.
|
||||||
func New(c rest.Interface) *Clientset {
|
func New(c rest.Interface) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.ArkV1Client = arkv1.New(c)
|
cs.arkV1 = arkv1.New(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
return &cs
|
return &cs
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated clientset.
|
||||||
|
package versioned
|
|
@ -1,9 +1,24 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
package fake
|
||||||
|
|
||||||
import (
|
import (
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
clientset "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
arkv1 "github.com/heptio/ark/pkg/generated/clientset/typed/ark/v1"
|
arkv1 "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||||
fakearkv1 "github.com/heptio/ark/pkg/generated/clientset/typed/ark/v1/fake"
|
fakearkv1 "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1/fake"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
|
@ -25,10 +40,9 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
|
|
||||||
fakePtr := testing.Fake{}
|
fakePtr := testing.Fake{}
|
||||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||||
|
|
||||||
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
|
||||||
|
|
||||||
return &Clientset{fakePtr}
|
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||||
|
@ -36,10 +50,11 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||||
// you want to test easier.
|
// you want to test easier.
|
||||||
type Clientset struct {
|
type Clientset struct {
|
||||||
testing.Fake
|
testing.Fake
|
||||||
|
discovery *fakediscovery.FakeDiscovery
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
|
return c.discovery
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ clientset.Interface = &Clientset{}
|
var _ clientset.Interface = &Clientset{}
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated fake clientset.
|
||||||
|
package fake
|
|
@ -1,3 +1,18 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
package fake
|
||||||
|
|
||||||
import (
|
import (
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package contains the scheme of the automatically generated clientset.
|
||||||
|
package scheme
|
|
@ -1,3 +1,18 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 scheme
|
package scheme
|
||||||
|
|
||||||
import (
|
import (
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
"github.com/heptio/ark/pkg/generated/clientset/scheme"
|
"github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
)
|
)
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
scheme "github.com/heptio/ark/pkg/generated/clientset/scheme"
|
scheme "github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -43,6 +58,41 @@ func newBackups(c *ArkV1Client, namespace string) *backups {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any.
|
||||||
|
func (c *backups) Get(name string, options meta_v1.GetOptions) (result *v1.Backup, err error) {
|
||||||
|
result = &v1.Backup{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("backups").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Backups that match those selectors.
|
||||||
|
func (c *backups) List(opts meta_v1.ListOptions) (result *v1.BackupList, err error) {
|
||||||
|
result = &v1.BackupList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("backups").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested backups.
|
||||||
|
func (c *backups) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("backups").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any.
|
// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||||
func (c *backups) Create(backup *v1.Backup) (result *v1.Backup, err error) {
|
func (c *backups) Create(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||||
result = &v1.Backup{}
|
result = &v1.Backup{}
|
||||||
|
@ -69,7 +119,7 @@ func (c *backups) Update(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
func (c *backups) UpdateStatus(backup *v1.Backup) (result *v1.Backup, err error) {
|
func (c *backups) UpdateStatus(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||||
result = &v1.Backup{}
|
result = &v1.Backup{}
|
||||||
|
@ -106,41 +156,6 @@ func (c *backups) DeleteCollection(options *meta_v1.DeleteOptions, listOptions m
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any.
|
|
||||||
func (c *backups) Get(name string, options meta_v1.GetOptions) (result *v1.Backup, err error) {
|
|
||||||
result = &v1.Backup{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("backups").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Backups that match those selectors.
|
|
||||||
func (c *backups) List(opts meta_v1.ListOptions) (result *v1.BackupList, err error) {
|
|
||||||
result = &v1.BackupList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("backups").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested backups.
|
|
||||||
func (c *backups) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("backups").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched backup.
|
// Patch applies the patch and returns the patched backup.
|
||||||
func (c *backups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Backup, err error) {
|
func (c *backups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Backup, err error) {
|
||||||
result = &v1.Backup{}
|
result = &v1.Backup{}
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
scheme "github.com/heptio/ark/pkg/generated/clientset/scheme"
|
scheme "github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -42,6 +57,41 @@ func newConfigs(c *ArkV1Client, namespace string) *configs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get takes name of the config, and returns the corresponding config object, and an error if there is any.
|
||||||
|
func (c *configs) Get(name string, options meta_v1.GetOptions) (result *v1.Config, err error) {
|
||||||
|
result = &v1.Config{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("configs").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Configs that match those selectors.
|
||||||
|
func (c *configs) List(opts meta_v1.ListOptions) (result *v1.ConfigList, err error) {
|
||||||
|
result = &v1.ConfigList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("configs").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested configs.
|
||||||
|
func (c *configs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("configs").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any.
|
// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any.
|
||||||
func (c *configs) Create(config *v1.Config) (result *v1.Config, err error) {
|
func (c *configs) Create(config *v1.Config) (result *v1.Config, err error) {
|
||||||
result = &v1.Config{}
|
result = &v1.Config{}
|
||||||
|
@ -89,41 +139,6 @@ func (c *configs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions m
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the config, and returns the corresponding config object, and an error if there is any.
|
|
||||||
func (c *configs) Get(name string, options meta_v1.GetOptions) (result *v1.Config, err error) {
|
|
||||||
result = &v1.Config{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("configs").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Configs that match those selectors.
|
|
||||||
func (c *configs) List(opts meta_v1.ListOptions) (result *v1.ConfigList, err error) {
|
|
||||||
result = &v1.ConfigList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("configs").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested configs.
|
|
||||||
func (c *configs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("configs").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched config.
|
// Patch applies the patch and returns the patched config.
|
||||||
func (c *configs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Config, err error) {
|
func (c *configs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Config, err error) {
|
||||||
result = &v1.Config{}
|
result = &v1.Config{}
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
scheme "github.com/heptio/ark/pkg/generated/clientset/scheme"
|
scheme "github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -43,6 +58,41 @@ func newDownloadRequests(c *ArkV1Client, namespace string) *downloadRequests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get takes name of the downloadRequest, and returns the corresponding downloadRequest object, and an error if there is any.
|
||||||
|
func (c *downloadRequests) Get(name string, options meta_v1.GetOptions) (result *v1.DownloadRequest, err error) {
|
||||||
|
result = &v1.DownloadRequest{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("downloadrequests").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of DownloadRequests that match those selectors.
|
||||||
|
func (c *downloadRequests) List(opts meta_v1.ListOptions) (result *v1.DownloadRequestList, err error) {
|
||||||
|
result = &v1.DownloadRequestList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("downloadrequests").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested downloadRequests.
|
||||||
|
func (c *downloadRequests) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("downloadrequests").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
// Create takes the representation of a downloadRequest and creates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
// Create takes the representation of a downloadRequest and creates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||||
func (c *downloadRequests) Create(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
func (c *downloadRequests) Create(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
||||||
result = &v1.DownloadRequest{}
|
result = &v1.DownloadRequest{}
|
||||||
|
@ -69,7 +119,7 @@ func (c *downloadRequests) Update(downloadRequest *v1.DownloadRequest) (result *
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
func (c *downloadRequests) UpdateStatus(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
func (c *downloadRequests) UpdateStatus(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
||||||
result = &v1.DownloadRequest{}
|
result = &v1.DownloadRequest{}
|
||||||
|
@ -106,41 +156,6 @@ func (c *downloadRequests) DeleteCollection(options *meta_v1.DeleteOptions, list
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the downloadRequest, and returns the corresponding downloadRequest object, and an error if there is any.
|
|
||||||
func (c *downloadRequests) Get(name string, options meta_v1.GetOptions) (result *v1.DownloadRequest, err error) {
|
|
||||||
result = &v1.DownloadRequest{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("downloadrequests").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of DownloadRequests that match those selectors.
|
|
||||||
func (c *downloadRequests) List(opts meta_v1.ListOptions) (result *v1.DownloadRequestList, err error) {
|
|
||||||
result = &v1.DownloadRequestList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("downloadrequests").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested downloadRequests.
|
|
||||||
func (c *downloadRequests) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("downloadrequests").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched downloadRequest.
|
// Patch applies the patch and returns the patched downloadRequest.
|
||||||
func (c *downloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DownloadRequest, err error) {
|
func (c *downloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DownloadRequest, err error) {
|
||||||
result = &v1.DownloadRequest{}
|
result = &v1.DownloadRequest{}
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 package is generated by client-gen with custom arguments.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
|
@ -1,7 +1,22 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
package fake
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/generated/clientset/typed/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
)
|
)
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 (
|
||||||
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeBackups implements BackupInterface
|
||||||
|
type FakeBackups struct {
|
||||||
|
Fake *FakeArkV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var backupsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "backups"}
|
||||||
|
|
||||||
|
var backupsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Backup"}
|
||||||
|
|
||||||
|
// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any.
|
||||||
|
func (c *FakeBackups) Get(name string, options v1.GetOptions) (result *ark_v1.Backup, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(backupsResource, c.ns, name), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Backup), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Backups that match those selectors.
|
||||||
|
func (c *FakeBackups) List(opts v1.ListOptions) (result *ark_v1.BackupList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(backupsResource, backupsKind, c.ns, opts), &ark_v1.BackupList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &ark_v1.BackupList{}
|
||||||
|
for _, item := range obj.(*ark_v1.BackupList).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 backups.
|
||||||
|
func (c *FakeBackups) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(backupsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||||
|
func (c *FakeBackups) Create(backup *ark_v1.Backup) (result *ark_v1.Backup, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(backupsResource, c.ns, backup), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Backup), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a backup and updates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||||
|
func (c *FakeBackups) Update(backup *ark_v1.Backup) (result *ark_v1.Backup, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(backupsResource, c.ns, backup), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Backup), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakeBackups) UpdateStatus(backup *ark_v1.Backup) (*ark_v1.Backup, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(backupsResource, "status", c.ns, backup), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Backup), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the backup and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeBackups) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(backupsResource, c.ns, name), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeBackups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(backupsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &ark_v1.BackupList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched backup.
|
||||||
|
func (c *FakeBackups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *ark_v1.Backup, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(backupsResource, c.ns, name, data, subresources...), &ark_v1.Backup{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Backup), err
|
||||||
|
}
|
|
@ -0,0 +1,125 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 (
|
||||||
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeConfigs implements ConfigInterface
|
||||||
|
type FakeConfigs struct {
|
||||||
|
Fake *FakeArkV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var configsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "configs"}
|
||||||
|
|
||||||
|
var configsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Config"}
|
||||||
|
|
||||||
|
// Get takes name of the config, and returns the corresponding config object, and an error if there is any.
|
||||||
|
func (c *FakeConfigs) Get(name string, options v1.GetOptions) (result *ark_v1.Config, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(configsResource, c.ns, name), &ark_v1.Config{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Config), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Configs that match those selectors.
|
||||||
|
func (c *FakeConfigs) List(opts v1.ListOptions) (result *ark_v1.ConfigList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(configsResource, configsKind, c.ns, opts), &ark_v1.ConfigList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &ark_v1.ConfigList{}
|
||||||
|
for _, item := range obj.(*ark_v1.ConfigList).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 configs.
|
||||||
|
func (c *FakeConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(configsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any.
|
||||||
|
func (c *FakeConfigs) Create(config *ark_v1.Config) (result *ark_v1.Config, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(configsResource, c.ns, config), &ark_v1.Config{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Config), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any.
|
||||||
|
func (c *FakeConfigs) Update(config *ark_v1.Config) (result *ark_v1.Config, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(configsResource, c.ns, config), &ark_v1.Config{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Config), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the config and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeConfigs) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(configsResource, c.ns, name), &ark_v1.Config{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(configsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &ark_v1.ConfigList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched config.
|
||||||
|
func (c *FakeConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *ark_v1.Config, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(configsResource, c.ns, name, data, subresources...), &ark_v1.Config{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Config), err
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 (
|
||||||
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeDownloadRequests implements DownloadRequestInterface
|
||||||
|
type FakeDownloadRequests struct {
|
||||||
|
Fake *FakeArkV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var downloadrequestsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "downloadrequests"}
|
||||||
|
|
||||||
|
var downloadrequestsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "DownloadRequest"}
|
||||||
|
|
||||||
|
// Get takes name of the downloadRequest, and returns the corresponding downloadRequest object, and an error if there is any.
|
||||||
|
func (c *FakeDownloadRequests) Get(name string, options v1.GetOptions) (result *ark_v1.DownloadRequest, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(downloadrequestsResource, c.ns, name), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.DownloadRequest), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of DownloadRequests that match those selectors.
|
||||||
|
func (c *FakeDownloadRequests) List(opts v1.ListOptions) (result *ark_v1.DownloadRequestList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(downloadrequestsResource, downloadrequestsKind, c.ns, opts), &ark_v1.DownloadRequestList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &ark_v1.DownloadRequestList{}
|
||||||
|
for _, item := range obj.(*ark_v1.DownloadRequestList).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 downloadRequests.
|
||||||
|
func (c *FakeDownloadRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(downloadrequestsResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a downloadRequest and creates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||||
|
func (c *FakeDownloadRequests) Create(downloadRequest *ark_v1.DownloadRequest) (result *ark_v1.DownloadRequest, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(downloadrequestsResource, c.ns, downloadRequest), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.DownloadRequest), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a downloadRequest and updates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||||
|
func (c *FakeDownloadRequests) Update(downloadRequest *ark_v1.DownloadRequest) (result *ark_v1.DownloadRequest, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(downloadrequestsResource, c.ns, downloadRequest), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.DownloadRequest), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakeDownloadRequests) UpdateStatus(downloadRequest *ark_v1.DownloadRequest) (*ark_v1.DownloadRequest, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(downloadrequestsResource, "status", c.ns, downloadRequest), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.DownloadRequest), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the downloadRequest and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeDownloadRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(downloadrequestsResource, c.ns, name), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeDownloadRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(downloadrequestsResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &ark_v1.DownloadRequestList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched downloadRequest.
|
||||||
|
func (c *FakeDownloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *ark_v1.DownloadRequest, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(downloadrequestsResource, c.ns, name, data, subresources...), &ark_v1.DownloadRequest{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.DownloadRequest), err
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 (
|
||||||
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeRestores implements RestoreInterface
|
||||||
|
type FakeRestores struct {
|
||||||
|
Fake *FakeArkV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var restoresResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "restores"}
|
||||||
|
|
||||||
|
var restoresKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Restore"}
|
||||||
|
|
||||||
|
// Get takes name of the restore, and returns the corresponding restore object, and an error if there is any.
|
||||||
|
func (c *FakeRestores) Get(name string, options v1.GetOptions) (result *ark_v1.Restore, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(restoresResource, c.ns, name), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Restore), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Restores that match those selectors.
|
||||||
|
func (c *FakeRestores) List(opts v1.ListOptions) (result *ark_v1.RestoreList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(restoresResource, restoresKind, c.ns, opts), &ark_v1.RestoreList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &ark_v1.RestoreList{}
|
||||||
|
for _, item := range obj.(*ark_v1.RestoreList).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 restores.
|
||||||
|
func (c *FakeRestores) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(restoresResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a restore and creates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||||
|
func (c *FakeRestores) Create(restore *ark_v1.Restore) (result *ark_v1.Restore, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(restoresResource, c.ns, restore), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Restore), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a restore and updates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||||
|
func (c *FakeRestores) Update(restore *ark_v1.Restore) (result *ark_v1.Restore, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(restoresResource, c.ns, restore), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Restore), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakeRestores) UpdateStatus(restore *ark_v1.Restore) (*ark_v1.Restore, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(restoresResource, "status", c.ns, restore), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Restore), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the restore and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeRestores) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(restoresResource, c.ns, name), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeRestores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(restoresResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &ark_v1.RestoreList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched restore.
|
||||||
|
func (c *FakeRestores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *ark_v1.Restore, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(restoresResource, c.ns, name, data, subresources...), &ark_v1.Restore{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Restore), err
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 (
|
||||||
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeSchedules implements ScheduleInterface
|
||||||
|
type FakeSchedules struct {
|
||||||
|
Fake *FakeArkV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var schedulesResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "schedules"}
|
||||||
|
|
||||||
|
var schedulesKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Schedule"}
|
||||||
|
|
||||||
|
// Get takes name of the schedule, and returns the corresponding schedule object, and an error if there is any.
|
||||||
|
func (c *FakeSchedules) Get(name string, options v1.GetOptions) (result *ark_v1.Schedule, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewGetAction(schedulesResource, c.ns, name), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Schedule), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Schedules that match those selectors.
|
||||||
|
func (c *FakeSchedules) List(opts v1.ListOptions) (result *ark_v1.ScheduleList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewListAction(schedulesResource, schedulesKind, c.ns, opts), &ark_v1.ScheduleList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &ark_v1.ScheduleList{}
|
||||||
|
for _, item := range obj.(*ark_v1.ScheduleList).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 schedules.
|
||||||
|
func (c *FakeSchedules) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewWatchAction(schedulesResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a schedule and creates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||||
|
func (c *FakeSchedules) Create(schedule *ark_v1.Schedule) (result *ark_v1.Schedule, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewCreateAction(schedulesResource, c.ns, schedule), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Schedule), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a schedule and updates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||||
|
func (c *FakeSchedules) Update(schedule *ark_v1.Schedule) (result *ark_v1.Schedule, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateAction(schedulesResource, c.ns, schedule), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Schedule), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
func (c *FakeSchedules) UpdateStatus(schedule *ark_v1.Schedule) (*ark_v1.Schedule, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewUpdateSubresourceAction(schedulesResource, "status", c.ns, schedule), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Schedule), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the schedule and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeSchedules) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewDeleteAction(schedulesResource, c.ns, name), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeSchedules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewDeleteCollectionAction(schedulesResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &ark_v1.ScheduleList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched schedule.
|
||||||
|
func (c *FakeSchedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *ark_v1.Schedule, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewPatchSubresourceAction(schedulesResource, c.ns, name, data, subresources...), &ark_v1.Schedule{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*ark_v1.Schedule), err
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
type BackupExpansion interface{}
|
||||||
|
|
||||||
|
type ConfigExpansion interface{}
|
||||||
|
|
||||||
|
type DownloadRequestExpansion interface{}
|
||||||
|
|
||||||
|
type RestoreExpansion interface{}
|
||||||
|
|
||||||
|
type ScheduleExpansion interface{}
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
scheme "github.com/heptio/ark/pkg/generated/clientset/scheme"
|
scheme "github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -43,6 +58,41 @@ func newRestores(c *ArkV1Client, namespace string) *restores {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get takes name of the restore, and returns the corresponding restore object, and an error if there is any.
|
||||||
|
func (c *restores) Get(name string, options meta_v1.GetOptions) (result *v1.Restore, err error) {
|
||||||
|
result = &v1.Restore{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("restores").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Restores that match those selectors.
|
||||||
|
func (c *restores) List(opts meta_v1.ListOptions) (result *v1.RestoreList, err error) {
|
||||||
|
result = &v1.RestoreList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("restores").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested restores.
|
||||||
|
func (c *restores) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("restores").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
// Create takes the representation of a restore and creates it. Returns the server's representation of the restore, and an error, if there is any.
|
// Create takes the representation of a restore and creates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||||
func (c *restores) Create(restore *v1.Restore) (result *v1.Restore, err error) {
|
func (c *restores) Create(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||||
result = &v1.Restore{}
|
result = &v1.Restore{}
|
||||||
|
@ -69,7 +119,7 @@ func (c *restores) Update(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
func (c *restores) UpdateStatus(restore *v1.Restore) (result *v1.Restore, err error) {
|
func (c *restores) UpdateStatus(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||||
result = &v1.Restore{}
|
result = &v1.Restore{}
|
||||||
|
@ -106,41 +156,6 @@ func (c *restores) DeleteCollection(options *meta_v1.DeleteOptions, listOptions
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the restore, and returns the corresponding restore object, and an error if there is any.
|
|
||||||
func (c *restores) Get(name string, options meta_v1.GetOptions) (result *v1.Restore, err error) {
|
|
||||||
result = &v1.Restore{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("restores").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Restores that match those selectors.
|
|
||||||
func (c *restores) List(opts meta_v1.ListOptions) (result *v1.RestoreList, err error) {
|
|
||||||
result = &v1.RestoreList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("restores").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested restores.
|
|
||||||
func (c *restores) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("restores").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched restore.
|
// Patch applies the patch and returns the patched restore.
|
||||||
func (c *restores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Restore, err error) {
|
func (c *restores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Restore, err error) {
|
||||||
result = &v1.Restore{}
|
result = &v1.Restore{}
|
|
@ -1,8 +1,23 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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 v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
scheme "github.com/heptio/ark/pkg/generated/clientset/scheme"
|
scheme "github.com/heptio/ark/pkg/generated/clientset/versioned/scheme"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -43,6 +58,41 @@ func newSchedules(c *ArkV1Client, namespace string) *schedules {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get takes name of the schedule, and returns the corresponding schedule object, and an error if there is any.
|
||||||
|
func (c *schedules) Get(name string, options meta_v1.GetOptions) (result *v1.Schedule, err error) {
|
||||||
|
result = &v1.Schedule{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("schedules").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of Schedules that match those selectors.
|
||||||
|
func (c *schedules) List(opts meta_v1.ListOptions) (result *v1.ScheduleList, err error) {
|
||||||
|
result = &v1.ScheduleList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("schedules").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested schedules.
|
||||||
|
func (c *schedules) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("schedules").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
// Create takes the representation of a schedule and creates it. Returns the server's representation of the schedule, and an error, if there is any.
|
// Create takes the representation of a schedule and creates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||||
func (c *schedules) Create(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
func (c *schedules) Create(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
||||||
result = &v1.Schedule{}
|
result = &v1.Schedule{}
|
||||||
|
@ -69,7 +119,7 @@ func (c *schedules) Update(schedule *v1.Schedule) (result *v1.Schedule, err erro
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
func (c *schedules) UpdateStatus(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
func (c *schedules) UpdateStatus(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
||||||
result = &v1.Schedule{}
|
result = &v1.Schedule{}
|
||||||
|
@ -106,41 +156,6 @@ func (c *schedules) DeleteCollection(options *meta_v1.DeleteOptions, listOptions
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the schedule, and returns the corresponding schedule object, and an error if there is any.
|
|
||||||
func (c *schedules) Get(name string, options meta_v1.GetOptions) (result *v1.Schedule, err error) {
|
|
||||||
result = &v1.Schedule{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("schedules").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of Schedules that match those selectors.
|
|
||||||
func (c *schedules) List(opts meta_v1.ListOptions) (result *v1.ScheduleList, err error) {
|
|
||||||
result = &v1.ScheduleList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("schedules").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested schedules.
|
|
||||||
func (c *schedules) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("schedules").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched schedule.
|
// Patch applies the patch and returns the patched schedule.
|
||||||
func (c *schedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Schedule, err error) {
|
func (c *schedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Schedule, err error) {
|
||||||
result = &v1.Schedule{}
|
result = &v1.Schedule{}
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package ark
|
package ark
|
||||||
|
|
|
@ -1,10 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,26 +41,31 @@ type backupInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newBackupInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
// NewBackupInformer constructs a new informer for Backup type.
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
// 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 NewBackupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.ArkV1().Backups(meta_v1.NamespaceAll).List(options)
|
return client.ArkV1().Backups(namespace).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.ArkV1().Backups(meta_v1.NamespaceAll).Watch(options)
|
return client.ArkV1().Backups(namespace).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&ark_v1.Backup{},
|
&ark_v1.Backup{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
indexers,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return sharedIndexInformer
|
func defaultBackupInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewBackupInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *backupInformer) Informer() cache.SharedIndexInformer {
|
func (f *backupInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&ark_v1.Backup{}, newBackupInformer)
|
return f.factory.InformerFor(&ark_v1.Backup{}, defaultBackupInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *backupInformer) Lister() v1.BackupLister {
|
func (f *backupInformer) Lister() v1.BackupLister {
|
||||||
|
|
|
@ -1,10 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,26 +41,31 @@ type configInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newConfigInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
// NewConfigInformer constructs a new informer for Config type.
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
// 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 NewConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.ArkV1().Configs(meta_v1.NamespaceAll).List(options)
|
return client.ArkV1().Configs(namespace).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.ArkV1().Configs(meta_v1.NamespaceAll).Watch(options)
|
return client.ArkV1().Configs(namespace).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&ark_v1.Config{},
|
&ark_v1.Config{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
indexers,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return sharedIndexInformer
|
func defaultConfigInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewConfigInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *configInformer) Informer() cache.SharedIndexInformer {
|
func (f *configInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&ark_v1.Config{}, newConfigInformer)
|
return f.factory.InformerFor(&ark_v1.Config{}, defaultConfigInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *configInformer) Lister() v1.ConfigLister {
|
func (f *configInformer) Lister() v1.ConfigLister {
|
||||||
|
|
|
@ -1,10 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,26 +41,31 @@ type downloadRequestInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newDownloadRequestInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
// NewDownloadRequestInformer constructs a new informer for DownloadRequest type.
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
// 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 NewDownloadRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.ArkV1().DownloadRequests(meta_v1.NamespaceAll).List(options)
|
return client.ArkV1().DownloadRequests(namespace).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.ArkV1().DownloadRequests(meta_v1.NamespaceAll).Watch(options)
|
return client.ArkV1().DownloadRequests(namespace).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&ark_v1.DownloadRequest{},
|
&ark_v1.DownloadRequest{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
indexers,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return sharedIndexInformer
|
func defaultDownloadRequestInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewDownloadRequestInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *downloadRequestInformer) Informer() cache.SharedIndexInformer {
|
func (f *downloadRequestInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&ark_v1.DownloadRequest{}, newDownloadRequestInformer)
|
return f.factory.InformerFor(&ark_v1.DownloadRequest{}, defaultDownloadRequestInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *downloadRequestInformer) Lister() v1.DownloadRequestLister {
|
func (f *downloadRequestInformer) Lister() v1.DownloadRequestLister {
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,10 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,26 +41,31 @@ type restoreInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newRestoreInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
// NewRestoreInformer constructs a new informer for Restore type.
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
// 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 NewRestoreInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.ArkV1().Restores(meta_v1.NamespaceAll).List(options)
|
return client.ArkV1().Restores(namespace).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.ArkV1().Restores(meta_v1.NamespaceAll).Watch(options)
|
return client.ArkV1().Restores(namespace).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&ark_v1.Restore{},
|
&ark_v1.Restore{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
indexers,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return sharedIndexInformer
|
func defaultRestoreInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewRestoreInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *restoreInformer) Informer() cache.SharedIndexInformer {
|
func (f *restoreInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&ark_v1.Restore{}, newRestoreInformer)
|
return f.factory.InformerFor(&ark_v1.Restore{}, defaultRestoreInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *restoreInformer) Lister() v1.RestoreLister {
|
func (f *restoreInformer) Lister() v1.RestoreLister {
|
||||||
|
|
|
@ -1,10 +1,26 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
ark_v1 "github.com/heptio/ark/pkg/apis/ark/v1"
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
v1 "github.com/heptio/ark/pkg/generated/listers/ark/v1"
|
||||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -25,26 +41,31 @@ type scheduleInformer struct {
|
||||||
factory internalinterfaces.SharedInformerFactory
|
factory internalinterfaces.SharedInformerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func newScheduleInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
// NewScheduleInformer constructs a new informer for Schedule type.
|
||||||
sharedIndexInformer := cache.NewSharedIndexInformer(
|
// 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 NewScheduleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
|
||||||
return client.ArkV1().Schedules(meta_v1.NamespaceAll).List(options)
|
return client.ArkV1().Schedules(namespace).List(options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
|
||||||
return client.ArkV1().Schedules(meta_v1.NamespaceAll).Watch(options)
|
return client.ArkV1().Schedules(namespace).Watch(options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&ark_v1.Schedule{},
|
&ark_v1.Schedule{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
|
indexers,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return sharedIndexInformer
|
func defaultScheduleInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewScheduleInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *scheduleInformer) Informer() cache.SharedIndexInformer {
|
func (f *scheduleInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&ark_v1.Schedule{}, newScheduleInformer)
|
return f.factory.InformerFor(&ark_v1.Schedule{}, defaultScheduleInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *scheduleInformer) Lister() v1.ScheduleLister {
|
func (f *scheduleInformer) Lister() v1.ScheduleLister {
|
||||||
|
|
|
@ -1,9 +1,25 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package externalversions
|
package externalversions
|
||||||
|
|
||||||
import (
|
import (
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
ark "github.com/heptio/ark/pkg/generated/informers/externalversions/ark"
|
ark "github.com/heptio/ark/pkg/generated/informers/externalversions/ark"
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
@ -15,7 +31,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type sharedInformerFactory struct {
|
type sharedInformerFactory struct {
|
||||||
client clientset.Interface
|
client versioned.Interface
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
defaultResync time.Duration
|
defaultResync time.Duration
|
||||||
|
|
||||||
|
@ -26,7 +42,7 @@ type sharedInformerFactory struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
||||||
func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory {
|
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||||
return &sharedInformerFactory{
|
return &sharedInformerFactory{
|
||||||
client: client,
|
client: client,
|
||||||
defaultResync: defaultResync,
|
defaultResync: defaultResync,
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package externalversions
|
package externalversions
|
||||||
|
|
|
@ -1,15 +1,31 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
package internalinterfaces
|
package internalinterfaces
|
||||||
|
|
||||||
import (
|
import (
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
versioned "github.com/heptio/ark/pkg/generated/clientset/versioned"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
time "time"
|
time "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NewInformerFunc func(clientset.Interface, time.Duration) cache.SharedIndexInformer
|
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||||
|
|
||||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||||
type SharedInformerFactory interface {
|
type SharedInformerFactory interface {
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
// This file was automatically generated by informer-gen
|
|
||||||
|
|
||||||
package internalversion
|
|
||||||
|
|
||||||
import (
|
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
|
||||||
internalinterfaces "github.com/heptio/ark/pkg/generated/informers/internalversion/internalinterfaces"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
time "time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type sharedInformerFactory struct {
|
|
||||||
client clientset.Interface
|
|
||||||
lock sync.Mutex
|
|
||||||
defaultResync time.Duration
|
|
||||||
|
|
||||||
informers map[reflect.Type]cache.SharedIndexInformer
|
|
||||||
// startedInformers is used for tracking which informers have been started.
|
|
||||||
// This allows Start() to be called multiple times safely.
|
|
||||||
startedInformers map[reflect.Type]bool
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
|
|
||||||
func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory {
|
|
||||||
return &sharedInformerFactory{
|
|
||||||
client: client,
|
|
||||||
defaultResync: defaultResync,
|
|
||||||
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
|
||||||
startedInformers: make(map[reflect.Type]bool),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start initializes all requested informers.
|
|
||||||
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
|
||||||
f.lock.Lock()
|
|
||||||
defer f.lock.Unlock()
|
|
||||||
|
|
||||||
for informerType, informer := range f.informers {
|
|
||||||
if !f.startedInformers[informerType] {
|
|
||||||
go informer.Run(stopCh)
|
|
||||||
f.startedInformers[informerType] = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WaitForCacheSync waits for all started informers' cache were synced.
|
|
||||||
func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
|
|
||||||
informers := func() map[reflect.Type]cache.SharedIndexInformer {
|
|
||||||
f.lock.Lock()
|
|
||||||
defer f.lock.Unlock()
|
|
||||||
|
|
||||||
informers := map[reflect.Type]cache.SharedIndexInformer{}
|
|
||||||
for informerType, informer := range f.informers {
|
|
||||||
if f.startedInformers[informerType] {
|
|
||||||
informers[informerType] = informer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return informers
|
|
||||||
}()
|
|
||||||
|
|
||||||
res := map[reflect.Type]bool{}
|
|
||||||
for informType, informer := range informers {
|
|
||||||
res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
|
||||||
// client.
|
|
||||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
|
||||||
f.lock.Lock()
|
|
||||||
defer f.lock.Unlock()
|
|
||||||
|
|
||||||
informerType := reflect.TypeOf(obj)
|
|
||||||
informer, exists := f.informers[informerType]
|
|
||||||
if exists {
|
|
||||||
return informer
|
|
||||||
}
|
|
||||||
informer = newFunc(f.client, f.defaultResync)
|
|
||||||
f.informers[informerType] = informer
|
|
||||||
|
|
||||||
return informer
|
|
||||||
}
|
|
||||||
|
|
||||||
// SharedInformerFactory provides shared informers for resources in all known
|
|
||||||
// API group versions.
|
|
||||||
type SharedInformerFactory interface {
|
|
||||||
internalinterfaces.SharedInformerFactory
|
|
||||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
|
||||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
// This file was automatically generated by informer-gen
|
|
||||||
|
|
||||||
package internalversion
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
|
||||||
// sharedInformers based on type
|
|
||||||
type GenericInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() cache.GenericLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type genericInformer struct {
|
|
||||||
informer cache.SharedIndexInformer
|
|
||||||
resource schema.GroupResource
|
|
||||||
}
|
|
||||||
|
|
||||||
// Informer returns the SharedIndexInformer.
|
|
||||||
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.informer
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lister returns the GenericLister.
|
|
||||||
func (f *genericInformer) Lister() cache.GenericLister {
|
|
||||||
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ForResource gives generic access to a shared informer of the matching type
|
|
||||||
// TODO extend this to unknown resources with a client pool
|
|
||||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
|
||||||
switch resource {
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, fmt.Errorf("no informer found for %v", resource)
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
// This file was automatically generated by informer-gen
|
|
||||||
|
|
||||||
package internalinterfaces
|
|
||||||
|
|
||||||
import (
|
|
||||||
clientset "github.com/heptio/ark/pkg/generated/clientset"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
time "time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type NewInformerFunc func(clientset.Interface, time.Duration) cache.SharedIndexInformer
|
|
||||||
|
|
||||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
|
||||||
type SharedInformerFactory interface {
|
|
||||||
Start(stopCh <-chan struct{})
|
|
||||||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
|
||||||
}
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2017 the Heptio Ark contributors.
|
||||||
|
|
||||||
|
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
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
Loading…
Reference in New Issue