Move informers,clientset and listers to generated package (#2093)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package versioned
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/generated/clientset/versioned/typed/core/v1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
CoreV1() corev1.CoreV1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
coreV1 *corev1.CoreV1Client
|
||||
}
|
||||
|
||||
// CoreV1 retrieves the CoreV1Client
|
||||
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||
return c.coreV1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
// If config's RateLimiter is not set and QPS and Burst are acceptable,
|
||||
// NewForConfig will generate a rate-limiter in configShallowCopy.
|
||||
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
if configShallowCopy.Burst <= 0 {
|
||||
return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
}
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.coreV1, err = corev1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &cs, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.coreV1 = corev1.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &cs
|
||||
}
|
||||
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.coreV1 = corev1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
clientset "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
corev1 "github.com/fission/fission/pkg/generated/clientset/versioned/typed/core/v1"
|
||||
fakecorev1 "github.com/fission/fission/pkg/generated/clientset/versioned/typed/core/v1/fake"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||
// for a real clientset and is mostly useful in simple unit tests.
|
||||
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
for _, obj := range objects {
|
||||
if err := o.Add(obj); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
cs := &Clientset{tracker: o}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
return true, watch, nil
|
||||
})
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||
// struct to get a default implementation. This makes faking out just the method
|
||||
// you want to test easier.
|
||||
type Clientset struct {
|
||||
testing.Fake
|
||||
discovery *fakediscovery.FakeDiscovery
|
||||
tracker testing.ObjectTracker
|
||||
}
|
||||
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.discovery
|
||||
}
|
||||
|
||||
func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||
return c.tracker
|
||||
}
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// CoreV1 retrieves the CoreV1Client
|
||||
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
|
||||
return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
corev1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(scheme))
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package contains the scheme of the automatically generated clientset.
|
||||
package scheme
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package scheme
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
corev1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(Scheme))
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// CanaryConfigsGetter has a method to return a CanaryConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type CanaryConfigsGetter interface {
|
||||
CanaryConfigs(namespace string) CanaryConfigInterface
|
||||
}
|
||||
|
||||
// CanaryConfigInterface has methods to work with CanaryConfig resources.
|
||||
type CanaryConfigInterface interface {
|
||||
Create(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.CreateOptions) (*v1.CanaryConfig, error)
|
||||
Update(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (*v1.CanaryConfig, error)
|
||||
UpdateStatus(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (*v1.CanaryConfig, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CanaryConfig, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.CanaryConfigList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CanaryConfig, err error)
|
||||
CanaryConfigExpansion
|
||||
}
|
||||
|
||||
// canaryConfigs implements CanaryConfigInterface
|
||||
type canaryConfigs struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newCanaryConfigs returns a CanaryConfigs
|
||||
func newCanaryConfigs(c *CoreV1Client, namespace string) *canaryConfigs {
|
||||
return &canaryConfigs{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||
func (c *canaryConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||
func (c *canaryConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CanaryConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CanaryConfigList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||
func (c *canaryConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *canaryConfigs) Create(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.CreateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *canaryConfigs) Update(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(_canaryConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *canaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(_canaryConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *canaryConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *canaryConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canaryConfig.
|
||||
func (c *canaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type CoreV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CanaryConfigsGetter
|
||||
EnvironmentsGetter
|
||||
FunctionsGetter
|
||||
HTTPTriggersGetter
|
||||
KubernetesWatchTriggersGetter
|
||||
MessageQueueTriggersGetter
|
||||
PackagesGetter
|
||||
TimeTriggersGetter
|
||||
}
|
||||
|
||||
// CoreV1Client is used to interact with features provided by the fission.io group.
|
||||
type CoreV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) CanaryConfigs(namespace string) CanaryConfigInterface {
|
||||
return newCanaryConfigs(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) Environments(namespace string) EnvironmentInterface {
|
||||
return newEnvironments(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) Functions(namespace string) FunctionInterface {
|
||||
return newFunctions(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) HTTPTriggers(namespace string) HTTPTriggerInterface {
|
||||
return newHTTPTriggers(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerInterface {
|
||||
return newKubernetesWatchTriggers(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) MessageQueueTriggers(namespace string) MessageQueueTriggerInterface {
|
||||
return newMessageQueueTriggers(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) Packages(namespace string) PackageInterface {
|
||||
return newPackages(c, namespace)
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) TimeTriggers(namespace string) TimeTriggerInterface {
|
||||
return newTimeTriggers(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CoreV1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &CoreV1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new CoreV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new CoreV1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *CoreV1Client {
|
||||
return &CoreV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CoreV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// EnvironmentsGetter has a method to return a EnvironmentInterface.
|
||||
// A group's client should implement this interface.
|
||||
type EnvironmentsGetter interface {
|
||||
Environments(namespace string) EnvironmentInterface
|
||||
}
|
||||
|
||||
// EnvironmentInterface has methods to work with Environment resources.
|
||||
type EnvironmentInterface interface {
|
||||
Create(ctx context.Context, _environment *v1.Environment, opts metav1.CreateOptions) (*v1.Environment, error)
|
||||
Update(ctx context.Context, _environment *v1.Environment, opts metav1.UpdateOptions) (*v1.Environment, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Environment, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.EnvironmentList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Environment, err error)
|
||||
EnvironmentExpansion
|
||||
}
|
||||
|
||||
// environments implements EnvironmentInterface
|
||||
type environments struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newEnvironments returns a Environments
|
||||
func newEnvironments(c *CoreV1Client, namespace string) *environments {
|
||||
return &environments{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||
func (c *environments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||
func (c *environments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EnvironmentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.EnvironmentList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested environments.
|
||||
func (c *environments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *environments) Create(ctx context.Context, _environment *v1.Environment, opts metav1.CreateOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_environment).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *environments) Update(ctx context.Context, _environment *v1.Environment, opts metav1.UpdateOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(_environment.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_environment).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||
func (c *environments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *environments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched environment.
|
||||
func (c *environments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeCanaryConfigs implements CanaryConfigInterface
|
||||
type FakeCanaryConfigs struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var canaryconfigsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "canaryconfigs"}
|
||||
|
||||
var canaryconfigsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "CanaryConfig"}
|
||||
|
||||
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||
func (c *FakeCanaryConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||
func (c *FakeCanaryConfigs) List(ctx context.Context, opts v1.ListOptions) (result *corev1.CanaryConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(canaryconfigsResource, canaryconfigsKind, c.ns, opts), &corev1.CanaryConfigList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.CanaryConfigList{ListMeta: obj.(*corev1.CanaryConfigList).ListMeta}
|
||||
for _, item := range obj.(*corev1.CanaryConfigList).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 canaryConfigs.
|
||||
func (c *FakeCanaryConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(canaryconfigsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *FakeCanaryConfigs) Create(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.CreateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *FakeCanaryConfigs) Update(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), 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 *FakeCanaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (*corev1.CanaryConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(canaryconfigsResource, "status", c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCanaryConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCanaryConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(canaryconfigsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.CanaryConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canaryConfig.
|
||||
func (c *FakeCanaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, name, pt, data, subresources...), &corev1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/generated/clientset/versioned/typed/core/v1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeCoreV1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) CanaryConfigs(namespace string) v1.CanaryConfigInterface {
|
||||
return &FakeCanaryConfigs{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) Environments(namespace string) v1.EnvironmentInterface {
|
||||
return &FakeEnvironments{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) Functions(namespace string) v1.FunctionInterface {
|
||||
return &FakeFunctions{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) HTTPTriggers(namespace string) v1.HTTPTriggerInterface {
|
||||
return &FakeHTTPTriggers{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) KubernetesWatchTriggers(namespace string) v1.KubernetesWatchTriggerInterface {
|
||||
return &FakeKubernetesWatchTriggers{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) MessageQueueTriggers(namespace string) v1.MessageQueueTriggerInterface {
|
||||
return &FakeMessageQueueTriggers{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) Packages(namespace string) v1.PackageInterface {
|
||||
return &FakePackages{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeCoreV1) TimeTriggers(namespace string) v1.TimeTriggerInterface {
|
||||
return &FakeTimeTriggers{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCoreV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeEnvironments implements EnvironmentInterface
|
||||
type FakeEnvironments struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var environmentsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "environments"}
|
||||
|
||||
var environmentsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Environment"}
|
||||
|
||||
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||
func (c *FakeEnvironments) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||
func (c *FakeEnvironments) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EnvironmentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(environmentsResource, environmentsKind, c.ns, opts), &corev1.EnvironmentList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.EnvironmentList{ListMeta: obj.(*corev1.EnvironmentList).ListMeta}
|
||||
for _, item := range obj.(*corev1.EnvironmentList).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 environments.
|
||||
func (c *FakeEnvironments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(environmentsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *FakeEnvironments) Create(ctx context.Context, _environment *corev1.Environment, opts v1.CreateOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *FakeEnvironments) Update(ctx context.Context, _environment *corev1.Environment, opts v1.UpdateOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEnvironments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEnvironments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(environmentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.EnvironmentList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched environment.
|
||||
func (c *FakeEnvironments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, name, pt, data, subresources...), &corev1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeFunctions implements FunctionInterface
|
||||
type FakeFunctions struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var functionsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "functions"}
|
||||
|
||||
var functionsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Function"}
|
||||
|
||||
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||
func (c *FakeFunctions) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||
func (c *FakeFunctions) List(ctx context.Context, opts v1.ListOptions) (result *corev1.FunctionList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(functionsResource, functionsKind, c.ns, opts), &corev1.FunctionList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.FunctionList{ListMeta: obj.(*corev1.FunctionList).ListMeta}
|
||||
for _, item := range obj.(*corev1.FunctionList).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 functions.
|
||||
func (c *FakeFunctions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(functionsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *FakeFunctions) Create(ctx context.Context, _function *corev1.Function, opts v1.CreateOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *FakeFunctions) Update(ctx context.Context, _function *corev1.Function, opts v1.UpdateOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeFunctions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeFunctions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(functionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.FunctionList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched function.
|
||||
func (c *FakeFunctions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, name, pt, data, subresources...), &corev1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeHTTPTriggers implements HTTPTriggerInterface
|
||||
type FakeHTTPTriggers struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var httptriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "httptriggers"}
|
||||
|
||||
var httptriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "HTTPTrigger"}
|
||||
|
||||
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||
func (c *FakeHTTPTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||
func (c *FakeHTTPTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.HTTPTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(httptriggersResource, httptriggersKind, c.ns, opts), &corev1.HTTPTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.HTTPTriggerList{ListMeta: obj.(*corev1.HTTPTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.HTTPTriggerList).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 hTTPTriggers.
|
||||
func (c *FakeHTTPTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(httptriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *FakeHTTPTriggers) Create(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.CreateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *FakeHTTPTriggers) Update(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.UpdateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(httptriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.HTTPTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||
func (c *FakeHTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, name, pt, data, subresources...), &corev1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeKubernetesWatchTriggers implements KubernetesWatchTriggerInterface
|
||||
type FakeKubernetesWatchTriggers struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var kuberneteswatchtriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "kuberneteswatchtriggers"}
|
||||
|
||||
var kuberneteswatchtriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "KubernetesWatchTrigger"}
|
||||
|
||||
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||
func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.KubernetesWatchTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(kuberneteswatchtriggersResource, kuberneteswatchtriggersKind, c.ns, opts), &corev1.KubernetesWatchTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.KubernetesWatchTriggerList{ListMeta: obj.(*corev1.KubernetesWatchTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.KubernetesWatchTriggerList).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 kubernetesWatchTriggers.
|
||||
func (c *FakeKubernetesWatchTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(kuberneteswatchtriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Create(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.CreateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Update(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.UpdateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeKubernetesWatchTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeKubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(kuberneteswatchtriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.KubernetesWatchTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||
func (c *FakeKubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, name, pt, data, subresources...), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeMessageQueueTriggers implements MessageQueueTriggerInterface
|
||||
type FakeMessageQueueTriggers struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var messagequeuetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "messagequeuetriggers"}
|
||||
|
||||
var messagequeuetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "MessageQueueTrigger"}
|
||||
|
||||
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||
func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.MessageQueueTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(messagequeuetriggersResource, messagequeuetriggersKind, c.ns, opts), &corev1.MessageQueueTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.MessageQueueTriggerList{ListMeta: obj.(*corev1.MessageQueueTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.MessageQueueTriggerList).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 messageQueueTriggers.
|
||||
func (c *FakeMessageQueueTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(messagequeuetriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Create(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.CreateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Update(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.UpdateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMessageQueueTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMessageQueueTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(messagequeuetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.MessageQueueTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||
func (c *FakeMessageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, name, pt, data, subresources...), &corev1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakePackages implements PackageInterface
|
||||
type FakePackages struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var packagesResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "packages"}
|
||||
|
||||
var packagesKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Package"}
|
||||
|
||||
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||
func (c *FakePackages) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||
func (c *FakePackages) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PackageList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(packagesResource, packagesKind, c.ns, opts), &corev1.PackageList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.PackageList{ListMeta: obj.(*corev1.PackageList).ListMeta}
|
||||
for _, item := range obj.(*corev1.PackageList).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 packages.
|
||||
func (c *FakePackages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(packagesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *FakePackages) Create(ctx context.Context, _package *corev1.Package, opts v1.CreateOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *FakePackages) Update(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), 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 *FakePackages) UpdateStatus(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (*corev1.Package, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(packagesResource, "status", c.ns, _package), &corev1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePackages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePackages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(packagesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PackageList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched package.
|
||||
func (c *FakePackages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, name, pt, data, subresources...), &corev1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/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"
|
||||
)
|
||||
|
||||
// FakeTimeTriggers implements TimeTriggerInterface
|
||||
type FakeTimeTriggers struct {
|
||||
Fake *FakeCoreV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var timetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "timetriggers"}
|
||||
|
||||
var timetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "TimeTrigger"}
|
||||
|
||||
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||
func (c *FakeTimeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||
func (c *FakeTimeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.TimeTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(timetriggersResource, timetriggersKind, c.ns, opts), &corev1.TimeTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.TimeTriggerList{ListMeta: obj.(*corev1.TimeTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.TimeTriggerList).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 timeTriggers.
|
||||
func (c *FakeTimeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(timetriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *FakeTimeTriggers) Create(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.CreateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *FakeTimeTriggers) Update(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.UpdateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTimeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTimeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(timetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.TimeTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched timeTrigger.
|
||||
func (c *FakeTimeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, name, pt, data, subresources...), &corev1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// FunctionsGetter has a method to return a FunctionInterface.
|
||||
// A group's client should implement this interface.
|
||||
type FunctionsGetter interface {
|
||||
Functions(namespace string) FunctionInterface
|
||||
}
|
||||
|
||||
// FunctionInterface has methods to work with Function resources.
|
||||
type FunctionInterface interface {
|
||||
Create(ctx context.Context, _function *v1.Function, opts metav1.CreateOptions) (*v1.Function, error)
|
||||
Update(ctx context.Context, _function *v1.Function, opts metav1.UpdateOptions) (*v1.Function, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Function, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.FunctionList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Function, err error)
|
||||
FunctionExpansion
|
||||
}
|
||||
|
||||
// functions implements FunctionInterface
|
||||
type functions struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newFunctions returns a Functions
|
||||
func newFunctions(c *CoreV1Client, namespace string) *functions {
|
||||
return &functions{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||
func (c *functions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||
func (c *functions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FunctionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.FunctionList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested functions.
|
||||
func (c *functions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *functions) Create(ctx context.Context, _function *v1.Function, opts metav1.CreateOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_function).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *functions) Update(ctx context.Context, _function *v1.Function, opts metav1.UpdateOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(_function.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_function).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||
func (c *functions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *functions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched function.
|
||||
func (c *functions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
type CanaryConfigExpansion interface{}
|
||||
|
||||
type EnvironmentExpansion interface{}
|
||||
|
||||
type FunctionExpansion interface{}
|
||||
|
||||
type HTTPTriggerExpansion interface{}
|
||||
|
||||
type KubernetesWatchTriggerExpansion interface{}
|
||||
|
||||
type MessageQueueTriggerExpansion interface{}
|
||||
|
||||
type PackageExpansion interface{}
|
||||
|
||||
type TimeTriggerExpansion interface{}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// HTTPTriggersGetter has a method to return a HTTPTriggerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type HTTPTriggersGetter interface {
|
||||
HTTPTriggers(namespace string) HTTPTriggerInterface
|
||||
}
|
||||
|
||||
// HTTPTriggerInterface has methods to work with HTTPTrigger resources.
|
||||
type HTTPTriggerInterface interface {
|
||||
Create(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.CreateOptions) (*v1.HTTPTrigger, error)
|
||||
Update(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.UpdateOptions) (*v1.HTTPTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HTTPTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.HTTPTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPTrigger, err error)
|
||||
HTTPTriggerExpansion
|
||||
}
|
||||
|
||||
// hTTPTriggers implements HTTPTriggerInterface
|
||||
type hTTPTriggers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newHTTPTriggers returns a HTTPTriggers
|
||||
func newHTTPTriggers(c *CoreV1Client, namespace string) *hTTPTriggers {
|
||||
return &hTTPTriggers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||
func (c *hTTPTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||
func (c *hTTPTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.HTTPTriggerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||
func (c *hTTPTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *hTTPTriggers) Create(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.CreateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_hTTPTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *hTTPTriggers) Update(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.UpdateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(_hTTPTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_hTTPTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *hTTPTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *hTTPTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||
func (c *hTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// KubernetesWatchTriggersGetter has a method to return a KubernetesWatchTriggerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type KubernetesWatchTriggersGetter interface {
|
||||
KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerInterface
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggerInterface has methods to work with KubernetesWatchTrigger resources.
|
||||
type KubernetesWatchTriggerInterface interface {
|
||||
Create(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.CreateOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
Update(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.UpdateOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.KubernetesWatchTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubernetesWatchTrigger, err error)
|
||||
KubernetesWatchTriggerExpansion
|
||||
}
|
||||
|
||||
// kubernetesWatchTriggers implements KubernetesWatchTriggerInterface
|
||||
type kubernetesWatchTriggers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newKubernetesWatchTriggers returns a KubernetesWatchTriggers
|
||||
func newKubernetesWatchTriggers(c *CoreV1Client, namespace string) *kubernetesWatchTriggers {
|
||||
return &kubernetesWatchTriggers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||
func (c *kubernetesWatchTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||
func (c *kubernetesWatchTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubernetesWatchTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.KubernetesWatchTriggerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||
func (c *kubernetesWatchTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *kubernetesWatchTriggers) Create(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.CreateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_kubernetesWatchTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *kubernetesWatchTriggers) Update(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.UpdateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(_kubernetesWatchTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_kubernetesWatchTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *kubernetesWatchTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *kubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||
func (c *kubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// MessageQueueTriggersGetter has a method to return a MessageQueueTriggerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type MessageQueueTriggersGetter interface {
|
||||
MessageQueueTriggers(namespace string) MessageQueueTriggerInterface
|
||||
}
|
||||
|
||||
// MessageQueueTriggerInterface has methods to work with MessageQueueTrigger resources.
|
||||
type MessageQueueTriggerInterface interface {
|
||||
Create(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.CreateOptions) (*v1.MessageQueueTrigger, error)
|
||||
Update(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.UpdateOptions) (*v1.MessageQueueTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MessageQueueTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.MessageQueueTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MessageQueueTrigger, err error)
|
||||
MessageQueueTriggerExpansion
|
||||
}
|
||||
|
||||
// messageQueueTriggers implements MessageQueueTriggerInterface
|
||||
type messageQueueTriggers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newMessageQueueTriggers returns a MessageQueueTriggers
|
||||
func newMessageQueueTriggers(c *CoreV1Client, namespace string) *messageQueueTriggers {
|
||||
return &messageQueueTriggers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||
func (c *messageQueueTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||
func (c *messageQueueTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MessageQueueTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.MessageQueueTriggerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||
func (c *messageQueueTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *messageQueueTriggers) Create(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.CreateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_messageQueueTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *messageQueueTriggers) Update(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.UpdateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(_messageQueueTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_messageQueueTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *messageQueueTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *messageQueueTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||
func (c *messageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PackagesGetter has a method to return a PackageInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PackagesGetter interface {
|
||||
Packages(namespace string) PackageInterface
|
||||
}
|
||||
|
||||
// PackageInterface has methods to work with Package resources.
|
||||
type PackageInterface interface {
|
||||
Create(ctx context.Context, _package *v1.Package, opts metav1.CreateOptions) (*v1.Package, error)
|
||||
Update(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (*v1.Package, error)
|
||||
UpdateStatus(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (*v1.Package, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Package, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.PackageList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Package, err error)
|
||||
PackageExpansion
|
||||
}
|
||||
|
||||
// packages implements PackageInterface
|
||||
type packages struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newPackages returns a Packages
|
||||
func newPackages(c *CoreV1Client, namespace string) *packages {
|
||||
return &packages{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||
func (c *packages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||
func (c *packages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PackageList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.PackageList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested packages.
|
||||
func (c *packages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *packages) Create(ctx context.Context, _package *v1.Package, opts metav1.CreateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *packages) Update(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(_package.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *packages) UpdateStatus(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(_package.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||
func (c *packages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *packages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched package.
|
||||
func (c *packages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// TimeTriggersGetter has a method to return a TimeTriggerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type TimeTriggersGetter interface {
|
||||
TimeTriggers(namespace string) TimeTriggerInterface
|
||||
}
|
||||
|
||||
// TimeTriggerInterface has methods to work with TimeTrigger resources.
|
||||
type TimeTriggerInterface interface {
|
||||
Create(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.CreateOptions) (*v1.TimeTrigger, error)
|
||||
Update(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.UpdateOptions) (*v1.TimeTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.TimeTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.TimeTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TimeTrigger, err error)
|
||||
TimeTriggerExpansion
|
||||
}
|
||||
|
||||
// timeTriggers implements TimeTriggerInterface
|
||||
type timeTriggers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newTimeTriggers returns a TimeTriggers
|
||||
func newTimeTriggers(c *CoreV1Client, namespace string) *timeTriggers {
|
||||
return &timeTriggers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||
func (c *timeTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||
func (c *timeTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TimeTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.TimeTriggerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||
func (c *timeTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *timeTriggers) Create(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.CreateOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_timeTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *timeTriggers) Update(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.UpdateOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(_timeTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_timeTrigger).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *timeTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *timeTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched timeTrigger.
|
||||
func (c *timeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package core
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/generated/informers/externalversions/core/v1"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1 provides access to shared informers for resources in V1.
|
||||
V1() v1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1 returns a new v1.Interface.
|
||||
func (g *group) V1() v1.Interface {
|
||||
return v1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CanaryConfigInformer provides access to a shared informer and lister for
|
||||
// CanaryConfigs.
|
||||
type CanaryConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.CanaryConfigLister
|
||||
}
|
||||
|
||||
type _canaryConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewCanaryConfigInformer constructs a new informer for CanaryConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewCanaryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredCanaryConfigInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredCanaryConfigInformer constructs a new informer for CanaryConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredCanaryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().CanaryConfigs(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().CanaryConfigs(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.CanaryConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_canaryConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredCanaryConfigInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_canaryConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.CanaryConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_canaryConfigInformer) Lister() v1.CanaryConfigLister {
|
||||
return v1.NewCanaryConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// EnvironmentInformer provides access to a shared informer and lister for
|
||||
// Environments.
|
||||
type EnvironmentInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.EnvironmentLister
|
||||
}
|
||||
|
||||
type _environmentInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewEnvironmentInformer constructs a new informer for Environment type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewEnvironmentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredEnvironmentInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredEnvironmentInformer constructs a new informer for Environment type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredEnvironmentInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Environments(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Environments(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Environment{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_environmentInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredEnvironmentInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_environmentInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.Environment{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_environmentInformer) Lister() v1.EnvironmentLister {
|
||||
return v1.NewEnvironmentLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// FunctionInformer provides access to a shared informer and lister for
|
||||
// Functions.
|
||||
type FunctionInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.FunctionLister
|
||||
}
|
||||
|
||||
type _functionInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewFunctionInformer constructs a new informer for Function type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFunctionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredFunctionInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredFunctionInformer constructs a new informer for Function type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredFunctionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Functions(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Functions(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Function{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_functionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredFunctionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_functionInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.Function{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_functionInformer) Lister() v1.FunctionLister {
|
||||
return v1.NewFunctionLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// HTTPTriggerInformer provides access to a shared informer and lister for
|
||||
// HTTPTriggers.
|
||||
type HTTPTriggerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.HTTPTriggerLister
|
||||
}
|
||||
|
||||
type _hTTPTriggerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewHTTPTriggerInformer constructs a new informer for HTTPTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHTTPTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHTTPTriggerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHTTPTriggerInformer constructs a new informer for HTTPTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHTTPTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().HTTPTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().HTTPTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.HTTPTrigger{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_hTTPTriggerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHTTPTriggerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_hTTPTriggerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.HTTPTrigger{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_hTTPTriggerInformer) Lister() v1.HTTPTriggerLister {
|
||||
return v1.NewHTTPTriggerLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// CanaryConfigs returns a CanaryConfigInformer.
|
||||
CanaryConfigs() CanaryConfigInformer
|
||||
// Environments returns a EnvironmentInformer.
|
||||
Environments() EnvironmentInformer
|
||||
// Functions returns a FunctionInformer.
|
||||
Functions() FunctionInformer
|
||||
// HTTPTriggers returns a HTTPTriggerInformer.
|
||||
HTTPTriggers() HTTPTriggerInformer
|
||||
// KubernetesWatchTriggers returns a KubernetesWatchTriggerInformer.
|
||||
KubernetesWatchTriggers() KubernetesWatchTriggerInformer
|
||||
// MessageQueueTriggers returns a MessageQueueTriggerInformer.
|
||||
MessageQueueTriggers() MessageQueueTriggerInformer
|
||||
// Packages returns a PackageInformer.
|
||||
Packages() PackageInformer
|
||||
// TimeTriggers returns a TimeTriggerInformer.
|
||||
TimeTriggers() TimeTriggerInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// CanaryConfigs returns a CanaryConfigInformer.
|
||||
func (v *version) CanaryConfigs() CanaryConfigInformer {
|
||||
return &_canaryConfigInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Environments returns a EnvironmentInformer.
|
||||
func (v *version) Environments() EnvironmentInformer {
|
||||
return &_environmentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Functions returns a FunctionInformer.
|
||||
func (v *version) Functions() FunctionInformer {
|
||||
return &_functionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// HTTPTriggers returns a HTTPTriggerInformer.
|
||||
func (v *version) HTTPTriggers() HTTPTriggerInformer {
|
||||
return &_hTTPTriggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggers returns a KubernetesWatchTriggerInformer.
|
||||
func (v *version) KubernetesWatchTriggers() KubernetesWatchTriggerInformer {
|
||||
return &_kubernetesWatchTriggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// MessageQueueTriggers returns a MessageQueueTriggerInformer.
|
||||
func (v *version) MessageQueueTriggers() MessageQueueTriggerInformer {
|
||||
return &_messageQueueTriggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Packages returns a PackageInformer.
|
||||
func (v *version) Packages() PackageInformer {
|
||||
return &_packageInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// TimeTriggers returns a TimeTriggerInformer.
|
||||
func (v *version) TimeTriggers() TimeTriggerInformer {
|
||||
return &_timeTriggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// KubernetesWatchTriggerInformer provides access to a shared informer and lister for
|
||||
// KubernetesWatchTriggers.
|
||||
type KubernetesWatchTriggerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.KubernetesWatchTriggerLister
|
||||
}
|
||||
|
||||
type _kubernetesWatchTriggerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewKubernetesWatchTriggerInformer constructs a new informer for KubernetesWatchTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewKubernetesWatchTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredKubernetesWatchTriggerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredKubernetesWatchTriggerInformer constructs a new informer for KubernetesWatchTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredKubernetesWatchTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.KubernetesWatchTrigger{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_kubernetesWatchTriggerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredKubernetesWatchTriggerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_kubernetesWatchTriggerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.KubernetesWatchTrigger{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_kubernetesWatchTriggerInformer) Lister() v1.KubernetesWatchTriggerLister {
|
||||
return v1.NewKubernetesWatchTriggerLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// MessageQueueTriggerInformer provides access to a shared informer and lister for
|
||||
// MessageQueueTriggers.
|
||||
type MessageQueueTriggerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.MessageQueueTriggerLister
|
||||
}
|
||||
|
||||
type _messageQueueTriggerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewMessageQueueTriggerInformer constructs a new informer for MessageQueueTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewMessageQueueTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredMessageQueueTriggerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredMessageQueueTriggerInformer constructs a new informer for MessageQueueTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredMessageQueueTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.MessageQueueTrigger{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_messageQueueTriggerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredMessageQueueTriggerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_messageQueueTriggerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.MessageQueueTrigger{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_messageQueueTriggerInformer) Lister() v1.MessageQueueTriggerLister {
|
||||
return v1.NewMessageQueueTriggerLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PackageInformer provides access to a shared informer and lister for
|
||||
// Packages.
|
||||
type PackageInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.PackageLister
|
||||
}
|
||||
|
||||
type _packageInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPackageInformer constructs a new informer for Package type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewPackageInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPackageInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPackageInformer constructs a new informer for Package type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredPackageInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Packages(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Packages(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Package{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_packageInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPackageInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_packageInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.Package{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_packageInformer) Lister() v1.PackageLister {
|
||||
return v1.NewPackageLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fission/fission/pkg/generated/listers/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// TimeTriggerInformer provides access to a shared informer and lister for
|
||||
// TimeTriggers.
|
||||
type TimeTriggerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.TimeTriggerLister
|
||||
}
|
||||
|
||||
type _timeTriggerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewTimeTriggerInformer constructs a new informer for TimeTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewTimeTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredTimeTriggerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredTimeTriggerInformer constructs a new informer for TimeTrigger type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredTimeTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().TimeTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().TimeTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.TimeTrigger{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *_timeTriggerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredTimeTriggerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *_timeTriggerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&corev1.TimeTrigger{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *_timeTriggerInformer) Lister() v1.TimeTriggerLister {
|
||||
return v1.NewTimeTriggerLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
time "time"
|
||||
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
core "github.com/fission/fission/pkg/generated/informers/externalversions/core"
|
||||
internalinterfaces "github.com/fission/fission/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// SharedInformerOption defines the functional option type for SharedInformerFactory.
|
||||
type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory
|
||||
|
||||
type sharedInformerFactory struct {
|
||||
client versioned.Interface
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
lock sync.Mutex
|
||||
defaultResync time.Duration
|
||||
customResync map[reflect.Type]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
|
||||
}
|
||||
|
||||
// WithCustomResyncConfig sets a custom resync period for the specified informer types.
|
||||
func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
for k, v := range resyncConfig {
|
||||
factory.customResync[reflect.TypeOf(k)] = v
|
||||
}
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory.
|
||||
func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.tweakListOptions = tweakListOptions
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithNamespace limits the SharedInformerFactory to the specified namespace.
|
||||
func WithNamespace(namespace string) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.namespace = namespace
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces.
|
||||
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync)
|
||||
}
|
||||
|
||||
// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
|
||||
// Listers obtained via this SharedInformerFactory will be subject to the same filters
|
||||
// as specified here.
|
||||
// Deprecated: Please use NewSharedInformerFactoryWithOptions instead
|
||||
func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions))
|
||||
}
|
||||
|
||||
// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options.
|
||||
func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory {
|
||||
factory := &sharedInformerFactory{
|
||||
client: client,
|
||||
namespace: v1.NamespaceAll,
|
||||
defaultResync: defaultResync,
|
||||
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||
startedInformers: make(map[reflect.Type]bool),
|
||||
customResync: make(map[reflect.Type]time.Duration),
|
||||
}
|
||||
|
||||
// Apply all options
|
||||
for _, opt := range options {
|
||||
factory = opt(factory)
|
||||
}
|
||||
|
||||
return factory
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
resyncPeriod, exists := f.customResync[informerType]
|
||||
if !exists {
|
||||
resyncPeriod = f.defaultResync
|
||||
}
|
||||
|
||||
informer = newFunc(f.client, resyncPeriod)
|
||||
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
|
||||
|
||||
Core() core.Interface
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Core() core.Interface {
|
||||
return core.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
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 {
|
||||
// Group=fission.io, Version=v1
|
||||
case v1.SchemeGroupVersion.WithResource("canaryconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().CanaryConfigs().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("environments"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Environments().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("functions"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Functions().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("httptriggers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().HTTPTriggers().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("kuberneteswatchtriggers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().KubernetesWatchTriggers().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("messagequeuetriggers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().MessageQueueTriggers().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("packages"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Packages().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("timetriggers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().TimeTriggers().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package internalinterfaces
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
versioned "github.com/fission/fission/pkg/generated/clientset/versioned"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.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
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// CanaryConfigLister helps list CanaryConfigs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CanaryConfigLister interface {
|
||||
// List lists all CanaryConfigs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CanaryConfig, err error)
|
||||
// CanaryConfigs returns an object that can list and get CanaryConfigs.
|
||||
CanaryConfigs(namespace string) CanaryConfigNamespaceLister
|
||||
CanaryConfigListerExpansion
|
||||
}
|
||||
|
||||
// _canaryConfigLister implements the CanaryConfigLister interface.
|
||||
type _canaryConfigLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewCanaryConfigLister returns a new CanaryConfigLister.
|
||||
func NewCanaryConfigLister(indexer cache.Indexer) CanaryConfigLister {
|
||||
return &_canaryConfigLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all CanaryConfigs in the indexer.
|
||||
func (s *_canaryConfigLister) List(selector labels.Selector) (ret []*v1.CanaryConfig, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.CanaryConfig))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// CanaryConfigs returns an object that can list and get CanaryConfigs.
|
||||
func (s *_canaryConfigLister) CanaryConfigs(namespace string) CanaryConfigNamespaceLister {
|
||||
return _canaryConfigNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// CanaryConfigNamespaceLister helps list and get CanaryConfigs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CanaryConfigNamespaceLister interface {
|
||||
// List lists all CanaryConfigs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CanaryConfig, err error)
|
||||
// Get retrieves the CanaryConfig from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.CanaryConfig, error)
|
||||
CanaryConfigNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _canaryConfigNamespaceLister implements the CanaryConfigNamespaceLister
|
||||
// interface.
|
||||
type _canaryConfigNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all CanaryConfigs in the indexer for a given namespace.
|
||||
func (s _canaryConfigNamespaceLister) List(selector labels.Selector) (ret []*v1.CanaryConfig, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.CanaryConfig))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the CanaryConfig from the indexer for a given namespace and name.
|
||||
func (s _canaryConfigNamespaceLister) Get(name string) (*v1.CanaryConfig, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("canaryconfig"), name)
|
||||
}
|
||||
return obj.(*v1.CanaryConfig), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// EnvironmentLister helps list Environments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EnvironmentLister interface {
|
||||
// List lists all Environments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Environment, err error)
|
||||
// Environments returns an object that can list and get Environments.
|
||||
Environments(namespace string) EnvironmentNamespaceLister
|
||||
EnvironmentListerExpansion
|
||||
}
|
||||
|
||||
// _environmentLister implements the EnvironmentLister interface.
|
||||
type _environmentLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewEnvironmentLister returns a new EnvironmentLister.
|
||||
func NewEnvironmentLister(indexer cache.Indexer) EnvironmentLister {
|
||||
return &_environmentLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Environments in the indexer.
|
||||
func (s *_environmentLister) List(selector labels.Selector) (ret []*v1.Environment, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Environment))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Environments returns an object that can list and get Environments.
|
||||
func (s *_environmentLister) Environments(namespace string) EnvironmentNamespaceLister {
|
||||
return _environmentNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// EnvironmentNamespaceLister helps list and get Environments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EnvironmentNamespaceLister interface {
|
||||
// List lists all Environments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Environment, err error)
|
||||
// Get retrieves the Environment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Environment, error)
|
||||
EnvironmentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _environmentNamespaceLister implements the EnvironmentNamespaceLister
|
||||
// interface.
|
||||
type _environmentNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Environments in the indexer for a given namespace.
|
||||
func (s _environmentNamespaceLister) List(selector labels.Selector) (ret []*v1.Environment, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Environment))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Environment from the indexer for a given namespace and name.
|
||||
func (s _environmentNamespaceLister) Get(name string) (*v1.Environment, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("environment"), name)
|
||||
}
|
||||
return obj.(*v1.Environment), nil
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// CanaryConfigListerExpansion allows custom methods to be added to
|
||||
// CanaryConfigLister.
|
||||
type CanaryConfigListerExpansion interface{}
|
||||
|
||||
// CanaryConfigNamespaceListerExpansion allows custom methods to be added to
|
||||
// CanaryConfigNamespaceLister.
|
||||
type CanaryConfigNamespaceListerExpansion interface{}
|
||||
|
||||
// EnvironmentListerExpansion allows custom methods to be added to
|
||||
// EnvironmentLister.
|
||||
type EnvironmentListerExpansion interface{}
|
||||
|
||||
// EnvironmentNamespaceListerExpansion allows custom methods to be added to
|
||||
// EnvironmentNamespaceLister.
|
||||
type EnvironmentNamespaceListerExpansion interface{}
|
||||
|
||||
// FunctionListerExpansion allows custom methods to be added to
|
||||
// FunctionLister.
|
||||
type FunctionListerExpansion interface{}
|
||||
|
||||
// FunctionNamespaceListerExpansion allows custom methods to be added to
|
||||
// FunctionNamespaceLister.
|
||||
type FunctionNamespaceListerExpansion interface{}
|
||||
|
||||
// HTTPTriggerListerExpansion allows custom methods to be added to
|
||||
// HTTPTriggerLister.
|
||||
type HTTPTriggerListerExpansion interface{}
|
||||
|
||||
// HTTPTriggerNamespaceListerExpansion allows custom methods to be added to
|
||||
// HTTPTriggerNamespaceLister.
|
||||
type HTTPTriggerNamespaceListerExpansion interface{}
|
||||
|
||||
// KubernetesWatchTriggerListerExpansion allows custom methods to be added to
|
||||
// KubernetesWatchTriggerLister.
|
||||
type KubernetesWatchTriggerListerExpansion interface{}
|
||||
|
||||
// KubernetesWatchTriggerNamespaceListerExpansion allows custom methods to be added to
|
||||
// KubernetesWatchTriggerNamespaceLister.
|
||||
type KubernetesWatchTriggerNamespaceListerExpansion interface{}
|
||||
|
||||
// MessageQueueTriggerListerExpansion allows custom methods to be added to
|
||||
// MessageQueueTriggerLister.
|
||||
type MessageQueueTriggerListerExpansion interface{}
|
||||
|
||||
// MessageQueueTriggerNamespaceListerExpansion allows custom methods to be added to
|
||||
// MessageQueueTriggerNamespaceLister.
|
||||
type MessageQueueTriggerNamespaceListerExpansion interface{}
|
||||
|
||||
// PackageListerExpansion allows custom methods to be added to
|
||||
// PackageLister.
|
||||
type PackageListerExpansion interface{}
|
||||
|
||||
// PackageNamespaceListerExpansion allows custom methods to be added to
|
||||
// PackageNamespaceLister.
|
||||
type PackageNamespaceListerExpansion interface{}
|
||||
|
||||
// TimeTriggerListerExpansion allows custom methods to be added to
|
||||
// TimeTriggerLister.
|
||||
type TimeTriggerListerExpansion interface{}
|
||||
|
||||
// TimeTriggerNamespaceListerExpansion allows custom methods to be added to
|
||||
// TimeTriggerNamespaceLister.
|
||||
type TimeTriggerNamespaceListerExpansion interface{}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// FunctionLister helps list Functions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type FunctionLister interface {
|
||||
// List lists all Functions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Function, err error)
|
||||
// Functions returns an object that can list and get Functions.
|
||||
Functions(namespace string) FunctionNamespaceLister
|
||||
FunctionListerExpansion
|
||||
}
|
||||
|
||||
// _functionLister implements the FunctionLister interface.
|
||||
type _functionLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewFunctionLister returns a new FunctionLister.
|
||||
func NewFunctionLister(indexer cache.Indexer) FunctionLister {
|
||||
return &_functionLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Functions in the indexer.
|
||||
func (s *_functionLister) List(selector labels.Selector) (ret []*v1.Function, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Function))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Functions returns an object that can list and get Functions.
|
||||
func (s *_functionLister) Functions(namespace string) FunctionNamespaceLister {
|
||||
return _functionNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// FunctionNamespaceLister helps list and get Functions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type FunctionNamespaceLister interface {
|
||||
// List lists all Functions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Function, err error)
|
||||
// Get retrieves the Function from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Function, error)
|
||||
FunctionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _functionNamespaceLister implements the FunctionNamespaceLister
|
||||
// interface.
|
||||
type _functionNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Functions in the indexer for a given namespace.
|
||||
func (s _functionNamespaceLister) List(selector labels.Selector) (ret []*v1.Function, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Function))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Function from the indexer for a given namespace and name.
|
||||
func (s _functionNamespaceLister) Get(name string) (*v1.Function, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("function"), name)
|
||||
}
|
||||
return obj.(*v1.Function), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// HTTPTriggerLister helps list HTTPTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HTTPTriggerLister interface {
|
||||
// List lists all HTTPTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error)
|
||||
// HTTPTriggers returns an object that can list and get HTTPTriggers.
|
||||
HTTPTriggers(namespace string) HTTPTriggerNamespaceLister
|
||||
HTTPTriggerListerExpansion
|
||||
}
|
||||
|
||||
// _hTTPTriggerLister implements the HTTPTriggerLister interface.
|
||||
type _hTTPTriggerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHTTPTriggerLister returns a new HTTPTriggerLister.
|
||||
func NewHTTPTriggerLister(indexer cache.Indexer) HTTPTriggerLister {
|
||||
return &_hTTPTriggerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all HTTPTriggers in the indexer.
|
||||
func (s *_hTTPTriggerLister) List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.HTTPTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// HTTPTriggers returns an object that can list and get HTTPTriggers.
|
||||
func (s *_hTTPTriggerLister) HTTPTriggers(namespace string) HTTPTriggerNamespaceLister {
|
||||
return _hTTPTriggerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// HTTPTriggerNamespaceLister helps list and get HTTPTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HTTPTriggerNamespaceLister interface {
|
||||
// List lists all HTTPTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error)
|
||||
// Get retrieves the HTTPTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.HTTPTrigger, error)
|
||||
HTTPTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _hTTPTriggerNamespaceLister implements the HTTPTriggerNamespaceLister
|
||||
// interface.
|
||||
type _hTTPTriggerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all HTTPTriggers in the indexer for a given namespace.
|
||||
func (s _hTTPTriggerNamespaceLister) List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.HTTPTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the HTTPTrigger from the indexer for a given namespace and name.
|
||||
func (s _hTTPTriggerNamespaceLister) Get(name string) (*v1.HTTPTrigger, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("httptrigger"), name)
|
||||
}
|
||||
return obj.(*v1.HTTPTrigger), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// KubernetesWatchTriggerLister helps list KubernetesWatchTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type KubernetesWatchTriggerLister interface {
|
||||
// List lists all KubernetesWatchTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error)
|
||||
// KubernetesWatchTriggers returns an object that can list and get KubernetesWatchTriggers.
|
||||
KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerNamespaceLister
|
||||
KubernetesWatchTriggerListerExpansion
|
||||
}
|
||||
|
||||
// _kubernetesWatchTriggerLister implements the KubernetesWatchTriggerLister interface.
|
||||
type _kubernetesWatchTriggerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewKubernetesWatchTriggerLister returns a new KubernetesWatchTriggerLister.
|
||||
func NewKubernetesWatchTriggerLister(indexer cache.Indexer) KubernetesWatchTriggerLister {
|
||||
return &_kubernetesWatchTriggerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all KubernetesWatchTriggers in the indexer.
|
||||
func (s *_kubernetesWatchTriggerLister) List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.KubernetesWatchTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggers returns an object that can list and get KubernetesWatchTriggers.
|
||||
func (s *_kubernetesWatchTriggerLister) KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerNamespaceLister {
|
||||
return _kubernetesWatchTriggerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggerNamespaceLister helps list and get KubernetesWatchTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type KubernetesWatchTriggerNamespaceLister interface {
|
||||
// List lists all KubernetesWatchTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error)
|
||||
// Get retrieves the KubernetesWatchTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.KubernetesWatchTrigger, error)
|
||||
KubernetesWatchTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _kubernetesWatchTriggerNamespaceLister implements the KubernetesWatchTriggerNamespaceLister
|
||||
// interface.
|
||||
type _kubernetesWatchTriggerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all KubernetesWatchTriggers in the indexer for a given namespace.
|
||||
func (s _kubernetesWatchTriggerNamespaceLister) List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.KubernetesWatchTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the KubernetesWatchTrigger from the indexer for a given namespace and name.
|
||||
func (s _kubernetesWatchTriggerNamespaceLister) Get(name string) (*v1.KubernetesWatchTrigger, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("kuberneteswatchtrigger"), name)
|
||||
}
|
||||
return obj.(*v1.KubernetesWatchTrigger), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// MessageQueueTriggerLister helps list MessageQueueTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MessageQueueTriggerLister interface {
|
||||
// List lists all MessageQueueTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error)
|
||||
// MessageQueueTriggers returns an object that can list and get MessageQueueTriggers.
|
||||
MessageQueueTriggers(namespace string) MessageQueueTriggerNamespaceLister
|
||||
MessageQueueTriggerListerExpansion
|
||||
}
|
||||
|
||||
// _messageQueueTriggerLister implements the MessageQueueTriggerLister interface.
|
||||
type _messageQueueTriggerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewMessageQueueTriggerLister returns a new MessageQueueTriggerLister.
|
||||
func NewMessageQueueTriggerLister(indexer cache.Indexer) MessageQueueTriggerLister {
|
||||
return &_messageQueueTriggerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all MessageQueueTriggers in the indexer.
|
||||
func (s *_messageQueueTriggerLister) List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.MessageQueueTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// MessageQueueTriggers returns an object that can list and get MessageQueueTriggers.
|
||||
func (s *_messageQueueTriggerLister) MessageQueueTriggers(namespace string) MessageQueueTriggerNamespaceLister {
|
||||
return _messageQueueTriggerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// MessageQueueTriggerNamespaceLister helps list and get MessageQueueTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MessageQueueTriggerNamespaceLister interface {
|
||||
// List lists all MessageQueueTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error)
|
||||
// Get retrieves the MessageQueueTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.MessageQueueTrigger, error)
|
||||
MessageQueueTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _messageQueueTriggerNamespaceLister implements the MessageQueueTriggerNamespaceLister
|
||||
// interface.
|
||||
type _messageQueueTriggerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all MessageQueueTriggers in the indexer for a given namespace.
|
||||
func (s _messageQueueTriggerNamespaceLister) List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.MessageQueueTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the MessageQueueTrigger from the indexer for a given namespace and name.
|
||||
func (s _messageQueueTriggerNamespaceLister) Get(name string) (*v1.MessageQueueTrigger, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("messagequeuetrigger"), name)
|
||||
}
|
||||
return obj.(*v1.MessageQueueTrigger), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PackageLister helps list Packages.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PackageLister interface {
|
||||
// List lists all Packages in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Package, err error)
|
||||
// Packages returns an object that can list and get Packages.
|
||||
Packages(namespace string) PackageNamespaceLister
|
||||
PackageListerExpansion
|
||||
}
|
||||
|
||||
// _packageLister implements the PackageLister interface.
|
||||
type _packageLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewPackageLister returns a new PackageLister.
|
||||
func NewPackageLister(indexer cache.Indexer) PackageLister {
|
||||
return &_packageLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Packages in the indexer.
|
||||
func (s *_packageLister) List(selector labels.Selector) (ret []*v1.Package, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Package))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Packages returns an object that can list and get Packages.
|
||||
func (s *_packageLister) Packages(namespace string) PackageNamespaceLister {
|
||||
return _packageNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// PackageNamespaceLister helps list and get Packages.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PackageNamespaceLister interface {
|
||||
// List lists all Packages in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Package, err error)
|
||||
// Get retrieves the Package from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Package, error)
|
||||
PackageNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _packageNamespaceLister implements the PackageNamespaceLister
|
||||
// interface.
|
||||
type _packageNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Packages in the indexer for a given namespace.
|
||||
func (s _packageNamespaceLister) List(selector labels.Selector) (ret []*v1.Package, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Package))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Package from the indexer for a given namespace and name.
|
||||
func (s _packageNamespaceLister) Get(name string) (*v1.Package, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("package"), name)
|
||||
}
|
||||
return obj.(*v1.Package), nil
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// TimeTriggerLister helps list TimeTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TimeTriggerLister interface {
|
||||
// List lists all TimeTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.TimeTrigger, err error)
|
||||
// TimeTriggers returns an object that can list and get TimeTriggers.
|
||||
TimeTriggers(namespace string) TimeTriggerNamespaceLister
|
||||
TimeTriggerListerExpansion
|
||||
}
|
||||
|
||||
// _timeTriggerLister implements the TimeTriggerLister interface.
|
||||
type _timeTriggerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewTimeTriggerLister returns a new TimeTriggerLister.
|
||||
func NewTimeTriggerLister(indexer cache.Indexer) TimeTriggerLister {
|
||||
return &_timeTriggerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all TimeTriggers in the indexer.
|
||||
func (s *_timeTriggerLister) List(selector labels.Selector) (ret []*v1.TimeTrigger, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.TimeTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// TimeTriggers returns an object that can list and get TimeTriggers.
|
||||
func (s *_timeTriggerLister) TimeTriggers(namespace string) TimeTriggerNamespaceLister {
|
||||
return _timeTriggerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// TimeTriggerNamespaceLister helps list and get TimeTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TimeTriggerNamespaceLister interface {
|
||||
// List lists all TimeTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.TimeTrigger, err error)
|
||||
// Get retrieves the TimeTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.TimeTrigger, error)
|
||||
TimeTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// _timeTriggerNamespaceLister implements the TimeTriggerNamespaceLister
|
||||
// interface.
|
||||
type _timeTriggerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all TimeTriggers in the indexer for a given namespace.
|
||||
func (s _timeTriggerNamespaceLister) List(selector labels.Selector) (ret []*v1.TimeTrigger, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.TimeTrigger))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the TimeTrigger from the indexer for a given namespace and name.
|
||||
func (s _timeTriggerNamespaceLister) Get(name string) (*v1.TimeTrigger, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("timetrigger"), name)
|
||||
}
|
||||
return obj.(*v1.TimeTrigger), nil
|
||||
}
|
||||
Reference in New Issue
Block a user