change notification crd version to v2alpha1

Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
wanjunlei
2021-02-25 14:57:17 +08:00
parent d79104b8a2
commit f4f5f8283e
99 changed files with 1031 additions and 1006 deletions

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// DingTalkConfigInformer provides access to a shared informer and lister for
// DingTalkConfigs.
type DingTalkConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.DingTalkConfigLister
}
type dingTalkConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewDingTalkConfigInformer constructs a new informer for DingTalkConfig 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 NewDingTalkConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredDingTalkConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredDingTalkConfigInformer constructs a new informer for DingTalkConfig 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 NewFilteredDingTalkConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().DingTalkConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().DingTalkConfigs().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.DingTalkConfig{},
resyncPeriod,
indexers,
)
}
func (f *dingTalkConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredDingTalkConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *dingTalkConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.DingTalkConfig{}, f.defaultInformer)
}
func (f *dingTalkConfigInformer) Lister() v2alpha1.DingTalkConfigLister {
return v2alpha1.NewDingTalkConfigLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// DingTalkReceiverInformer provides access to a shared informer and lister for
// DingTalkReceivers.
type DingTalkReceiverInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.DingTalkReceiverLister
}
type dingTalkReceiverInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewDingTalkReceiverInformer constructs a new informer for DingTalkReceiver 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 NewDingTalkReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredDingTalkReceiverInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredDingTalkReceiverInformer constructs a new informer for DingTalkReceiver 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 NewFilteredDingTalkReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().DingTalkReceivers().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().DingTalkReceivers().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.DingTalkReceiver{},
resyncPeriod,
indexers,
)
}
func (f *dingTalkReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredDingTalkReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *dingTalkReceiverInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.DingTalkReceiver{}, f.defaultInformer)
}
func (f *dingTalkReceiverInformer) Lister() v2alpha1.DingTalkReceiverLister {
return v2alpha1.NewDingTalkReceiverLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// EmailConfigInformer provides access to a shared informer and lister for
// EmailConfigs.
type EmailConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.EmailConfigLister
}
type emailConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewEmailConfigInformer constructs a new informer for EmailConfig 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 NewEmailConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredEmailConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredEmailConfigInformer constructs a new informer for EmailConfig 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 NewFilteredEmailConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().EmailConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().EmailConfigs().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.EmailConfig{},
resyncPeriod,
indexers,
)
}
func (f *emailConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredEmailConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *emailConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.EmailConfig{}, f.defaultInformer)
}
func (f *emailConfigInformer) Lister() v2alpha1.EmailConfigLister {
return v2alpha1.NewEmailConfigLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// EmailReceiverInformer provides access to a shared informer and lister for
// EmailReceivers.
type EmailReceiverInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.EmailReceiverLister
}
type emailReceiverInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewEmailReceiverInformer constructs a new informer for EmailReceiver 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 NewEmailReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredEmailReceiverInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredEmailReceiverInformer constructs a new informer for EmailReceiver 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 NewFilteredEmailReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().EmailReceivers().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().EmailReceivers().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.EmailReceiver{},
resyncPeriod,
indexers,
)
}
func (f *emailReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredEmailReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *emailReceiverInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.EmailReceiver{}, f.defaultInformer)
}
func (f *emailReceiverInformer) Lister() v2alpha1.EmailReceiverLister {
return v2alpha1.NewEmailReceiverLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,108 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// DingTalkConfigs returns a DingTalkConfigInformer.
DingTalkConfigs() DingTalkConfigInformer
// DingTalkReceivers returns a DingTalkReceiverInformer.
DingTalkReceivers() DingTalkReceiverInformer
// EmailConfigs returns a EmailConfigInformer.
EmailConfigs() EmailConfigInformer
// EmailReceivers returns a EmailReceiverInformer.
EmailReceivers() EmailReceiverInformer
// SlackConfigs returns a SlackConfigInformer.
SlackConfigs() SlackConfigInformer
// SlackReceivers returns a SlackReceiverInformer.
SlackReceivers() SlackReceiverInformer
// WebhookConfigs returns a WebhookConfigInformer.
WebhookConfigs() WebhookConfigInformer
// WebhookReceivers returns a WebhookReceiverInformer.
WebhookReceivers() WebhookReceiverInformer
// WechatConfigs returns a WechatConfigInformer.
WechatConfigs() WechatConfigInformer
// WechatReceivers returns a WechatReceiverInformer.
WechatReceivers() WechatReceiverInformer
}
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}
}
// DingTalkConfigs returns a DingTalkConfigInformer.
func (v *version) DingTalkConfigs() DingTalkConfigInformer {
return &dingTalkConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// DingTalkReceivers returns a DingTalkReceiverInformer.
func (v *version) DingTalkReceivers() DingTalkReceiverInformer {
return &dingTalkReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// EmailConfigs returns a EmailConfigInformer.
func (v *version) EmailConfigs() EmailConfigInformer {
return &emailConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// EmailReceivers returns a EmailReceiverInformer.
func (v *version) EmailReceivers() EmailReceiverInformer {
return &emailReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// SlackConfigs returns a SlackConfigInformer.
func (v *version) SlackConfigs() SlackConfigInformer {
return &slackConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// SlackReceivers returns a SlackReceiverInformer.
func (v *version) SlackReceivers() SlackReceiverInformer {
return &slackReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// WebhookConfigs returns a WebhookConfigInformer.
func (v *version) WebhookConfigs() WebhookConfigInformer {
return &webhookConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// WebhookReceivers returns a WebhookReceiverInformer.
func (v *version) WebhookReceivers() WebhookReceiverInformer {
return &webhookReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// WechatConfigs returns a WechatConfigInformer.
func (v *version) WechatConfigs() WechatConfigInformer {
return &wechatConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// WechatReceivers returns a WechatReceiverInformer.
func (v *version) WechatReceivers() WechatReceiverInformer {
return &wechatReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// SlackConfigInformer provides access to a shared informer and lister for
// SlackConfigs.
type SlackConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.SlackConfigLister
}
type slackConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewSlackConfigInformer constructs a new informer for SlackConfig 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 NewSlackConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredSlackConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredSlackConfigInformer constructs a new informer for SlackConfig 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 NewFilteredSlackConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().SlackConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().SlackConfigs().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.SlackConfig{},
resyncPeriod,
indexers,
)
}
func (f *slackConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredSlackConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *slackConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.SlackConfig{}, f.defaultInformer)
}
func (f *slackConfigInformer) Lister() v2alpha1.SlackConfigLister {
return v2alpha1.NewSlackConfigLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// SlackReceiverInformer provides access to a shared informer and lister for
// SlackReceivers.
type SlackReceiverInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.SlackReceiverLister
}
type slackReceiverInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewSlackReceiverInformer constructs a new informer for SlackReceiver 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 NewSlackReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredSlackReceiverInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredSlackReceiverInformer constructs a new informer for SlackReceiver 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 NewFilteredSlackReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().SlackReceivers().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().SlackReceivers().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.SlackReceiver{},
resyncPeriod,
indexers,
)
}
func (f *slackReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredSlackReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *slackReceiverInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.SlackReceiver{}, f.defaultInformer)
}
func (f *slackReceiverInformer) Lister() v2alpha1.SlackReceiverLister {
return v2alpha1.NewSlackReceiverLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// WebhookConfigInformer provides access to a shared informer and lister for
// WebhookConfigs.
type WebhookConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.WebhookConfigLister
}
type webhookConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewWebhookConfigInformer constructs a new informer for WebhookConfig 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 NewWebhookConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWebhookConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredWebhookConfigInformer constructs a new informer for WebhookConfig 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 NewFilteredWebhookConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WebhookConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WebhookConfigs().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.WebhookConfig{},
resyncPeriod,
indexers,
)
}
func (f *webhookConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWebhookConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *webhookConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.WebhookConfig{}, f.defaultInformer)
}
func (f *webhookConfigInformer) Lister() v2alpha1.WebhookConfigLister {
return v2alpha1.NewWebhookConfigLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// WebhookReceiverInformer provides access to a shared informer and lister for
// WebhookReceivers.
type WebhookReceiverInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.WebhookReceiverLister
}
type webhookReceiverInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewWebhookReceiverInformer constructs a new informer for WebhookReceiver 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 NewWebhookReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWebhookReceiverInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredWebhookReceiverInformer constructs a new informer for WebhookReceiver 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 NewFilteredWebhookReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WebhookReceivers().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WebhookReceivers().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.WebhookReceiver{},
resyncPeriod,
indexers,
)
}
func (f *webhookReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWebhookReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *webhookReceiverInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.WebhookReceiver{}, f.defaultInformer)
}
func (f *webhookReceiverInformer) Lister() v2alpha1.WebhookReceiverLister {
return v2alpha1.NewWebhookReceiverLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// WechatConfigInformer provides access to a shared informer and lister for
// WechatConfigs.
type WechatConfigInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.WechatConfigLister
}
type wechatConfigInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewWechatConfigInformer constructs a new informer for WechatConfig 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 NewWechatConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWechatConfigInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredWechatConfigInformer constructs a new informer for WechatConfig 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 NewFilteredWechatConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WechatConfigs().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WechatConfigs().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.WechatConfig{},
resyncPeriod,
indexers,
)
}
func (f *wechatConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWechatConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *wechatConfigInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.WechatConfig{}, f.defaultInformer)
}
func (f *wechatConfigInformer) Lister() v2alpha1.WechatConfigLister {
return v2alpha1.NewWechatConfigLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
Copyright 2020 The KubeSphere 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 v2alpha1
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
)
// WechatReceiverInformer provides access to a shared informer and lister for
// WechatReceivers.
type WechatReceiverInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2alpha1.WechatReceiverLister
}
type wechatReceiverInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewWechatReceiverInformer constructs a new informer for WechatReceiver 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 NewWechatReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWechatReceiverInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredWechatReceiverInformer constructs a new informer for WechatReceiver 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 NewFilteredWechatReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WechatReceivers().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NotificationV2alpha1().WechatReceivers().Watch(context.TODO(), options)
},
},
&notificationv2alpha1.WechatReceiver{},
resyncPeriod,
indexers,
)
}
func (f *wechatReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWechatReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *wechatReceiverInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&notificationv2alpha1.WechatReceiver{}, f.defaultInformer)
}
func (f *wechatReceiverInformer) Lister() v2alpha1.WechatReceiverLister {
return v2alpha1.NewWechatReceiverLister(f.Informer().GetIndexer())
}