change notification crd version to v2alpha1
Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: dingtalkconfig
|
singular: dingtalkconfig
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: DingTalkConfig is the Schema for the dingtalkconfigs API
|
description: DingTalkConfig is the Schema for the dingtalkconfigs API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: dingtalkreceiver
|
singular: dingtalkreceiver
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: DingTalkReceiver is the Schema for the dingtalkreceivers API
|
description: DingTalkReceiver is the Schema for the dingtalkreceivers API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: emailconfig
|
singular: emailconfig
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: EmailConfig is the Schema for the emailconfigs API
|
description: EmailConfig is the Schema for the emailconfigs API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: emailreceiver
|
singular: emailreceiver
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: EmailReceiver is the Schema for the emailreceivers API
|
description: EmailReceiver is the Schema for the emailreceivers API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: notificationmanager
|
singular: notificationmanager
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: NotificationManager is the Schema for the notificationmanagers API
|
description: NotificationManager is the Schema for the notificationmanagers API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: slackconfig
|
singular: slackconfig
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: SlackConfig is the Schema for the slackconfigs API
|
description: SlackConfig is the Schema for the slackconfigs API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: slackreceiver
|
singular: slackreceiver
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: SlackReceiver is the Schema for the slackreceivers API
|
description: SlackReceiver is the Schema for the slackreceivers API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: webhookconfig
|
singular: webhookconfig
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: WebhookConfig is the Schema for the webhookconfigs API
|
description: WebhookConfig is the Schema for the webhookconfigs API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: webhookreceiver
|
singular: webhookreceiver
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: WebhookReceiver is the Schema for the webhookreceivers API
|
description: WebhookReceiver is the Schema for the webhookreceivers API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: wechatconfig
|
singular: wechatconfig
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: WechatConfig is the Schema for the wechatconfigs API
|
description: WechatConfig is the Schema for the wechatconfigs API
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
singular: wechatreceiver
|
singular: wechatreceiver
|
||||||
scope: Cluster
|
scope: Cluster
|
||||||
versions:
|
versions:
|
||||||
- name: v2
|
- name: v2alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: WechatReceiver is the Schema for the wechatreceivers API
|
description: WechatReceiver is the Schema for the wechatreceivers API
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ limitations under the License.
|
|||||||
package apis
|
package apis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
AddToSchemes = append(AddToSchemes, v2.SchemeBuilder.AddToScheme)
|
AddToSchemes = append(AddToSchemes, v2alpha1.SchemeBuilder.AddToScheme)
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the notification v2 API group
|
// Package v1alpha1 contains API Schema definitions for the notification v2alpha1 API group
|
||||||
// +groupName=notification.kubesphere.io
|
// +groupName=notification.kubesphere.io
|
||||||
// +genclient
|
// +genclient
|
||||||
// +genclient:nonNamespaced
|
// +genclient:nonNamespaced
|
||||||
package v2
|
package v2alpha1
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
@@ -16,10 +16,10 @@ limitations under the License.
|
|||||||
|
|
||||||
// NOTE: Boilerplate only. Ignore this file.
|
// NOTE: Boilerplate only. Ignore this file.
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the notification v2 API group
|
// Package v1alpha1 contains API Schema definitions for the notification v2alpha1 API group
|
||||||
// +k8s:deepcopy-gen=package,register
|
// +k8s:deepcopy-gen=package,register
|
||||||
// +groupName=notification.kubesphere.io
|
// +groupName=notification.kubesphere.io
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
@@ -28,7 +28,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// SchemeGroupVersion is group version used to register these objects
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
SchemeGroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2"}
|
SchemeGroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2alpha1"}
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ResourcesPluralDingTalkConfig = "dingtalkconfigs"
|
ResourcesPluralDingTalkConfig = "dingtalkconfigs"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by controller-gen. DO NOT EDIT.
|
// Code generated by controller-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -50,7 +50,7 @@ type FederatedDingTalkConfigSpec struct {
|
|||||||
type DingTalkConfigTemplate struct {
|
type DingTalkConfigTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.DingTalkConfigSpec `json:"spec,omitempty"`
|
Spec v2alpha1.DingTalkConfigSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedDingTalkReceiverSpec struct {
|
|||||||
type DingTalkReceiverTemplate struct {
|
type DingTalkReceiverTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.DingTalkReceiverSpec `json:"spec,omitempty"`
|
Spec v2alpha1.DingTalkReceiverSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedEmailConfigSpec struct {
|
|||||||
type EmailConfigTemplate struct {
|
type EmailConfigTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.EmailConfigSpec `json:"spec,omitempty"`
|
Spec v2alpha1.EmailConfigSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedEmailReceiverSpec struct {
|
|||||||
type EmailReceiverTemplate struct {
|
type EmailReceiverTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.EmailReceiverSpec `json:"spec,omitempty"`
|
Spec v2alpha1.EmailReceiverSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedSlackConfigSpec struct {
|
|||||||
type SlackConfigTemplate struct {
|
type SlackConfigTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.SlackConfigSpec `json:"spec,omitempty"`
|
Spec v2alpha1.SlackConfigSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedSlackReceiverSpec struct {
|
|||||||
type SlackReceiverTemplate struct {
|
type SlackReceiverTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.SlackReceiverSpec `json:"spec,omitempty"`
|
Spec v2alpha1.SlackReceiverSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedWebhookConfigSpec struct {
|
|||||||
type WebhookConfigTemplate struct {
|
type WebhookConfigTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.WebhookConfigSpec `json:"spec,omitempty"`
|
Spec v2alpha1.WebhookConfigSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedWebhookReceiverSpec struct {
|
|||||||
type WebhookReceiverTemplate struct {
|
type WebhookReceiverTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.WebhookReceiverSpec `json:"spec,omitempty"`
|
Spec v2alpha1.WebhookReceiverSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedWechatConfigSpec struct {
|
|||||||
type WechatConfigTemplate struct {
|
type WechatConfigTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.WechatConfigSpec `json:"spec,omitempty"`
|
Spec v2alpha1.WechatConfigSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -49,7 +49,7 @@ type FederatedWechatReceiverSpec struct {
|
|||||||
type WechatReceiverTemplate struct {
|
type WechatReceiverTemplate struct {
|
||||||
// +kubebuilder:pruning:PreserveUnknownFields
|
// +kubebuilder:pruning:PreserveUnknownFields
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Spec v2.WechatReceiverSpec `json:"spec,omitempty"`
|
Spec v2alpha1.WechatReceiverSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import (
|
|||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
||||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationcrd "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||||
typesv1beta1 "kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
typesv1beta1 "kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
||||||
audit "kubesphere.io/kubesphere/pkg/apiserver/auditing"
|
audit "kubesphere.io/kubesphere/pkg/apiserver/auditing"
|
||||||
@@ -314,16 +314,16 @@ func (s *APIServer) buildHandlerChain(stopCh <-chan struct{}) {
|
|||||||
tenantv1alpha2.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
tenantv1alpha2.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||||
clusterv1alpha1.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
clusterv1alpha1.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||||
resourcev1alpha3.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
resourcev1alpha3.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||||
v2.Resource(v2.ResourcesPluralDingTalkConfig),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralDingTalkConfig),
|
||||||
v2.Resource(v2.ResourcesPluralDingTalkReceiver),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralDingTalkReceiver),
|
||||||
v2.Resource(v2.ResourcesPluralEmailReceiver),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralEmailReceiver),
|
||||||
v2.Resource(v2.ResourcesPluralEmailConfig),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralEmailConfig),
|
||||||
v2.Resource(v2.ResourcesPluralSlackConfig),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralSlackConfig),
|
||||||
v2.Resource(v2.ResourcesPluralSlackReceiver),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralSlackReceiver),
|
||||||
v2.Resource(v2.ResourcesPluralWebhookConfig),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralWebhookConfig),
|
||||||
v2.Resource(v2.ResourcesPluralWebhookReceiver),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralWebhookReceiver),
|
||||||
v2.Resource(v2.ResourcesPluralWechatConfig),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralWechatConfig),
|
||||||
v2.Resource(v2.ResourcesPluralWechatReceiver),
|
notificationcrd.Resource(notificationcrd.ResourcesPluralWechatReceiver),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -457,16 +457,16 @@ func (s *APIServer) waitForResourceSync(stopCh <-chan struct{}) error {
|
|||||||
{Group: "cluster.kubesphere.io", Version: "v1alpha1", Resource: "clusters"},
|
{Group: "cluster.kubesphere.io", Version: "v1alpha1", Resource: "clusters"},
|
||||||
{Group: "devops.kubesphere.io", Version: "v1alpha3", Resource: "devopsprojects"},
|
{Group: "devops.kubesphere.io", Version: "v1alpha3", Resource: "devopsprojects"},
|
||||||
{Group: "network.kubesphere.io", Version: "v1alpha1", Resource: "ippools"},
|
{Group: "network.kubesphere.io", Version: "v1alpha1", Resource: "ippools"},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralDingTalkConfig},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralDingTalkConfig},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralDingTalkReceiver},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralDingTalkReceiver},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralEmailConfig},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralEmailConfig},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralEmailReceiver},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralEmailReceiver},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralSlackConfig},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralSlackConfig},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralSlackReceiver},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralSlackReceiver},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWebhookConfig},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralWebhookConfig},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWebhookReceiver},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralWebhookReceiver},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWechatConfig},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralWechatConfig},
|
||||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWechatReceiver},
|
{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: notificationcrd.ResourcesPluralWechatReceiver},
|
||||||
}
|
}
|
||||||
|
|
||||||
devopsGVRs := []schema.GroupVersionResource{
|
devopsGVRs := []schema.GroupVersionResource{
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import (
|
|||||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/devops/v1alpha3"
|
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/devops/v1alpha3"
|
||||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2"
|
iamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
|
||||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
||||||
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2alpha1"
|
||||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
||||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1"
|
storagev1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/tenant/v1alpha1"
|
||||||
@@ -49,8 +49,8 @@ type Interface interface {
|
|||||||
DevopsV1alpha3() devopsv1alpha3.DevopsV1alpha3Interface
|
DevopsV1alpha3() devopsv1alpha3.DevopsV1alpha3Interface
|
||||||
IamV1alpha2() iamv1alpha2.IamV1alpha2Interface
|
IamV1alpha2() iamv1alpha2.IamV1alpha2Interface
|
||||||
NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface
|
NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface
|
||||||
NotificationV2() notificationv2.NotificationV2Interface
|
|
||||||
QuotaV1alpha2() quotav1alpha2.QuotaV1alpha2Interface
|
QuotaV1alpha2() quotav1alpha2.QuotaV1alpha2Interface
|
||||||
|
NotificationV2alpha1() notificationv2alpha1.NotificationV2alpha1Interface
|
||||||
ServicemeshV1alpha2() servicemeshv1alpha2.ServicemeshV1alpha2Interface
|
ServicemeshV1alpha2() servicemeshv1alpha2.ServicemeshV1alpha2Interface
|
||||||
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
|
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
|
||||||
TenantV1alpha1() tenantv1alpha1.TenantV1alpha1Interface
|
TenantV1alpha1() tenantv1alpha1.TenantV1alpha1Interface
|
||||||
@@ -69,7 +69,7 @@ type Clientset struct {
|
|||||||
devopsV1alpha3 *devopsv1alpha3.DevopsV1alpha3Client
|
devopsV1alpha3 *devopsv1alpha3.DevopsV1alpha3Client
|
||||||
iamV1alpha2 *iamv1alpha2.IamV1alpha2Client
|
iamV1alpha2 *iamv1alpha2.IamV1alpha2Client
|
||||||
networkV1alpha1 *networkv1alpha1.NetworkV1alpha1Client
|
networkV1alpha1 *networkv1alpha1.NetworkV1alpha1Client
|
||||||
notificationV2 *notificationv2.NotificationV2Client
|
notificationV2alpha1 *notificationv2alpha1.NotificationV2alpha1Client
|
||||||
quotaV1alpha2 *quotav1alpha2.QuotaV1alpha2Client
|
quotaV1alpha2 *quotav1alpha2.QuotaV1alpha2Client
|
||||||
servicemeshV1alpha2 *servicemeshv1alpha2.ServicemeshV1alpha2Client
|
servicemeshV1alpha2 *servicemeshv1alpha2.ServicemeshV1alpha2Client
|
||||||
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
|
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
|
||||||
@@ -113,9 +113,9 @@ func (c *Clientset) NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface {
|
|||||||
return c.networkV1alpha1
|
return c.networkV1alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotificationV2 retrieves the NotificationV2Client
|
// NotificationV2alpha1 retrieves the NotificationV2alpha1Client
|
||||||
func (c *Clientset) NotificationV2() notificationv2.NotificationV2Interface {
|
func (c *Clientset) NotificationV2alpha1() notificationv2alpha1.NotificationV2alpha1Interface {
|
||||||
return c.notificationV2
|
return c.notificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
||||||
@@ -197,7 +197,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.notificationV2, err = notificationv2.NewForConfig(&configShallowCopy)
|
cs.notificationV2alpha1, err = notificationv2alpha1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -244,7 +244,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
cs.devopsV1alpha3 = devopsv1alpha3.NewForConfigOrDie(c)
|
cs.devopsV1alpha3 = devopsv1alpha3.NewForConfigOrDie(c)
|
||||||
cs.iamV1alpha2 = iamv1alpha2.NewForConfigOrDie(c)
|
cs.iamV1alpha2 = iamv1alpha2.NewForConfigOrDie(c)
|
||||||
cs.networkV1alpha1 = networkv1alpha1.NewForConfigOrDie(c)
|
cs.networkV1alpha1 = networkv1alpha1.NewForConfigOrDie(c)
|
||||||
cs.notificationV2 = notificationv2.NewForConfigOrDie(c)
|
cs.notificationV2alpha1 = notificationv2alpha1.NewForConfigOrDie(c)
|
||||||
cs.quotaV1alpha2 = quotav1alpha2.NewForConfigOrDie(c)
|
cs.quotaV1alpha2 = quotav1alpha2.NewForConfigOrDie(c)
|
||||||
cs.servicemeshV1alpha2 = servicemeshv1alpha2.NewForConfigOrDie(c)
|
cs.servicemeshV1alpha2 = servicemeshv1alpha2.NewForConfigOrDie(c)
|
||||||
cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
|
cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
|
||||||
@@ -266,7 +266,7 @@ func New(c rest.Interface) *Clientset {
|
|||||||
cs.devopsV1alpha3 = devopsv1alpha3.New(c)
|
cs.devopsV1alpha3 = devopsv1alpha3.New(c)
|
||||||
cs.iamV1alpha2 = iamv1alpha2.New(c)
|
cs.iamV1alpha2 = iamv1alpha2.New(c)
|
||||||
cs.networkV1alpha1 = networkv1alpha1.New(c)
|
cs.networkV1alpha1 = networkv1alpha1.New(c)
|
||||||
cs.notificationV2 = notificationv2.New(c)
|
cs.notificationV2alpha1 = notificationv2alpha1.New(c)
|
||||||
cs.quotaV1alpha2 = quotav1alpha2.New(c)
|
cs.quotaV1alpha2 = quotav1alpha2.New(c)
|
||||||
cs.servicemeshV1alpha2 = servicemeshv1alpha2.New(c)
|
cs.servicemeshV1alpha2 = servicemeshv1alpha2.New(c)
|
||||||
cs.storageV1alpha1 = storagev1alpha1.New(c)
|
cs.storageV1alpha1 = storagev1alpha1.New(c)
|
||||||
|
|||||||
@@ -39,10 +39,15 @@ import (
|
|||||||
fakeiamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2/fake"
|
fakeiamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2/fake"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
||||||
fakenetworkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1/fake"
|
fakenetworkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1/fake"
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
notificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
||||||
fakenotificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2/fake"
|
fakenotificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2/fake"
|
||||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
||||||
fakequotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2/fake"
|
fakequotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2/fake"
|
||||||
|
=======
|
||||||
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2alpha1"
|
||||||
|
fakenotificationv2alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2alpha1/fake"
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
||||||
fakeservicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2/fake"
|
fakeservicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2/fake"
|
||||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1"
|
storagev1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1"
|
||||||
@@ -137,9 +142,9 @@ func (c *Clientset) NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface {
|
|||||||
return &fakenetworkv1alpha1.FakeNetworkV1alpha1{Fake: &c.Fake}
|
return &fakenetworkv1alpha1.FakeNetworkV1alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotificationV2 retrieves the NotificationV2Client
|
// NotificationV2alpha1 retrieves the NotificationV2alpha1Client
|
||||||
func (c *Clientset) NotificationV2() notificationv2.NotificationV2Interface {
|
func (c *Clientset) NotificationV2alpha1() notificationv2alpha1.NotificationV2alpha1Interface {
|
||||||
return &fakenotificationv2.FakeNotificationV2{Fake: &c.Fake}
|
return &fakenotificationv2alpha1.FakeNotificationV2alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
||||||
|
|||||||
@@ -31,8 +31,12 @@ import (
|
|||||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||||
|
=======
|
||||||
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||||
@@ -51,8 +55,12 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
devopsv1alpha3.AddToScheme,
|
devopsv1alpha3.AddToScheme,
|
||||||
iamv1alpha2.AddToScheme,
|
iamv1alpha2.AddToScheme,
|
||||||
networkv1alpha1.AddToScheme,
|
networkv1alpha1.AddToScheme,
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationv2.AddToScheme,
|
notificationv2.AddToScheme,
|
||||||
quotav1alpha2.AddToScheme,
|
quotav1alpha2.AddToScheme,
|
||||||
|
=======
|
||||||
|
notificationv2alpha1.AddToScheme,
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2.AddToScheme,
|
servicemeshv1alpha2.AddToScheme,
|
||||||
storagev1alpha1.AddToScheme,
|
storagev1alpha1.AddToScheme,
|
||||||
tenantv1alpha1.AddToScheme,
|
tenantv1alpha1.AddToScheme,
|
||||||
|
|||||||
@@ -31,8 +31,12 @@ import (
|
|||||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||||
|
=======
|
||||||
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||||
@@ -51,8 +55,12 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
devopsv1alpha3.AddToScheme,
|
devopsv1alpha3.AddToScheme,
|
||||||
iamv1alpha2.AddToScheme,
|
iamv1alpha2.AddToScheme,
|
||||||
networkv1alpha1.AddToScheme,
|
networkv1alpha1.AddToScheme,
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationv2.AddToScheme,
|
notificationv2.AddToScheme,
|
||||||
quotav1alpha2.AddToScheme,
|
quotav1alpha2.AddToScheme,
|
||||||
|
=======
|
||||||
|
notificationv2alpha1.AddToScheme,
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2.AddToScheme,
|
servicemeshv1alpha2.AddToScheme,
|
||||||
storagev1alpha1.AddToScheme,
|
storagev1alpha1.AddToScheme,
|
||||||
tenantv1alpha1.AddToScheme,
|
tenantv1alpha1.AddToScheme,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type DingTalkConfigsGetter interface {
|
|||||||
|
|
||||||
// DingTalkConfigInterface has methods to work with DingTalkConfig resources.
|
// DingTalkConfigInterface has methods to work with DingTalkConfig resources.
|
||||||
type DingTalkConfigInterface interface {
|
type DingTalkConfigInterface interface {
|
||||||
Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (*v2.DingTalkConfig, error)
|
Create(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.CreateOptions) (*v2alpha1.DingTalkConfig, error)
|
||||||
Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error)
|
Update(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (*v2alpha1.DingTalkConfig, error)
|
||||||
UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error)
|
UpdateStatus(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (*v2alpha1.DingTalkConfig, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.DingTalkConfig, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.DingTalkConfig, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.DingTalkConfigList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.DingTalkConfigList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkConfig, err error)
|
||||||
DingTalkConfigExpansion
|
DingTalkConfigExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type dingTalkConfigs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newDingTalkConfigs returns a DingTalkConfigs
|
// newDingTalkConfigs returns a DingTalkConfigs
|
||||||
func newDingTalkConfigs(c *NotificationV2Client) *dingTalkConfigs {
|
func newDingTalkConfigs(c *NotificationV2alpha1Client) *dingTalkConfigs {
|
||||||
return &dingTalkConfigs{
|
return &dingTalkConfigs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
||||||
func (c *dingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *dingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
result = &v2.DingTalkConfig{}
|
result = &v2alpha1.DingTalkConfig{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *dingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
||||||
func (c *dingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkConfigList, err error) {
|
func (c *dingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.DingTalkConfigList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.DingTalkConfigList{}
|
result = &v2alpha1.DingTalkConfigList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *dingTalkConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||||
func (c *dingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *dingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.CreateOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
result = &v2.DingTalkConfig{}
|
result = &v2alpha1.DingTalkConfig{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *dingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2.DingTal
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||||
func (c *dingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *dingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
result = &v2.DingTalkConfig{}
|
result = &v2alpha1.DingTalkConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
Name(dingTalkConfig.Name).
|
Name(dingTalkConfig.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *dingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2.DingTal
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *dingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *dingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
result = &v2.DingTalkConfig{}
|
result = &v2alpha1.DingTalkConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
Name(dingTalkConfig.Name).
|
Name(dingTalkConfig.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *dingTalkConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched dingTalkConfig.
|
// Patch applies the patch and returns the patched dingTalkConfig.
|
||||||
func (c *dingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error) {
|
func (c *dingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
result = &v2.DingTalkConfig{}
|
result = &v2alpha1.DingTalkConfig{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("dingtalkconfigs").
|
Resource("dingtalkconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type DingTalkReceiversGetter interface {
|
|||||||
|
|
||||||
// DingTalkReceiverInterface has methods to work with DingTalkReceiver resources.
|
// DingTalkReceiverInterface has methods to work with DingTalkReceiver resources.
|
||||||
type DingTalkReceiverInterface interface {
|
type DingTalkReceiverInterface interface {
|
||||||
Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (*v2.DingTalkReceiver, error)
|
Create(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.CreateOptions) (*v2alpha1.DingTalkReceiver, error)
|
||||||
Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error)
|
Update(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (*v2alpha1.DingTalkReceiver, error)
|
||||||
UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error)
|
UpdateStatus(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (*v2alpha1.DingTalkReceiver, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.DingTalkReceiver, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.DingTalkReceiver, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.DingTalkReceiverList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.DingTalkReceiverList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkReceiver, err error)
|
||||||
DingTalkReceiverExpansion
|
DingTalkReceiverExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type dingTalkReceivers struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newDingTalkReceivers returns a DingTalkReceivers
|
// newDingTalkReceivers returns a DingTalkReceivers
|
||||||
func newDingTalkReceivers(c *NotificationV2Client) *dingTalkReceivers {
|
func newDingTalkReceivers(c *NotificationV2alpha1Client) *dingTalkReceivers {
|
||||||
return &dingTalkReceivers{
|
return &dingTalkReceivers{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
||||||
func (c *dingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *dingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
result = &v2.DingTalkReceiver{}
|
result = &v2alpha1.DingTalkReceiver{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *dingTalkReceivers) Get(ctx context.Context, name string, options v1.Get
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
||||||
func (c *dingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkReceiverList, err error) {
|
func (c *dingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.DingTalkReceiverList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.DingTalkReceiverList{}
|
result = &v2alpha1.DingTalkReceiverList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *dingTalkReceivers) Watch(ctx context.Context, opts v1.ListOptions) (wat
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||||
func (c *dingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *dingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.CreateOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
result = &v2.DingTalkReceiver{}
|
result = &v2alpha1.DingTalkReceiver{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *dingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2.Din
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||||
func (c *dingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *dingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
result = &v2.DingTalkReceiver{}
|
result = &v2alpha1.DingTalkReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
Name(dingTalkReceiver.Name).
|
Name(dingTalkReceiver.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *dingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2.Din
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *dingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *dingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
result = &v2.DingTalkReceiver{}
|
result = &v2alpha1.DingTalkReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
Name(dingTalkReceiver.Name).
|
Name(dingTalkReceiver.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *dingTalkReceivers) DeleteCollection(ctx context.Context, opts v1.Delete
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched dingTalkReceiver.
|
// Patch applies the patch and returns the patched dingTalkReceiver.
|
||||||
func (c *dingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error) {
|
func (c *dingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
result = &v2.DingTalkReceiver{}
|
result = &v2alpha1.DingTalkReceiver{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("dingtalkreceivers").
|
Resource("dingtalkreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -17,4 +17,4 @@ limitations under the License.
|
|||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v2
|
package v2alpha1
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type EmailConfigsGetter interface {
|
|||||||
|
|
||||||
// EmailConfigInterface has methods to work with EmailConfig resources.
|
// EmailConfigInterface has methods to work with EmailConfig resources.
|
||||||
type EmailConfigInterface interface {
|
type EmailConfigInterface interface {
|
||||||
Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (*v2.EmailConfig, error)
|
Create(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.CreateOptions) (*v2alpha1.EmailConfig, error)
|
||||||
Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error)
|
Update(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (*v2alpha1.EmailConfig, error)
|
||||||
UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error)
|
UpdateStatus(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (*v2alpha1.EmailConfig, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.EmailConfig, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.EmailConfig, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.EmailConfigList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.EmailConfigList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailConfig, err error)
|
||||||
EmailConfigExpansion
|
EmailConfigExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type emailConfigs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newEmailConfigs returns a EmailConfigs
|
// newEmailConfigs returns a EmailConfigs
|
||||||
func newEmailConfigs(c *NotificationV2Client) *emailConfigs {
|
func newEmailConfigs(c *NotificationV2alpha1Client) *emailConfigs {
|
||||||
return &emailConfigs{
|
return &emailConfigs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
||||||
func (c *emailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailConfig, err error) {
|
func (c *emailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
result = &v2.EmailConfig{}
|
result = &v2alpha1.EmailConfig{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *emailConfigs) Get(ctx context.Context, name string, options v1.GetOptio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
||||||
func (c *emailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailConfigList, err error) {
|
func (c *emailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.EmailConfigList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.EmailConfigList{}
|
result = &v2alpha1.EmailConfigList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *emailConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.In
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||||
func (c *emailConfigs) Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (result *v2.EmailConfig, err error) {
|
func (c *emailConfigs) Create(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.CreateOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
result = &v2.EmailConfig{}
|
result = &v2alpha1.EmailConfig{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *emailConfigs) Create(ctx context.Context, emailConfig *v2.EmailConfig,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||||
func (c *emailConfigs) Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
func (c *emailConfigs) Update(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
result = &v2.EmailConfig{}
|
result = &v2alpha1.EmailConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
Name(emailConfig.Name).
|
Name(emailConfig.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *emailConfigs) Update(ctx context.Context, emailConfig *v2.EmailConfig,
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *emailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
func (c *emailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
result = &v2.EmailConfig{}
|
result = &v2alpha1.EmailConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
Name(emailConfig.Name).
|
Name(emailConfig.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *emailConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched emailConfig.
|
// Patch applies the patch and returns the patched emailConfig.
|
||||||
func (c *emailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error) {
|
func (c *emailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailConfig, err error) {
|
||||||
result = &v2.EmailConfig{}
|
result = &v2alpha1.EmailConfig{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("emailconfigs").
|
Resource("emailconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type EmailReceiversGetter interface {
|
|||||||
|
|
||||||
// EmailReceiverInterface has methods to work with EmailReceiver resources.
|
// EmailReceiverInterface has methods to work with EmailReceiver resources.
|
||||||
type EmailReceiverInterface interface {
|
type EmailReceiverInterface interface {
|
||||||
Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (*v2.EmailReceiver, error)
|
Create(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.CreateOptions) (*v2alpha1.EmailReceiver, error)
|
||||||
Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error)
|
Update(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (*v2alpha1.EmailReceiver, error)
|
||||||
UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error)
|
UpdateStatus(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (*v2alpha1.EmailReceiver, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.EmailReceiver, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.EmailReceiver, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.EmailReceiverList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.EmailReceiverList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailReceiver, err error)
|
||||||
EmailReceiverExpansion
|
EmailReceiverExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type emailReceivers struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newEmailReceivers returns a EmailReceivers
|
// newEmailReceivers returns a EmailReceivers
|
||||||
func newEmailReceivers(c *NotificationV2Client) *emailReceivers {
|
func newEmailReceivers(c *NotificationV2alpha1Client) *emailReceivers {
|
||||||
return &emailReceivers{
|
return &emailReceivers{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
||||||
func (c *emailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailReceiver, err error) {
|
func (c *emailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
result = &v2.EmailReceiver{}
|
result = &v2alpha1.EmailReceiver{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *emailReceivers) Get(ctx context.Context, name string, options v1.GetOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
||||||
func (c *emailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailReceiverList, err error) {
|
func (c *emailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.EmailReceiverList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.EmailReceiverList{}
|
result = &v2alpha1.EmailReceiverList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *emailReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||||
func (c *emailReceivers) Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (result *v2.EmailReceiver, err error) {
|
func (c *emailReceivers) Create(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.CreateOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
result = &v2.EmailReceiver{}
|
result = &v2alpha1.EmailReceiver{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *emailReceivers) Create(ctx context.Context, emailReceiver *v2.EmailRece
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||||
func (c *emailReceivers) Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
func (c *emailReceivers) Update(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
result = &v2.EmailReceiver{}
|
result = &v2alpha1.EmailReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
Name(emailReceiver.Name).
|
Name(emailReceiver.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *emailReceivers) Update(ctx context.Context, emailReceiver *v2.EmailRece
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *emailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
func (c *emailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
result = &v2.EmailReceiver{}
|
result = &v2alpha1.EmailReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
Name(emailReceiver.Name).
|
Name(emailReceiver.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *emailReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched emailReceiver.
|
// Patch applies the patch and returns the patched emailReceiver.
|
||||||
func (c *emailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error) {
|
func (c *emailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
result = &v2.EmailReceiver{}
|
result = &v2alpha1.EmailReceiver{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("emailreceivers").
|
Resource("emailreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeDingTalkConfigs implements DingTalkConfigInterface
|
// FakeDingTalkConfigs implements DingTalkConfigInterface
|
||||||
type FakeDingTalkConfigs struct {
|
type FakeDingTalkConfigs struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var dingtalkconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "dingtalkconfigs"}
|
var dingtalkconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "dingtalkconfigs"}
|
||||||
|
|
||||||
var dingtalkconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "DingTalkConfig"}
|
var dingtalkconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "DingTalkConfig"}
|
||||||
|
|
||||||
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
||||||
func (c *FakeDingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *FakeDingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(dingtalkconfigsResource, name), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootGetAction(dingtalkconfigsResource, name), &v2alpha1.DingTalkConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), err
|
return obj.(*v2alpha1.DingTalkConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
||||||
func (c *FakeDingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkConfigList, err error) {
|
func (c *FakeDingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.DingTalkConfigList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(dingtalkconfigsResource, dingtalkconfigsKind, opts), &v2.DingTalkConfigList{})
|
Invokes(testing.NewRootListAction(dingtalkconfigsResource, dingtalkconfigsKind, opts), &v2alpha1.DingTalkConfigList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeDingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (re
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.DingTalkConfigList{ListMeta: obj.(*v2.DingTalkConfigList).ListMeta}
|
list := &v2alpha1.DingTalkConfigList{ListMeta: obj.(*v2alpha1.DingTalkConfigList).ListMeta}
|
||||||
for _, item := range obj.(*v2.DingTalkConfigList).Items {
|
for _, item := range obj.(*v2alpha1.DingTalkConfigList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeDingTalkConfigs) Watch(ctx context.Context, opts v1.ListOptions) (w
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||||
func (c *FakeDingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *FakeDingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.CreateOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(dingtalkconfigsResource, dingTalkConfig), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootCreateAction(dingtalkconfigsResource, dingTalkConfig), &v2alpha1.DingTalkConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), err
|
return obj.(*v2alpha1.DingTalkConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||||
func (c *FakeDingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
func (c *FakeDingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(dingtalkconfigsResource, dingTalkConfig), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootUpdateAction(dingtalkconfigsResource, dingTalkConfig), &v2alpha1.DingTalkConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), err
|
return obj.(*v2alpha1.DingTalkConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeDingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error) {
|
func (c *FakeDingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2alpha1.DingTalkConfig, opts v1.UpdateOptions) (*v2alpha1.DingTalkConfig, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkconfigsResource, "status", dingTalkConfig), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkconfigsResource, "status", dingTalkConfig), &v2alpha1.DingTalkConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), err
|
return obj.(*v2alpha1.DingTalkConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the dingTalkConfig and deletes it. Returns an error if one occurs.
|
// Delete takes name of the dingTalkConfig and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeDingTalkConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeDingTalkConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(dingtalkconfigsResource, name), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootDeleteAction(dingtalkconfigsResource, name), &v2alpha1.DingTalkConfig{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeDingTalkConfigs) Delete(ctx context.Context, name string, opts v1.D
|
|||||||
func (c *FakeDingTalkConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeDingTalkConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(dingtalkconfigsResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(dingtalkconfigsResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.DingTalkConfigList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.DingTalkConfigList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched dingTalkConfig.
|
// Patch applies the patch and returns the patched dingTalkConfig.
|
||||||
func (c *FakeDingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error) {
|
func (c *FakeDingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(dingtalkconfigsResource, name, pt, data, subresources...), &v2.DingTalkConfig{})
|
Invokes(testing.NewRootPatchSubresourceAction(dingtalkconfigsResource, name, pt, data, subresources...), &v2alpha1.DingTalkConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), err
|
return obj.(*v2alpha1.DingTalkConfig), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeDingTalkReceivers implements DingTalkReceiverInterface
|
// FakeDingTalkReceivers implements DingTalkReceiverInterface
|
||||||
type FakeDingTalkReceivers struct {
|
type FakeDingTalkReceivers struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var dingtalkreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "dingtalkreceivers"}
|
var dingtalkreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "dingtalkreceivers"}
|
||||||
|
|
||||||
var dingtalkreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "DingTalkReceiver"}
|
var dingtalkreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "DingTalkReceiver"}
|
||||||
|
|
||||||
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
||||||
func (c *FakeDingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *FakeDingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(dingtalkreceiversResource, name), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootGetAction(dingtalkreceiversResource, name), &v2alpha1.DingTalkReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), err
|
return obj.(*v2alpha1.DingTalkReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
||||||
func (c *FakeDingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkReceiverList, err error) {
|
func (c *FakeDingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.DingTalkReceiverList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(dingtalkreceiversResource, dingtalkreceiversKind, opts), &v2.DingTalkReceiverList{})
|
Invokes(testing.NewRootListAction(dingtalkreceiversResource, dingtalkreceiversKind, opts), &v2alpha1.DingTalkReceiverList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeDingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.DingTalkReceiverList{ListMeta: obj.(*v2.DingTalkReceiverList).ListMeta}
|
list := &v2alpha1.DingTalkReceiverList{ListMeta: obj.(*v2alpha1.DingTalkReceiverList).ListMeta}
|
||||||
for _, item := range obj.(*v2.DingTalkReceiverList).Items {
|
for _, item := range obj.(*v2alpha1.DingTalkReceiverList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeDingTalkReceivers) Watch(ctx context.Context, opts v1.ListOptions)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||||
func (c *FakeDingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *FakeDingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.CreateOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(dingtalkreceiversResource, dingTalkReceiver), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootCreateAction(dingtalkreceiversResource, dingTalkReceiver), &v2alpha1.DingTalkReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), err
|
return obj.(*v2alpha1.DingTalkReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||||
func (c *FakeDingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
func (c *FakeDingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(dingtalkreceiversResource, dingTalkReceiver), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootUpdateAction(dingtalkreceiversResource, dingTalkReceiver), &v2alpha1.DingTalkReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), err
|
return obj.(*v2alpha1.DingTalkReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeDingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error) {
|
func (c *FakeDingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2alpha1.DingTalkReceiver, opts v1.UpdateOptions) (*v2alpha1.DingTalkReceiver, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkreceiversResource, "status", dingTalkReceiver), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkreceiversResource, "status", dingTalkReceiver), &v2alpha1.DingTalkReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), err
|
return obj.(*v2alpha1.DingTalkReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the dingTalkReceiver and deletes it. Returns an error if one occurs.
|
// Delete takes name of the dingTalkReceiver and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeDingTalkReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeDingTalkReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(dingtalkreceiversResource, name), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootDeleteAction(dingtalkreceiversResource, name), &v2alpha1.DingTalkReceiver{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeDingTalkReceivers) Delete(ctx context.Context, name string, opts v1
|
|||||||
func (c *FakeDingTalkReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeDingTalkReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(dingtalkreceiversResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(dingtalkreceiversResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.DingTalkReceiverList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.DingTalkReceiverList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched dingTalkReceiver.
|
// Patch applies the patch and returns the patched dingTalkReceiver.
|
||||||
func (c *FakeDingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error) {
|
func (c *FakeDingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.DingTalkReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(dingtalkreceiversResource, name, pt, data, subresources...), &v2.DingTalkReceiver{})
|
Invokes(testing.NewRootPatchSubresourceAction(dingtalkreceiversResource, name, pt, data, subresources...), &v2alpha1.DingTalkReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), err
|
return obj.(*v2alpha1.DingTalkReceiver), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeEmailConfigs implements EmailConfigInterface
|
// FakeEmailConfigs implements EmailConfigInterface
|
||||||
type FakeEmailConfigs struct {
|
type FakeEmailConfigs struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var emailconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "emailconfigs"}
|
var emailconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "emailconfigs"}
|
||||||
|
|
||||||
var emailconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "EmailConfig"}
|
var emailconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "EmailConfig"}
|
||||||
|
|
||||||
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
||||||
func (c *FakeEmailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailConfig, err error) {
|
func (c *FakeEmailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(emailconfigsResource, name), &v2.EmailConfig{})
|
Invokes(testing.NewRootGetAction(emailconfigsResource, name), &v2alpha1.EmailConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), err
|
return obj.(*v2alpha1.EmailConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
||||||
func (c *FakeEmailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailConfigList, err error) {
|
func (c *FakeEmailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.EmailConfigList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(emailconfigsResource, emailconfigsKind, opts), &v2.EmailConfigList{})
|
Invokes(testing.NewRootListAction(emailconfigsResource, emailconfigsKind, opts), &v2alpha1.EmailConfigList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeEmailConfigs) List(ctx context.Context, opts v1.ListOptions) (resul
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.EmailConfigList{ListMeta: obj.(*v2.EmailConfigList).ListMeta}
|
list := &v2alpha1.EmailConfigList{ListMeta: obj.(*v2alpha1.EmailConfigList).ListMeta}
|
||||||
for _, item := range obj.(*v2.EmailConfigList).Items {
|
for _, item := range obj.(*v2alpha1.EmailConfigList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeEmailConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||||
func (c *FakeEmailConfigs) Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (result *v2.EmailConfig, err error) {
|
func (c *FakeEmailConfigs) Create(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.CreateOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(emailconfigsResource, emailConfig), &v2.EmailConfig{})
|
Invokes(testing.NewRootCreateAction(emailconfigsResource, emailConfig), &v2alpha1.EmailConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), err
|
return obj.(*v2alpha1.EmailConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||||
func (c *FakeEmailConfigs) Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
func (c *FakeEmailConfigs) Update(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (result *v2alpha1.EmailConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(emailconfigsResource, emailConfig), &v2.EmailConfig{})
|
Invokes(testing.NewRootUpdateAction(emailconfigsResource, emailConfig), &v2alpha1.EmailConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), err
|
return obj.(*v2alpha1.EmailConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeEmailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error) {
|
func (c *FakeEmailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2alpha1.EmailConfig, opts v1.UpdateOptions) (*v2alpha1.EmailConfig, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(emailconfigsResource, "status", emailConfig), &v2.EmailConfig{})
|
Invokes(testing.NewRootUpdateSubresourceAction(emailconfigsResource, "status", emailConfig), &v2alpha1.EmailConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), err
|
return obj.(*v2alpha1.EmailConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the emailConfig and deletes it. Returns an error if one occurs.
|
// Delete takes name of the emailConfig and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeEmailConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeEmailConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(emailconfigsResource, name), &v2.EmailConfig{})
|
Invokes(testing.NewRootDeleteAction(emailconfigsResource, name), &v2alpha1.EmailConfig{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeEmailConfigs) Delete(ctx context.Context, name string, opts v1.Dele
|
|||||||
func (c *FakeEmailConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeEmailConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(emailconfigsResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(emailconfigsResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.EmailConfigList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.EmailConfigList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched emailConfig.
|
// Patch applies the patch and returns the patched emailConfig.
|
||||||
func (c *FakeEmailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error) {
|
func (c *FakeEmailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(emailconfigsResource, name, pt, data, subresources...), &v2.EmailConfig{})
|
Invokes(testing.NewRootPatchSubresourceAction(emailconfigsResource, name, pt, data, subresources...), &v2alpha1.EmailConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), err
|
return obj.(*v2alpha1.EmailConfig), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeEmailReceivers implements EmailReceiverInterface
|
// FakeEmailReceivers implements EmailReceiverInterface
|
||||||
type FakeEmailReceivers struct {
|
type FakeEmailReceivers struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var emailreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "emailreceivers"}
|
var emailreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "emailreceivers"}
|
||||||
|
|
||||||
var emailreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "EmailReceiver"}
|
var emailreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "EmailReceiver"}
|
||||||
|
|
||||||
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
||||||
func (c *FakeEmailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailReceiver, err error) {
|
func (c *FakeEmailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(emailreceiversResource, name), &v2.EmailReceiver{})
|
Invokes(testing.NewRootGetAction(emailreceiversResource, name), &v2alpha1.EmailReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), err
|
return obj.(*v2alpha1.EmailReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
||||||
func (c *FakeEmailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailReceiverList, err error) {
|
func (c *FakeEmailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.EmailReceiverList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(emailreceiversResource, emailreceiversKind, opts), &v2.EmailReceiverList{})
|
Invokes(testing.NewRootListAction(emailreceiversResource, emailreceiversKind, opts), &v2alpha1.EmailReceiverList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeEmailReceivers) List(ctx context.Context, opts v1.ListOptions) (res
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.EmailReceiverList{ListMeta: obj.(*v2.EmailReceiverList).ListMeta}
|
list := &v2alpha1.EmailReceiverList{ListMeta: obj.(*v2alpha1.EmailReceiverList).ListMeta}
|
||||||
for _, item := range obj.(*v2.EmailReceiverList).Items {
|
for _, item := range obj.(*v2alpha1.EmailReceiverList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeEmailReceivers) Watch(ctx context.Context, opts v1.ListOptions) (wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||||
func (c *FakeEmailReceivers) Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (result *v2.EmailReceiver, err error) {
|
func (c *FakeEmailReceivers) Create(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.CreateOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(emailreceiversResource, emailReceiver), &v2.EmailReceiver{})
|
Invokes(testing.NewRootCreateAction(emailreceiversResource, emailReceiver), &v2alpha1.EmailReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), err
|
return obj.(*v2alpha1.EmailReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||||
func (c *FakeEmailReceivers) Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
func (c *FakeEmailReceivers) Update(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(emailreceiversResource, emailReceiver), &v2.EmailReceiver{})
|
Invokes(testing.NewRootUpdateAction(emailreceiversResource, emailReceiver), &v2alpha1.EmailReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), err
|
return obj.(*v2alpha1.EmailReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeEmailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error) {
|
func (c *FakeEmailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2alpha1.EmailReceiver, opts v1.UpdateOptions) (*v2alpha1.EmailReceiver, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(emailreceiversResource, "status", emailReceiver), &v2.EmailReceiver{})
|
Invokes(testing.NewRootUpdateSubresourceAction(emailreceiversResource, "status", emailReceiver), &v2alpha1.EmailReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), err
|
return obj.(*v2alpha1.EmailReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the emailReceiver and deletes it. Returns an error if one occurs.
|
// Delete takes name of the emailReceiver and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeEmailReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeEmailReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(emailreceiversResource, name), &v2.EmailReceiver{})
|
Invokes(testing.NewRootDeleteAction(emailreceiversResource, name), &v2alpha1.EmailReceiver{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeEmailReceivers) Delete(ctx context.Context, name string, opts v1.De
|
|||||||
func (c *FakeEmailReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeEmailReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(emailreceiversResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(emailreceiversResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.EmailReceiverList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.EmailReceiverList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched emailReceiver.
|
// Patch applies the patch and returns the patched emailReceiver.
|
||||||
func (c *FakeEmailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error) {
|
func (c *FakeEmailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.EmailReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(emailreceiversResource, name, pt, data, subresources...), &v2.EmailReceiver{})
|
Invokes(testing.NewRootPatchSubresourceAction(emailreceiversResource, name, pt, data, subresources...), &v2alpha1.EmailReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), err
|
return obj.(*v2alpha1.EmailReceiver), err
|
||||||
}
|
}
|
||||||
@@ -21,56 +21,56 @@ package fake
|
|||||||
import (
|
import (
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FakeNotificationV2 struct {
|
type FakeNotificationV2alpha1 struct {
|
||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) DingTalkConfigs() v2.DingTalkConfigInterface {
|
func (c *FakeNotificationV2alpha1) DingTalkConfigs() v2alpha1.DingTalkConfigInterface {
|
||||||
return &FakeDingTalkConfigs{c}
|
return &FakeDingTalkConfigs{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) DingTalkReceivers() v2.DingTalkReceiverInterface {
|
func (c *FakeNotificationV2alpha1) DingTalkReceivers() v2alpha1.DingTalkReceiverInterface {
|
||||||
return &FakeDingTalkReceivers{c}
|
return &FakeDingTalkReceivers{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) EmailConfigs() v2.EmailConfigInterface {
|
func (c *FakeNotificationV2alpha1) EmailConfigs() v2alpha1.EmailConfigInterface {
|
||||||
return &FakeEmailConfigs{c}
|
return &FakeEmailConfigs{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) EmailReceivers() v2.EmailReceiverInterface {
|
func (c *FakeNotificationV2alpha1) EmailReceivers() v2alpha1.EmailReceiverInterface {
|
||||||
return &FakeEmailReceivers{c}
|
return &FakeEmailReceivers{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) SlackConfigs() v2.SlackConfigInterface {
|
func (c *FakeNotificationV2alpha1) SlackConfigs() v2alpha1.SlackConfigInterface {
|
||||||
return &FakeSlackConfigs{c}
|
return &FakeSlackConfigs{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) SlackReceivers() v2.SlackReceiverInterface {
|
func (c *FakeNotificationV2alpha1) SlackReceivers() v2alpha1.SlackReceiverInterface {
|
||||||
return &FakeSlackReceivers{c}
|
return &FakeSlackReceivers{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) WebhookConfigs() v2.WebhookConfigInterface {
|
func (c *FakeNotificationV2alpha1) WebhookConfigs() v2alpha1.WebhookConfigInterface {
|
||||||
return &FakeWebhookConfigs{c}
|
return &FakeWebhookConfigs{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) WebhookReceivers() v2.WebhookReceiverInterface {
|
func (c *FakeNotificationV2alpha1) WebhookReceivers() v2alpha1.WebhookReceiverInterface {
|
||||||
return &FakeWebhookReceivers{c}
|
return &FakeWebhookReceivers{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) WechatConfigs() v2.WechatConfigInterface {
|
func (c *FakeNotificationV2alpha1) WechatConfigs() v2alpha1.WechatConfigInterface {
|
||||||
return &FakeWechatConfigs{c}
|
return &FakeWechatConfigs{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeNotificationV2) WechatReceivers() v2.WechatReceiverInterface {
|
func (c *FakeNotificationV2alpha1) WechatReceivers() v2alpha1.WechatReceiverInterface {
|
||||||
return &FakeWechatReceivers{c}
|
return &FakeWechatReceivers{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeNotificationV2) RESTClient() rest.Interface {
|
func (c *FakeNotificationV2alpha1) RESTClient() rest.Interface {
|
||||||
var ret *rest.RESTClient
|
var ret *rest.RESTClient
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeSlackConfigs implements SlackConfigInterface
|
// FakeSlackConfigs implements SlackConfigInterface
|
||||||
type FakeSlackConfigs struct {
|
type FakeSlackConfigs struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var slackconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "slackconfigs"}
|
var slackconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "slackconfigs"}
|
||||||
|
|
||||||
var slackconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "SlackConfig"}
|
var slackconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "SlackConfig"}
|
||||||
|
|
||||||
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
||||||
func (c *FakeSlackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackConfig, err error) {
|
func (c *FakeSlackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(slackconfigsResource, name), &v2.SlackConfig{})
|
Invokes(testing.NewRootGetAction(slackconfigsResource, name), &v2alpha1.SlackConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), err
|
return obj.(*v2alpha1.SlackConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
||||||
func (c *FakeSlackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackConfigList, err error) {
|
func (c *FakeSlackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.SlackConfigList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(slackconfigsResource, slackconfigsKind, opts), &v2.SlackConfigList{})
|
Invokes(testing.NewRootListAction(slackconfigsResource, slackconfigsKind, opts), &v2alpha1.SlackConfigList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeSlackConfigs) List(ctx context.Context, opts v1.ListOptions) (resul
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.SlackConfigList{ListMeta: obj.(*v2.SlackConfigList).ListMeta}
|
list := &v2alpha1.SlackConfigList{ListMeta: obj.(*v2alpha1.SlackConfigList).ListMeta}
|
||||||
for _, item := range obj.(*v2.SlackConfigList).Items {
|
for _, item := range obj.(*v2alpha1.SlackConfigList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeSlackConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||||
func (c *FakeSlackConfigs) Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (result *v2.SlackConfig, err error) {
|
func (c *FakeSlackConfigs) Create(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.CreateOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(slackconfigsResource, slackConfig), &v2.SlackConfig{})
|
Invokes(testing.NewRootCreateAction(slackconfigsResource, slackConfig), &v2alpha1.SlackConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), err
|
return obj.(*v2alpha1.SlackConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||||
func (c *FakeSlackConfigs) Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
func (c *FakeSlackConfigs) Update(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(slackconfigsResource, slackConfig), &v2.SlackConfig{})
|
Invokes(testing.NewRootUpdateAction(slackconfigsResource, slackConfig), &v2alpha1.SlackConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), err
|
return obj.(*v2alpha1.SlackConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeSlackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error) {
|
func (c *FakeSlackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (*v2alpha1.SlackConfig, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(slackconfigsResource, "status", slackConfig), &v2.SlackConfig{})
|
Invokes(testing.NewRootUpdateSubresourceAction(slackconfigsResource, "status", slackConfig), &v2alpha1.SlackConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), err
|
return obj.(*v2alpha1.SlackConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the slackConfig and deletes it. Returns an error if one occurs.
|
// Delete takes name of the slackConfig and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeSlackConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeSlackConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(slackconfigsResource, name), &v2.SlackConfig{})
|
Invokes(testing.NewRootDeleteAction(slackconfigsResource, name), &v2alpha1.SlackConfig{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeSlackConfigs) Delete(ctx context.Context, name string, opts v1.Dele
|
|||||||
func (c *FakeSlackConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeSlackConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(slackconfigsResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(slackconfigsResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.SlackConfigList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.SlackConfigList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched slackConfig.
|
// Patch applies the patch and returns the patched slackConfig.
|
||||||
func (c *FakeSlackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error) {
|
func (c *FakeSlackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(slackconfigsResource, name, pt, data, subresources...), &v2.SlackConfig{})
|
Invokes(testing.NewRootPatchSubresourceAction(slackconfigsResource, name, pt, data, subresources...), &v2alpha1.SlackConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), err
|
return obj.(*v2alpha1.SlackConfig), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeSlackReceivers implements SlackReceiverInterface
|
// FakeSlackReceivers implements SlackReceiverInterface
|
||||||
type FakeSlackReceivers struct {
|
type FakeSlackReceivers struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var slackreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "slackreceivers"}
|
var slackreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "slackreceivers"}
|
||||||
|
|
||||||
var slackreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "SlackReceiver"}
|
var slackreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "SlackReceiver"}
|
||||||
|
|
||||||
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
||||||
func (c *FakeSlackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackReceiver, err error) {
|
func (c *FakeSlackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(slackreceiversResource, name), &v2.SlackReceiver{})
|
Invokes(testing.NewRootGetAction(slackreceiversResource, name), &v2alpha1.SlackReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), err
|
return obj.(*v2alpha1.SlackReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
||||||
func (c *FakeSlackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackReceiverList, err error) {
|
func (c *FakeSlackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.SlackReceiverList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(slackreceiversResource, slackreceiversKind, opts), &v2.SlackReceiverList{})
|
Invokes(testing.NewRootListAction(slackreceiversResource, slackreceiversKind, opts), &v2alpha1.SlackReceiverList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeSlackReceivers) List(ctx context.Context, opts v1.ListOptions) (res
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.SlackReceiverList{ListMeta: obj.(*v2.SlackReceiverList).ListMeta}
|
list := &v2alpha1.SlackReceiverList{ListMeta: obj.(*v2alpha1.SlackReceiverList).ListMeta}
|
||||||
for _, item := range obj.(*v2.SlackReceiverList).Items {
|
for _, item := range obj.(*v2alpha1.SlackReceiverList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeSlackReceivers) Watch(ctx context.Context, opts v1.ListOptions) (wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||||
func (c *FakeSlackReceivers) Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (result *v2.SlackReceiver, err error) {
|
func (c *FakeSlackReceivers) Create(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.CreateOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(slackreceiversResource, slackReceiver), &v2.SlackReceiver{})
|
Invokes(testing.NewRootCreateAction(slackreceiversResource, slackReceiver), &v2alpha1.SlackReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), err
|
return obj.(*v2alpha1.SlackReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||||
func (c *FakeSlackReceivers) Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
func (c *FakeSlackReceivers) Update(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(slackreceiversResource, slackReceiver), &v2.SlackReceiver{})
|
Invokes(testing.NewRootUpdateAction(slackreceiversResource, slackReceiver), &v2alpha1.SlackReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), err
|
return obj.(*v2alpha1.SlackReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeSlackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error) {
|
func (c *FakeSlackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (*v2alpha1.SlackReceiver, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(slackreceiversResource, "status", slackReceiver), &v2.SlackReceiver{})
|
Invokes(testing.NewRootUpdateSubresourceAction(slackreceiversResource, "status", slackReceiver), &v2alpha1.SlackReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), err
|
return obj.(*v2alpha1.SlackReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the slackReceiver and deletes it. Returns an error if one occurs.
|
// Delete takes name of the slackReceiver and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeSlackReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeSlackReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(slackreceiversResource, name), &v2.SlackReceiver{})
|
Invokes(testing.NewRootDeleteAction(slackreceiversResource, name), &v2alpha1.SlackReceiver{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeSlackReceivers) Delete(ctx context.Context, name string, opts v1.De
|
|||||||
func (c *FakeSlackReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeSlackReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(slackreceiversResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(slackreceiversResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.SlackReceiverList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.SlackReceiverList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched slackReceiver.
|
// Patch applies the patch and returns the patched slackReceiver.
|
||||||
func (c *FakeSlackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error) {
|
func (c *FakeSlackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(slackreceiversResource, name, pt, data, subresources...), &v2.SlackReceiver{})
|
Invokes(testing.NewRootPatchSubresourceAction(slackreceiversResource, name, pt, data, subresources...), &v2alpha1.SlackReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), err
|
return obj.(*v2alpha1.SlackReceiver), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeWebhookConfigs implements WebhookConfigInterface
|
// FakeWebhookConfigs implements WebhookConfigInterface
|
||||||
type FakeWebhookConfigs struct {
|
type FakeWebhookConfigs struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var webhookconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "webhookconfigs"}
|
var webhookconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "webhookconfigs"}
|
||||||
|
|
||||||
var webhookconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WebhookConfig"}
|
var webhookconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "WebhookConfig"}
|
||||||
|
|
||||||
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
||||||
func (c *FakeWebhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookConfig, err error) {
|
func (c *FakeWebhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(webhookconfigsResource, name), &v2.WebhookConfig{})
|
Invokes(testing.NewRootGetAction(webhookconfigsResource, name), &v2alpha1.WebhookConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), err
|
return obj.(*v2alpha1.WebhookConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
||||||
func (c *FakeWebhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookConfigList, err error) {
|
func (c *FakeWebhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WebhookConfigList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(webhookconfigsResource, webhookconfigsKind, opts), &v2.WebhookConfigList{})
|
Invokes(testing.NewRootListAction(webhookconfigsResource, webhookconfigsKind, opts), &v2alpha1.WebhookConfigList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeWebhookConfigs) List(ctx context.Context, opts v1.ListOptions) (res
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.WebhookConfigList{ListMeta: obj.(*v2.WebhookConfigList).ListMeta}
|
list := &v2alpha1.WebhookConfigList{ListMeta: obj.(*v2alpha1.WebhookConfigList).ListMeta}
|
||||||
for _, item := range obj.(*v2.WebhookConfigList).Items {
|
for _, item := range obj.(*v2alpha1.WebhookConfigList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeWebhookConfigs) Watch(ctx context.Context, opts v1.ListOptions) (wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||||
func (c *FakeWebhookConfigs) Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (result *v2.WebhookConfig, err error) {
|
func (c *FakeWebhookConfigs) Create(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.CreateOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(webhookconfigsResource, webhookConfig), &v2.WebhookConfig{})
|
Invokes(testing.NewRootCreateAction(webhookconfigsResource, webhookConfig), &v2alpha1.WebhookConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), err
|
return obj.(*v2alpha1.WebhookConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||||
func (c *FakeWebhookConfigs) Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
func (c *FakeWebhookConfigs) Update(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(webhookconfigsResource, webhookConfig), &v2.WebhookConfig{})
|
Invokes(testing.NewRootUpdateAction(webhookconfigsResource, webhookConfig), &v2alpha1.WebhookConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), err
|
return obj.(*v2alpha1.WebhookConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeWebhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error) {
|
func (c *FakeWebhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (*v2alpha1.WebhookConfig, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(webhookconfigsResource, "status", webhookConfig), &v2.WebhookConfig{})
|
Invokes(testing.NewRootUpdateSubresourceAction(webhookconfigsResource, "status", webhookConfig), &v2alpha1.WebhookConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), err
|
return obj.(*v2alpha1.WebhookConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the webhookConfig and deletes it. Returns an error if one occurs.
|
// Delete takes name of the webhookConfig and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeWebhookConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeWebhookConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(webhookconfigsResource, name), &v2.WebhookConfig{})
|
Invokes(testing.NewRootDeleteAction(webhookconfigsResource, name), &v2alpha1.WebhookConfig{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeWebhookConfigs) Delete(ctx context.Context, name string, opts v1.De
|
|||||||
func (c *FakeWebhookConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeWebhookConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(webhookconfigsResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(webhookconfigsResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.WebhookConfigList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.WebhookConfigList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched webhookConfig.
|
// Patch applies the patch and returns the patched webhookConfig.
|
||||||
func (c *FakeWebhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error) {
|
func (c *FakeWebhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(webhookconfigsResource, name, pt, data, subresources...), &v2.WebhookConfig{})
|
Invokes(testing.NewRootPatchSubresourceAction(webhookconfigsResource, name, pt, data, subresources...), &v2alpha1.WebhookConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), err
|
return obj.(*v2alpha1.WebhookConfig), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeWebhookReceivers implements WebhookReceiverInterface
|
// FakeWebhookReceivers implements WebhookReceiverInterface
|
||||||
type FakeWebhookReceivers struct {
|
type FakeWebhookReceivers struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var webhookreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "webhookreceivers"}
|
var webhookreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "webhookreceivers"}
|
||||||
|
|
||||||
var webhookreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WebhookReceiver"}
|
var webhookreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "WebhookReceiver"}
|
||||||
|
|
||||||
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
||||||
func (c *FakeWebhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *FakeWebhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(webhookreceiversResource, name), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootGetAction(webhookreceiversResource, name), &v2alpha1.WebhookReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), err
|
return obj.(*v2alpha1.WebhookReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
||||||
func (c *FakeWebhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookReceiverList, err error) {
|
func (c *FakeWebhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WebhookReceiverList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(webhookreceiversResource, webhookreceiversKind, opts), &v2.WebhookReceiverList{})
|
Invokes(testing.NewRootListAction(webhookreceiversResource, webhookreceiversKind, opts), &v2alpha1.WebhookReceiverList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeWebhookReceivers) List(ctx context.Context, opts v1.ListOptions) (r
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.WebhookReceiverList{ListMeta: obj.(*v2.WebhookReceiverList).ListMeta}
|
list := &v2alpha1.WebhookReceiverList{ListMeta: obj.(*v2alpha1.WebhookReceiverList).ListMeta}
|
||||||
for _, item := range obj.(*v2.WebhookReceiverList).Items {
|
for _, item := range obj.(*v2alpha1.WebhookReceiverList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeWebhookReceivers) Watch(ctx context.Context, opts v1.ListOptions) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||||
func (c *FakeWebhookReceivers) Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *FakeWebhookReceivers) Create(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.CreateOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(webhookreceiversResource, webhookReceiver), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootCreateAction(webhookreceiversResource, webhookReceiver), &v2alpha1.WebhookReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), err
|
return obj.(*v2alpha1.WebhookReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||||
func (c *FakeWebhookReceivers) Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *FakeWebhookReceivers) Update(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(webhookreceiversResource, webhookReceiver), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootUpdateAction(webhookreceiversResource, webhookReceiver), &v2alpha1.WebhookReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), err
|
return obj.(*v2alpha1.WebhookReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeWebhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error) {
|
func (c *FakeWebhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (*v2alpha1.WebhookReceiver, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(webhookreceiversResource, "status", webhookReceiver), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootUpdateSubresourceAction(webhookreceiversResource, "status", webhookReceiver), &v2alpha1.WebhookReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), err
|
return obj.(*v2alpha1.WebhookReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the webhookReceiver and deletes it. Returns an error if one occurs.
|
// Delete takes name of the webhookReceiver and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeWebhookReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeWebhookReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(webhookreceiversResource, name), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootDeleteAction(webhookreceiversResource, name), &v2alpha1.WebhookReceiver{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeWebhookReceivers) Delete(ctx context.Context, name string, opts v1.
|
|||||||
func (c *FakeWebhookReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeWebhookReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(webhookreceiversResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(webhookreceiversResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.WebhookReceiverList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.WebhookReceiverList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched webhookReceiver.
|
// Patch applies the patch and returns the patched webhookReceiver.
|
||||||
func (c *FakeWebhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error) {
|
func (c *FakeWebhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(webhookreceiversResource, name, pt, data, subresources...), &v2.WebhookReceiver{})
|
Invokes(testing.NewRootPatchSubresourceAction(webhookreceiversResource, name, pt, data, subresources...), &v2alpha1.WebhookReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), err
|
return obj.(*v2alpha1.WebhookReceiver), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeWechatConfigs implements WechatConfigInterface
|
// FakeWechatConfigs implements WechatConfigInterface
|
||||||
type FakeWechatConfigs struct {
|
type FakeWechatConfigs struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var wechatconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "wechatconfigs"}
|
var wechatconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "wechatconfigs"}
|
||||||
|
|
||||||
var wechatconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WechatConfig"}
|
var wechatconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "WechatConfig"}
|
||||||
|
|
||||||
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
||||||
func (c *FakeWechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatConfig, err error) {
|
func (c *FakeWechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(wechatconfigsResource, name), &v2.WechatConfig{})
|
Invokes(testing.NewRootGetAction(wechatconfigsResource, name), &v2alpha1.WechatConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), err
|
return obj.(*v2alpha1.WechatConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
||||||
func (c *FakeWechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatConfigList, err error) {
|
func (c *FakeWechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WechatConfigList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(wechatconfigsResource, wechatconfigsKind, opts), &v2.WechatConfigList{})
|
Invokes(testing.NewRootListAction(wechatconfigsResource, wechatconfigsKind, opts), &v2alpha1.WechatConfigList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeWechatConfigs) List(ctx context.Context, opts v1.ListOptions) (resu
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.WechatConfigList{ListMeta: obj.(*v2.WechatConfigList).ListMeta}
|
list := &v2alpha1.WechatConfigList{ListMeta: obj.(*v2alpha1.WechatConfigList).ListMeta}
|
||||||
for _, item := range obj.(*v2.WechatConfigList).Items {
|
for _, item := range obj.(*v2alpha1.WechatConfigList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeWechatConfigs) Watch(ctx context.Context, opts v1.ListOptions) (wat
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||||
func (c *FakeWechatConfigs) Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (result *v2.WechatConfig, err error) {
|
func (c *FakeWechatConfigs) Create(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.CreateOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(wechatconfigsResource, wechatConfig), &v2.WechatConfig{})
|
Invokes(testing.NewRootCreateAction(wechatconfigsResource, wechatConfig), &v2alpha1.WechatConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), err
|
return obj.(*v2alpha1.WechatConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||||
func (c *FakeWechatConfigs) Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
func (c *FakeWechatConfigs) Update(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(wechatconfigsResource, wechatConfig), &v2.WechatConfig{})
|
Invokes(testing.NewRootUpdateAction(wechatconfigsResource, wechatConfig), &v2alpha1.WechatConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), err
|
return obj.(*v2alpha1.WechatConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeWechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error) {
|
func (c *FakeWechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (*v2alpha1.WechatConfig, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(wechatconfigsResource, "status", wechatConfig), &v2.WechatConfig{})
|
Invokes(testing.NewRootUpdateSubresourceAction(wechatconfigsResource, "status", wechatConfig), &v2alpha1.WechatConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), err
|
return obj.(*v2alpha1.WechatConfig), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the wechatConfig and deletes it. Returns an error if one occurs.
|
// Delete takes name of the wechatConfig and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeWechatConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeWechatConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(wechatconfigsResource, name), &v2.WechatConfig{})
|
Invokes(testing.NewRootDeleteAction(wechatconfigsResource, name), &v2alpha1.WechatConfig{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeWechatConfigs) Delete(ctx context.Context, name string, opts v1.Del
|
|||||||
func (c *FakeWechatConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeWechatConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(wechatconfigsResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(wechatconfigsResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.WechatConfigList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.WechatConfigList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched wechatConfig.
|
// Patch applies the patch and returns the patched wechatConfig.
|
||||||
func (c *FakeWechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error) {
|
func (c *FakeWechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatConfig, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(wechatconfigsResource, name, pt, data, subresources...), &v2.WechatConfig{})
|
Invokes(testing.NewRootPatchSubresourceAction(wechatconfigsResource, name, pt, data, subresources...), &v2alpha1.WechatConfig{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), err
|
return obj.(*v2alpha1.WechatConfig), err
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,32 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
testing "k8s.io/client-go/testing"
|
testing "k8s.io/client-go/testing"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeWechatReceivers implements WechatReceiverInterface
|
// FakeWechatReceivers implements WechatReceiverInterface
|
||||||
type FakeWechatReceivers struct {
|
type FakeWechatReceivers struct {
|
||||||
Fake *FakeNotificationV2
|
Fake *FakeNotificationV2alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
var wechatreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "wechatreceivers"}
|
var wechatreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2alpha1", Resource: "wechatreceivers"}
|
||||||
|
|
||||||
var wechatreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WechatReceiver"}
|
var wechatreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2alpha1", Kind: "WechatReceiver"}
|
||||||
|
|
||||||
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
||||||
func (c *FakeWechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatReceiver, err error) {
|
func (c *FakeWechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootGetAction(wechatreceiversResource, name), &v2.WechatReceiver{})
|
Invokes(testing.NewRootGetAction(wechatreceiversResource, name), &v2alpha1.WechatReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), err
|
return obj.(*v2alpha1.WechatReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
||||||
func (c *FakeWechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatReceiverList, err error) {
|
func (c *FakeWechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WechatReceiverList, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootListAction(wechatreceiversResource, wechatreceiversKind, opts), &v2.WechatReceiverList{})
|
Invokes(testing.NewRootListAction(wechatreceiversResource, wechatreceiversKind, opts), &v2alpha1.WechatReceiverList{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -61,8 +61,8 @@ func (c *FakeWechatReceivers) List(ctx context.Context, opts v1.ListOptions) (re
|
|||||||
if label == nil {
|
if label == nil {
|
||||||
label = labels.Everything()
|
label = labels.Everything()
|
||||||
}
|
}
|
||||||
list := &v2.WechatReceiverList{ListMeta: obj.(*v2.WechatReceiverList).ListMeta}
|
list := &v2alpha1.WechatReceiverList{ListMeta: obj.(*v2alpha1.WechatReceiverList).ListMeta}
|
||||||
for _, item := range obj.(*v2.WechatReceiverList).Items {
|
for _, item := range obj.(*v2alpha1.WechatReceiverList).Items {
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
list.Items = append(list.Items, item)
|
list.Items = append(list.Items, item)
|
||||||
}
|
}
|
||||||
@@ -77,40 +77,40 @@ func (c *FakeWechatReceivers) Watch(ctx context.Context, opts v1.ListOptions) (w
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||||
func (c *FakeWechatReceivers) Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (result *v2.WechatReceiver, err error) {
|
func (c *FakeWechatReceivers) Create(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.CreateOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootCreateAction(wechatreceiversResource, wechatReceiver), &v2.WechatReceiver{})
|
Invokes(testing.NewRootCreateAction(wechatreceiversResource, wechatReceiver), &v2alpha1.WechatReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), err
|
return obj.(*v2alpha1.WechatReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||||
func (c *FakeWechatReceivers) Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
func (c *FakeWechatReceivers) Update(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateAction(wechatreceiversResource, wechatReceiver), &v2.WechatReceiver{})
|
Invokes(testing.NewRootUpdateAction(wechatreceiversResource, wechatReceiver), &v2alpha1.WechatReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), err
|
return obj.(*v2alpha1.WechatReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *FakeWechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error) {
|
func (c *FakeWechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (*v2alpha1.WechatReceiver, error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(wechatreceiversResource, "status", wechatReceiver), &v2.WechatReceiver{})
|
Invokes(testing.NewRootUpdateSubresourceAction(wechatreceiversResource, "status", wechatReceiver), &v2alpha1.WechatReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), err
|
return obj.(*v2alpha1.WechatReceiver), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete takes name of the wechatReceiver and deletes it. Returns an error if one occurs.
|
// Delete takes name of the wechatReceiver and deletes it. Returns an error if one occurs.
|
||||||
func (c *FakeWechatReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
func (c *FakeWechatReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||||
_, err := c.Fake.
|
_, err := c.Fake.
|
||||||
Invokes(testing.NewRootDeleteAction(wechatreceiversResource, name), &v2.WechatReceiver{})
|
Invokes(testing.NewRootDeleteAction(wechatreceiversResource, name), &v2alpha1.WechatReceiver{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,16 +118,16 @@ func (c *FakeWechatReceivers) Delete(ctx context.Context, name string, opts v1.D
|
|||||||
func (c *FakeWechatReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
func (c *FakeWechatReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||||
action := testing.NewRootDeleteCollectionAction(wechatreceiversResource, listOpts)
|
action := testing.NewRootDeleteCollectionAction(wechatreceiversResource, listOpts)
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2.WechatReceiverList{})
|
_, err := c.Fake.Invokes(action, &v2alpha1.WechatReceiverList{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched wechatReceiver.
|
// Patch applies the patch and returns the patched wechatReceiver.
|
||||||
func (c *FakeWechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error) {
|
func (c *FakeWechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(wechatreceiversResource, name, pt, data, subresources...), &v2.WechatReceiver{})
|
Invokes(testing.NewRootPatchSubresourceAction(wechatreceiversResource, name, pt, data, subresources...), &v2alpha1.WechatReceiver{})
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), err
|
return obj.(*v2alpha1.WechatReceiver), err
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
type DingTalkConfigExpansion interface{}
|
type DingTalkConfigExpansion interface{}
|
||||||
|
|
||||||
@@ -16,15 +16,15 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NotificationV2Interface interface {
|
type NotificationV2alpha1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
DingTalkConfigsGetter
|
DingTalkConfigsGetter
|
||||||
DingTalkReceiversGetter
|
DingTalkReceiversGetter
|
||||||
@@ -38,53 +38,53 @@ type NotificationV2Interface interface {
|
|||||||
WechatReceiversGetter
|
WechatReceiversGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotificationV2Client is used to interact with features provided by the notification.kubesphere.io group.
|
// NotificationV2alpha1Client is used to interact with features provided by the notification.kubesphere.io group.
|
||||||
type NotificationV2Client struct {
|
type NotificationV2alpha1Client struct {
|
||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) DingTalkConfigs() DingTalkConfigInterface {
|
func (c *NotificationV2alpha1Client) DingTalkConfigs() DingTalkConfigInterface {
|
||||||
return newDingTalkConfigs(c)
|
return newDingTalkConfigs(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) DingTalkReceivers() DingTalkReceiverInterface {
|
func (c *NotificationV2alpha1Client) DingTalkReceivers() DingTalkReceiverInterface {
|
||||||
return newDingTalkReceivers(c)
|
return newDingTalkReceivers(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) EmailConfigs() EmailConfigInterface {
|
func (c *NotificationV2alpha1Client) EmailConfigs() EmailConfigInterface {
|
||||||
return newEmailConfigs(c)
|
return newEmailConfigs(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) EmailReceivers() EmailReceiverInterface {
|
func (c *NotificationV2alpha1Client) EmailReceivers() EmailReceiverInterface {
|
||||||
return newEmailReceivers(c)
|
return newEmailReceivers(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) SlackConfigs() SlackConfigInterface {
|
func (c *NotificationV2alpha1Client) SlackConfigs() SlackConfigInterface {
|
||||||
return newSlackConfigs(c)
|
return newSlackConfigs(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) SlackReceivers() SlackReceiverInterface {
|
func (c *NotificationV2alpha1Client) SlackReceivers() SlackReceiverInterface {
|
||||||
return newSlackReceivers(c)
|
return newSlackReceivers(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) WebhookConfigs() WebhookConfigInterface {
|
func (c *NotificationV2alpha1Client) WebhookConfigs() WebhookConfigInterface {
|
||||||
return newWebhookConfigs(c)
|
return newWebhookConfigs(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) WebhookReceivers() WebhookReceiverInterface {
|
func (c *NotificationV2alpha1Client) WebhookReceivers() WebhookReceiverInterface {
|
||||||
return newWebhookReceivers(c)
|
return newWebhookReceivers(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) WechatConfigs() WechatConfigInterface {
|
func (c *NotificationV2alpha1Client) WechatConfigs() WechatConfigInterface {
|
||||||
return newWechatConfigs(c)
|
return newWechatConfigs(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *NotificationV2Client) WechatReceivers() WechatReceiverInterface {
|
func (c *NotificationV2alpha1Client) WechatReceivers() WechatReceiverInterface {
|
||||||
return newWechatReceivers(c)
|
return newWechatReceivers(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new NotificationV2Client for the given config.
|
// NewForConfig creates a new NotificationV2alpha1Client for the given config.
|
||||||
func NewForConfig(c *rest.Config) (*NotificationV2Client, error) {
|
func NewForConfig(c *rest.Config) (*NotificationV2alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -93,12 +93,12 @@ func NewForConfig(c *rest.Config) (*NotificationV2Client, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &NotificationV2Client{client}, nil
|
return &NotificationV2alpha1Client{client}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewForConfigOrDie creates a new NotificationV2Client for the given config and
|
// NewForConfigOrDie creates a new NotificationV2alpha1Client for the given config and
|
||||||
// panics if there is an error in the config.
|
// panics if there is an error in the config.
|
||||||
func NewForConfigOrDie(c *rest.Config) *NotificationV2Client {
|
func NewForConfigOrDie(c *rest.Config) *NotificationV2alpha1Client {
|
||||||
client, err := NewForConfig(c)
|
client, err := NewForConfig(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -106,13 +106,13 @@ func NewForConfigOrDie(c *rest.Config) *NotificationV2Client {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new NotificationV2Client for the given RESTClient.
|
// New creates a new NotificationV2alpha1Client for the given RESTClient.
|
||||||
func New(c rest.Interface) *NotificationV2Client {
|
func New(c rest.Interface) *NotificationV2alpha1Client {
|
||||||
return &NotificationV2Client{c}
|
return &NotificationV2alpha1Client{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
gv := v2.SchemeGroupVersion
|
gv := v2alpha1.SchemeGroupVersion
|
||||||
config.GroupVersion = &gv
|
config.GroupVersion = &gv
|
||||||
config.APIPath = "/apis"
|
config.APIPath = "/apis"
|
||||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||||
@@ -126,7 +126,7 @@ func setConfigDefaults(config *rest.Config) error {
|
|||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *NotificationV2Client) RESTClient() rest.Interface {
|
func (c *NotificationV2alpha1Client) RESTClient() rest.Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type SlackConfigsGetter interface {
|
|||||||
|
|
||||||
// SlackConfigInterface has methods to work with SlackConfig resources.
|
// SlackConfigInterface has methods to work with SlackConfig resources.
|
||||||
type SlackConfigInterface interface {
|
type SlackConfigInterface interface {
|
||||||
Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (*v2.SlackConfig, error)
|
Create(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.CreateOptions) (*v2alpha1.SlackConfig, error)
|
||||||
Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error)
|
Update(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (*v2alpha1.SlackConfig, error)
|
||||||
UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error)
|
UpdateStatus(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (*v2alpha1.SlackConfig, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.SlackConfig, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.SlackConfig, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.SlackConfigList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.SlackConfigList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackConfig, err error)
|
||||||
SlackConfigExpansion
|
SlackConfigExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type slackConfigs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newSlackConfigs returns a SlackConfigs
|
// newSlackConfigs returns a SlackConfigs
|
||||||
func newSlackConfigs(c *NotificationV2Client) *slackConfigs {
|
func newSlackConfigs(c *NotificationV2alpha1Client) *slackConfigs {
|
||||||
return &slackConfigs{
|
return &slackConfigs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
||||||
func (c *slackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackConfig, err error) {
|
func (c *slackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
result = &v2.SlackConfig{}
|
result = &v2alpha1.SlackConfig{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *slackConfigs) Get(ctx context.Context, name string, options v1.GetOptio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
||||||
func (c *slackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackConfigList, err error) {
|
func (c *slackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.SlackConfigList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.SlackConfigList{}
|
result = &v2alpha1.SlackConfigList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *slackConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.In
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||||
func (c *slackConfigs) Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (result *v2.SlackConfig, err error) {
|
func (c *slackConfigs) Create(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.CreateOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
result = &v2.SlackConfig{}
|
result = &v2alpha1.SlackConfig{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *slackConfigs) Create(ctx context.Context, slackConfig *v2.SlackConfig,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||||
func (c *slackConfigs) Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
func (c *slackConfigs) Update(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
result = &v2.SlackConfig{}
|
result = &v2alpha1.SlackConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
Name(slackConfig.Name).
|
Name(slackConfig.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *slackConfigs) Update(ctx context.Context, slackConfig *v2.SlackConfig,
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *slackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
func (c *slackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2alpha1.SlackConfig, opts v1.UpdateOptions) (result *v2alpha1.SlackConfig, err error) {
|
||||||
result = &v2.SlackConfig{}
|
result = &v2alpha1.SlackConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
Name(slackConfig.Name).
|
Name(slackConfig.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *slackConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched slackConfig.
|
// Patch applies the patch and returns the patched slackConfig.
|
||||||
func (c *slackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error) {
|
func (c *slackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackConfig, err error) {
|
||||||
result = &v2.SlackConfig{}
|
result = &v2alpha1.SlackConfig{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("slackconfigs").
|
Resource("slackconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type SlackReceiversGetter interface {
|
|||||||
|
|
||||||
// SlackReceiverInterface has methods to work with SlackReceiver resources.
|
// SlackReceiverInterface has methods to work with SlackReceiver resources.
|
||||||
type SlackReceiverInterface interface {
|
type SlackReceiverInterface interface {
|
||||||
Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (*v2.SlackReceiver, error)
|
Create(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.CreateOptions) (*v2alpha1.SlackReceiver, error)
|
||||||
Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error)
|
Update(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (*v2alpha1.SlackReceiver, error)
|
||||||
UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error)
|
UpdateStatus(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (*v2alpha1.SlackReceiver, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.SlackReceiver, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.SlackReceiver, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.SlackReceiverList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.SlackReceiverList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackReceiver, err error)
|
||||||
SlackReceiverExpansion
|
SlackReceiverExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type slackReceivers struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newSlackReceivers returns a SlackReceivers
|
// newSlackReceivers returns a SlackReceivers
|
||||||
func newSlackReceivers(c *NotificationV2Client) *slackReceivers {
|
func newSlackReceivers(c *NotificationV2alpha1Client) *slackReceivers {
|
||||||
return &slackReceivers{
|
return &slackReceivers{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
||||||
func (c *slackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackReceiver, err error) {
|
func (c *slackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
result = &v2.SlackReceiver{}
|
result = &v2alpha1.SlackReceiver{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *slackReceivers) Get(ctx context.Context, name string, options v1.GetOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
||||||
func (c *slackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackReceiverList, err error) {
|
func (c *slackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.SlackReceiverList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.SlackReceiverList{}
|
result = &v2alpha1.SlackReceiverList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *slackReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||||
func (c *slackReceivers) Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (result *v2.SlackReceiver, err error) {
|
func (c *slackReceivers) Create(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.CreateOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
result = &v2.SlackReceiver{}
|
result = &v2alpha1.SlackReceiver{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *slackReceivers) Create(ctx context.Context, slackReceiver *v2.SlackRece
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||||
func (c *slackReceivers) Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
func (c *slackReceivers) Update(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
result = &v2.SlackReceiver{}
|
result = &v2alpha1.SlackReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
Name(slackReceiver.Name).
|
Name(slackReceiver.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *slackReceivers) Update(ctx context.Context, slackReceiver *v2.SlackRece
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *slackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
func (c *slackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2alpha1.SlackReceiver, opts v1.UpdateOptions) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
result = &v2.SlackReceiver{}
|
result = &v2alpha1.SlackReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
Name(slackReceiver.Name).
|
Name(slackReceiver.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *slackReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched slackReceiver.
|
// Patch applies the patch and returns the patched slackReceiver.
|
||||||
func (c *slackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error) {
|
func (c *slackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.SlackReceiver, err error) {
|
||||||
result = &v2.SlackReceiver{}
|
result = &v2alpha1.SlackReceiver{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("slackreceivers").
|
Resource("slackreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type WebhookConfigsGetter interface {
|
|||||||
|
|
||||||
// WebhookConfigInterface has methods to work with WebhookConfig resources.
|
// WebhookConfigInterface has methods to work with WebhookConfig resources.
|
||||||
type WebhookConfigInterface interface {
|
type WebhookConfigInterface interface {
|
||||||
Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (*v2.WebhookConfig, error)
|
Create(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.CreateOptions) (*v2alpha1.WebhookConfig, error)
|
||||||
Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error)
|
Update(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (*v2alpha1.WebhookConfig, error)
|
||||||
UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error)
|
UpdateStatus(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (*v2alpha1.WebhookConfig, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WebhookConfig, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.WebhookConfig, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WebhookConfigList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.WebhookConfigList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookConfig, err error)
|
||||||
WebhookConfigExpansion
|
WebhookConfigExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type webhookConfigs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newWebhookConfigs returns a WebhookConfigs
|
// newWebhookConfigs returns a WebhookConfigs
|
||||||
func newWebhookConfigs(c *NotificationV2Client) *webhookConfigs {
|
func newWebhookConfigs(c *NotificationV2alpha1Client) *webhookConfigs {
|
||||||
return &webhookConfigs{
|
return &webhookConfigs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
||||||
func (c *webhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookConfig, err error) {
|
func (c *webhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
result = &v2.WebhookConfig{}
|
result = &v2alpha1.WebhookConfig{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *webhookConfigs) Get(ctx context.Context, name string, options v1.GetOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
||||||
func (c *webhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookConfigList, err error) {
|
func (c *webhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WebhookConfigList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.WebhookConfigList{}
|
result = &v2alpha1.WebhookConfigList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *webhookConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||||
func (c *webhookConfigs) Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (result *v2.WebhookConfig, err error) {
|
func (c *webhookConfigs) Create(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.CreateOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
result = &v2.WebhookConfig{}
|
result = &v2alpha1.WebhookConfig{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *webhookConfigs) Create(ctx context.Context, webhookConfig *v2.WebhookCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||||
func (c *webhookConfigs) Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
func (c *webhookConfigs) Update(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
result = &v2.WebhookConfig{}
|
result = &v2alpha1.WebhookConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
Name(webhookConfig.Name).
|
Name(webhookConfig.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *webhookConfigs) Update(ctx context.Context, webhookConfig *v2.WebhookCo
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *webhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
func (c *webhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2alpha1.WebhookConfig, opts v1.UpdateOptions) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
result = &v2.WebhookConfig{}
|
result = &v2alpha1.WebhookConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
Name(webhookConfig.Name).
|
Name(webhookConfig.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *webhookConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched webhookConfig.
|
// Patch applies the patch and returns the patched webhookConfig.
|
||||||
func (c *webhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error) {
|
func (c *webhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookConfig, err error) {
|
||||||
result = &v2.WebhookConfig{}
|
result = &v2alpha1.WebhookConfig{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("webhookconfigs").
|
Resource("webhookconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type WebhookReceiversGetter interface {
|
|||||||
|
|
||||||
// WebhookReceiverInterface has methods to work with WebhookReceiver resources.
|
// WebhookReceiverInterface has methods to work with WebhookReceiver resources.
|
||||||
type WebhookReceiverInterface interface {
|
type WebhookReceiverInterface interface {
|
||||||
Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (*v2.WebhookReceiver, error)
|
Create(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.CreateOptions) (*v2alpha1.WebhookReceiver, error)
|
||||||
Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error)
|
Update(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (*v2alpha1.WebhookReceiver, error)
|
||||||
UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error)
|
UpdateStatus(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (*v2alpha1.WebhookReceiver, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WebhookReceiver, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.WebhookReceiver, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WebhookReceiverList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.WebhookReceiverList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookReceiver, err error)
|
||||||
WebhookReceiverExpansion
|
WebhookReceiverExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type webhookReceivers struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newWebhookReceivers returns a WebhookReceivers
|
// newWebhookReceivers returns a WebhookReceivers
|
||||||
func newWebhookReceivers(c *NotificationV2Client) *webhookReceivers {
|
func newWebhookReceivers(c *NotificationV2alpha1Client) *webhookReceivers {
|
||||||
return &webhookReceivers{
|
return &webhookReceivers{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
||||||
func (c *webhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *webhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
result = &v2.WebhookReceiver{}
|
result = &v2alpha1.WebhookReceiver{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *webhookReceivers) Get(ctx context.Context, name string, options v1.GetO
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
||||||
func (c *webhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookReceiverList, err error) {
|
func (c *webhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WebhookReceiverList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.WebhookReceiverList{}
|
result = &v2alpha1.WebhookReceiverList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *webhookReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||||
func (c *webhookReceivers) Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *webhookReceivers) Create(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.CreateOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
result = &v2.WebhookReceiver{}
|
result = &v2alpha1.WebhookReceiver{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *webhookReceivers) Create(ctx context.Context, webhookReceiver *v2.Webho
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||||
func (c *webhookReceivers) Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *webhookReceivers) Update(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
result = &v2.WebhookReceiver{}
|
result = &v2alpha1.WebhookReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
Name(webhookReceiver.Name).
|
Name(webhookReceiver.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *webhookReceivers) Update(ctx context.Context, webhookReceiver *v2.Webho
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *webhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
func (c *webhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2alpha1.WebhookReceiver, opts v1.UpdateOptions) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
result = &v2.WebhookReceiver{}
|
result = &v2alpha1.WebhookReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
Name(webhookReceiver.Name).
|
Name(webhookReceiver.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *webhookReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteO
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched webhookReceiver.
|
// Patch applies the patch and returns the patched webhookReceiver.
|
||||||
func (c *webhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error) {
|
func (c *webhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WebhookReceiver, err error) {
|
||||||
result = &v2.WebhookReceiver{}
|
result = &v2alpha1.WebhookReceiver{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("webhookreceivers").
|
Resource("webhookreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type WechatConfigsGetter interface {
|
|||||||
|
|
||||||
// WechatConfigInterface has methods to work with WechatConfig resources.
|
// WechatConfigInterface has methods to work with WechatConfig resources.
|
||||||
type WechatConfigInterface interface {
|
type WechatConfigInterface interface {
|
||||||
Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (*v2.WechatConfig, error)
|
Create(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.CreateOptions) (*v2alpha1.WechatConfig, error)
|
||||||
Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error)
|
Update(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (*v2alpha1.WechatConfig, error)
|
||||||
UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error)
|
UpdateStatus(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (*v2alpha1.WechatConfig, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WechatConfig, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.WechatConfig, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WechatConfigList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.WechatConfigList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatConfig, err error)
|
||||||
WechatConfigExpansion
|
WechatConfigExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type wechatConfigs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newWechatConfigs returns a WechatConfigs
|
// newWechatConfigs returns a WechatConfigs
|
||||||
func newWechatConfigs(c *NotificationV2Client) *wechatConfigs {
|
func newWechatConfigs(c *NotificationV2alpha1Client) *wechatConfigs {
|
||||||
return &wechatConfigs{
|
return &wechatConfigs{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
||||||
func (c *wechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatConfig, err error) {
|
func (c *wechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
result = &v2.WechatConfig{}
|
result = &v2alpha1.WechatConfig{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *wechatConfigs) Get(ctx context.Context, name string, options v1.GetOpti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
||||||
func (c *wechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatConfigList, err error) {
|
func (c *wechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WechatConfigList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.WechatConfigList{}
|
result = &v2alpha1.WechatConfigList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *wechatConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.I
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||||
func (c *wechatConfigs) Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (result *v2.WechatConfig, err error) {
|
func (c *wechatConfigs) Create(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.CreateOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
result = &v2.WechatConfig{}
|
result = &v2alpha1.WechatConfig{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *wechatConfigs) Create(ctx context.Context, wechatConfig *v2.WechatConfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||||
func (c *wechatConfigs) Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
func (c *wechatConfigs) Update(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
result = &v2.WechatConfig{}
|
result = &v2alpha1.WechatConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
Name(wechatConfig.Name).
|
Name(wechatConfig.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *wechatConfigs) Update(ctx context.Context, wechatConfig *v2.WechatConfi
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *wechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
func (c *wechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2alpha1.WechatConfig, opts v1.UpdateOptions) (result *v2alpha1.WechatConfig, err error) {
|
||||||
result = &v2.WechatConfig{}
|
result = &v2alpha1.WechatConfig{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
Name(wechatConfig.Name).
|
Name(wechatConfig.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *wechatConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOpti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched wechatConfig.
|
// Patch applies the patch and returns the patched wechatConfig.
|
||||||
func (c *wechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error) {
|
func (c *wechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatConfig, err error) {
|
||||||
result = &v2.WechatConfig{}
|
result = &v2alpha1.WechatConfig{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("wechatconfigs").
|
Resource("wechatconfigs").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -38,15 +38,15 @@ type WechatReceiversGetter interface {
|
|||||||
|
|
||||||
// WechatReceiverInterface has methods to work with WechatReceiver resources.
|
// WechatReceiverInterface has methods to work with WechatReceiver resources.
|
||||||
type WechatReceiverInterface interface {
|
type WechatReceiverInterface interface {
|
||||||
Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (*v2.WechatReceiver, error)
|
Create(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.CreateOptions) (*v2alpha1.WechatReceiver, error)
|
||||||
Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error)
|
Update(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (*v2alpha1.WechatReceiver, error)
|
||||||
UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error)
|
UpdateStatus(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (*v2alpha1.WechatReceiver, error)
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WechatReceiver, error)
|
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.WechatReceiver, error)
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WechatReceiverList, error)
|
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.WechatReceiverList, error)
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error)
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatReceiver, err error)
|
||||||
WechatReceiverExpansion
|
WechatReceiverExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,15 +56,15 @@ type wechatReceivers struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newWechatReceivers returns a WechatReceivers
|
// newWechatReceivers returns a WechatReceivers
|
||||||
func newWechatReceivers(c *NotificationV2Client) *wechatReceivers {
|
func newWechatReceivers(c *NotificationV2alpha1Client) *wechatReceivers {
|
||||||
return &wechatReceivers{
|
return &wechatReceivers{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
||||||
func (c *wechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatReceiver, err error) {
|
func (c *wechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
result = &v2.WechatReceiver{}
|
result = &v2alpha1.WechatReceiver{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -75,12 +75,12 @@ func (c *wechatReceivers) Get(ctx context.Context, name string, options v1.GetOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
||||||
func (c *wechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatReceiverList, err error) {
|
func (c *wechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.WechatReceiverList, err error) {
|
||||||
var timeout time.Duration
|
var timeout time.Duration
|
||||||
if opts.TimeoutSeconds != nil {
|
if opts.TimeoutSeconds != nil {
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &v2.WechatReceiverList{}
|
result = &v2alpha1.WechatReceiverList{}
|
||||||
err = c.client.Get().
|
err = c.client.Get().
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -105,8 +105,8 @@ func (c *wechatReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||||
func (c *wechatReceivers) Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (result *v2.WechatReceiver, err error) {
|
func (c *wechatReceivers) Create(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.CreateOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
result = &v2.WechatReceiver{}
|
result = &v2alpha1.WechatReceiver{}
|
||||||
err = c.client.Post().
|
err = c.client.Post().
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
@@ -117,8 +117,8 @@ func (c *wechatReceivers) Create(ctx context.Context, wechatReceiver *v2.WechatR
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||||
func (c *wechatReceivers) Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
func (c *wechatReceivers) Update(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
result = &v2.WechatReceiver{}
|
result = &v2alpha1.WechatReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
Name(wechatReceiver.Name).
|
Name(wechatReceiver.Name).
|
||||||
@@ -131,8 +131,8 @@ func (c *wechatReceivers) Update(ctx context.Context, wechatReceiver *v2.WechatR
|
|||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||||
func (c *wechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
func (c *wechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2alpha1.WechatReceiver, opts v1.UpdateOptions) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
result = &v2.WechatReceiver{}
|
result = &v2alpha1.WechatReceiver{}
|
||||||
err = c.client.Put().
|
err = c.client.Put().
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
Name(wechatReceiver.Name).
|
Name(wechatReceiver.Name).
|
||||||
@@ -170,8 +170,8 @@ func (c *wechatReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched wechatReceiver.
|
// Patch applies the patch and returns the patched wechatReceiver.
|
||||||
func (c *wechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error) {
|
func (c *wechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.WechatReceiver, err error) {
|
||||||
result = &v2.WechatReceiver{}
|
result = &v2alpha1.WechatReceiver{}
|
||||||
err = c.client.Patch(pt).
|
err = c.client.Patch(pt).
|
||||||
Resource("wechatreceivers").
|
Resource("wechatreceivers").
|
||||||
Name(name).
|
Name(name).
|
||||||
@@ -30,8 +30,12 @@ import (
|
|||||||
v1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
v1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||||
v1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
v1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||||
|
<<<<<<< HEAD
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||||
|
=======
|
||||||
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
|
>>>>>>> change notification crd version to v2alpha1
|
||||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||||
@@ -133,27 +137,27 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
case networkv1alpha1.SchemeGroupVersion.WithResource("namespacenetworkpolicies"):
|
case networkv1alpha1.SchemeGroupVersion.WithResource("namespacenetworkpolicies"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Network().V1alpha1().NamespaceNetworkPolicies().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Network().V1alpha1().NamespaceNetworkPolicies().Informer()}, nil
|
||||||
|
|
||||||
// Group=notification.kubesphere.io, Version=v2
|
// Group=notification.kubesphere.io, Version=v2alpha1
|
||||||
case v2.SchemeGroupVersion.WithResource("dingtalkconfigs"):
|
case v2alpha1.SchemeGroupVersion.WithResource("dingtalkconfigs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().DingTalkConfigs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().DingTalkConfigs().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("dingtalkreceivers"):
|
case v2alpha1.SchemeGroupVersion.WithResource("dingtalkreceivers"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().DingTalkReceivers().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().DingTalkReceivers().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("emailconfigs"):
|
case v2alpha1.SchemeGroupVersion.WithResource("emailconfigs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().EmailConfigs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().EmailConfigs().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("emailreceivers"):
|
case v2alpha1.SchemeGroupVersion.WithResource("emailreceivers"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().EmailReceivers().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().EmailReceivers().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("slackconfigs"):
|
case v2alpha1.SchemeGroupVersion.WithResource("slackconfigs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().SlackConfigs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().SlackConfigs().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("slackreceivers"):
|
case v2alpha1.SchemeGroupVersion.WithResource("slackreceivers"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().SlackReceivers().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().SlackReceivers().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("webhookconfigs"):
|
case v2alpha1.SchemeGroupVersion.WithResource("webhookconfigs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WebhookConfigs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().WebhookConfigs().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("webhookreceivers"):
|
case v2alpha1.SchemeGroupVersion.WithResource("webhookreceivers"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WebhookReceivers().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().WebhookReceivers().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("wechatconfigs"):
|
case v2alpha1.SchemeGroupVersion.WithResource("wechatconfigs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WechatConfigs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().WechatConfigs().Informer()}, nil
|
||||||
case v2.SchemeGroupVersion.WithResource("wechatreceivers"):
|
case v2alpha1.SchemeGroupVersion.WithResource("wechatreceivers"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WechatReceivers().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2alpha1().WechatReceivers().Informer()}, nil
|
||||||
|
|
||||||
// Group=quota.kubesphere.io, Version=v1alpha2
|
// Group=quota.kubesphere.io, Version=v1alpha2
|
||||||
case quotav1alpha2.SchemeGroupVersion.WithResource("resourcequotas"):
|
case quotav1alpha2.SchemeGroupVersion.WithResource("resourcequotas"):
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ package notification
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/informers/externalversions/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/informers/externalversions/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Interface provides access to each of this group's versions.
|
// Interface provides access to each of this group's versions.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// V2 provides access to shared informers for resources in V2.
|
// V2alpha1 provides access to shared informers for resources in V2alpha1.
|
||||||
V2() v2.Interface
|
V2alpha1() v2alpha1.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
type group struct {
|
type group struct {
|
||||||
@@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// V2 returns a new v2.Interface.
|
// V2alpha1 returns a new v2alpha1.Interface.
|
||||||
func (g *group) V2() v2.Interface {
|
func (g *group) V2alpha1() v2alpha1.Interface {
|
||||||
return v2.New(g.factory, g.namespace, g.tweakListOptions)
|
return v2alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DingTalkConfigInformer provides access to a shared informer and lister for
|
// DingTalkConfigInformer provides access to a shared informer and lister for
|
||||||
// DingTalkConfigs.
|
// DingTalkConfigs.
|
||||||
type DingTalkConfigInformer interface {
|
type DingTalkConfigInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.DingTalkConfigLister
|
Lister() v2alpha1.DingTalkConfigLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type dingTalkConfigInformer struct {
|
type dingTalkConfigInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredDingTalkConfigInformer(client versioned.Interface, resyncPeriod
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().DingTalkConfigs().List(context.TODO(), options)
|
return client.NotificationV2alpha1().DingTalkConfigs().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().DingTalkConfigs().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().DingTalkConfigs().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.DingTalkConfig{},
|
¬ificationv2alpha1.DingTalkConfig{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *dingTalkConfigInformer) defaultInformer(client versioned.Interface, res
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *dingTalkConfigInformer) Informer() cache.SharedIndexInformer {
|
func (f *dingTalkConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.DingTalkConfig{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.DingTalkConfig{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *dingTalkConfigInformer) Lister() v2.DingTalkConfigLister {
|
func (f *dingTalkConfigInformer) Lister() v2alpha1.DingTalkConfigLister {
|
||||||
return v2.NewDingTalkConfigLister(f.Informer().GetIndexer())
|
return v2alpha1.NewDingTalkConfigLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DingTalkReceiverInformer provides access to a shared informer and lister for
|
// DingTalkReceiverInformer provides access to a shared informer and lister for
|
||||||
// DingTalkReceivers.
|
// DingTalkReceivers.
|
||||||
type DingTalkReceiverInformer interface {
|
type DingTalkReceiverInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.DingTalkReceiverLister
|
Lister() v2alpha1.DingTalkReceiverLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type dingTalkReceiverInformer struct {
|
type dingTalkReceiverInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredDingTalkReceiverInformer(client versioned.Interface, resyncPerio
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().DingTalkReceivers().List(context.TODO(), options)
|
return client.NotificationV2alpha1().DingTalkReceivers().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().DingTalkReceivers().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().DingTalkReceivers().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.DingTalkReceiver{},
|
¬ificationv2alpha1.DingTalkReceiver{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *dingTalkReceiverInformer) defaultInformer(client versioned.Interface, r
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *dingTalkReceiverInformer) Informer() cache.SharedIndexInformer {
|
func (f *dingTalkReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.DingTalkReceiver{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.DingTalkReceiver{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *dingTalkReceiverInformer) Lister() v2.DingTalkReceiverLister {
|
func (f *dingTalkReceiverInformer) Lister() v2alpha1.DingTalkReceiverLister {
|
||||||
return v2.NewDingTalkReceiverLister(f.Informer().GetIndexer())
|
return v2alpha1.NewDingTalkReceiverLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EmailConfigInformer provides access to a shared informer and lister for
|
// EmailConfigInformer provides access to a shared informer and lister for
|
||||||
// EmailConfigs.
|
// EmailConfigs.
|
||||||
type EmailConfigInformer interface {
|
type EmailConfigInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.EmailConfigLister
|
Lister() v2alpha1.EmailConfigLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type emailConfigInformer struct {
|
type emailConfigInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredEmailConfigInformer(client versioned.Interface, resyncPeriod tim
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().EmailConfigs().List(context.TODO(), options)
|
return client.NotificationV2alpha1().EmailConfigs().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().EmailConfigs().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().EmailConfigs().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.EmailConfig{},
|
¬ificationv2alpha1.EmailConfig{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *emailConfigInformer) defaultInformer(client versioned.Interface, resync
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *emailConfigInformer) Informer() cache.SharedIndexInformer {
|
func (f *emailConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.EmailConfig{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.EmailConfig{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *emailConfigInformer) Lister() v2.EmailConfigLister {
|
func (f *emailConfigInformer) Lister() v2alpha1.EmailConfigLister {
|
||||||
return v2.NewEmailConfigLister(f.Informer().GetIndexer())
|
return v2alpha1.NewEmailConfigLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EmailReceiverInformer provides access to a shared informer and lister for
|
// EmailReceiverInformer provides access to a shared informer and lister for
|
||||||
// EmailReceivers.
|
// EmailReceivers.
|
||||||
type EmailReceiverInformer interface {
|
type EmailReceiverInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.EmailReceiverLister
|
Lister() v2alpha1.EmailReceiverLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type emailReceiverInformer struct {
|
type emailReceiverInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredEmailReceiverInformer(client versioned.Interface, resyncPeriod t
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().EmailReceivers().List(context.TODO(), options)
|
return client.NotificationV2alpha1().EmailReceivers().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().EmailReceivers().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().EmailReceivers().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.EmailReceiver{},
|
¬ificationv2alpha1.EmailReceiver{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *emailReceiverInformer) defaultInformer(client versioned.Interface, resy
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *emailReceiverInformer) Informer() cache.SharedIndexInformer {
|
func (f *emailReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.EmailReceiver{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.EmailReceiver{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *emailReceiverInformer) Lister() v2.EmailReceiverLister {
|
func (f *emailReceiverInformer) Lister() v2alpha1.EmailReceiverLister {
|
||||||
return v2.NewEmailReceiverLister(f.Informer().GetIndexer())
|
return v2alpha1.NewEmailReceiverLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SlackConfigInformer provides access to a shared informer and lister for
|
// SlackConfigInformer provides access to a shared informer and lister for
|
||||||
// SlackConfigs.
|
// SlackConfigs.
|
||||||
type SlackConfigInformer interface {
|
type SlackConfigInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.SlackConfigLister
|
Lister() v2alpha1.SlackConfigLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type slackConfigInformer struct {
|
type slackConfigInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredSlackConfigInformer(client versioned.Interface, resyncPeriod tim
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().SlackConfigs().List(context.TODO(), options)
|
return client.NotificationV2alpha1().SlackConfigs().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().SlackConfigs().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().SlackConfigs().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.SlackConfig{},
|
¬ificationv2alpha1.SlackConfig{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *slackConfigInformer) defaultInformer(client versioned.Interface, resync
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *slackConfigInformer) Informer() cache.SharedIndexInformer {
|
func (f *slackConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.SlackConfig{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.SlackConfig{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *slackConfigInformer) Lister() v2.SlackConfigLister {
|
func (f *slackConfigInformer) Lister() v2alpha1.SlackConfigLister {
|
||||||
return v2.NewSlackConfigLister(f.Informer().GetIndexer())
|
return v2alpha1.NewSlackConfigLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SlackReceiverInformer provides access to a shared informer and lister for
|
// SlackReceiverInformer provides access to a shared informer and lister for
|
||||||
// SlackReceivers.
|
// SlackReceivers.
|
||||||
type SlackReceiverInformer interface {
|
type SlackReceiverInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.SlackReceiverLister
|
Lister() v2alpha1.SlackReceiverLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type slackReceiverInformer struct {
|
type slackReceiverInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredSlackReceiverInformer(client versioned.Interface, resyncPeriod t
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().SlackReceivers().List(context.TODO(), options)
|
return client.NotificationV2alpha1().SlackReceivers().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().SlackReceivers().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().SlackReceivers().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.SlackReceiver{},
|
¬ificationv2alpha1.SlackReceiver{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *slackReceiverInformer) defaultInformer(client versioned.Interface, resy
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *slackReceiverInformer) Informer() cache.SharedIndexInformer {
|
func (f *slackReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.SlackReceiver{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.SlackReceiver{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *slackReceiverInformer) Lister() v2.SlackReceiverLister {
|
func (f *slackReceiverInformer) Lister() v2alpha1.SlackReceiverLister {
|
||||||
return v2.NewSlackReceiverLister(f.Informer().GetIndexer())
|
return v2alpha1.NewSlackReceiverLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WebhookConfigInformer provides access to a shared informer and lister for
|
// WebhookConfigInformer provides access to a shared informer and lister for
|
||||||
// WebhookConfigs.
|
// WebhookConfigs.
|
||||||
type WebhookConfigInformer interface {
|
type WebhookConfigInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.WebhookConfigLister
|
Lister() v2alpha1.WebhookConfigLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type webhookConfigInformer struct {
|
type webhookConfigInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredWebhookConfigInformer(client versioned.Interface, resyncPeriod t
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WebhookConfigs().List(context.TODO(), options)
|
return client.NotificationV2alpha1().WebhookConfigs().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WebhookConfigs().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().WebhookConfigs().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.WebhookConfig{},
|
¬ificationv2alpha1.WebhookConfig{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *webhookConfigInformer) defaultInformer(client versioned.Interface, resy
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *webhookConfigInformer) Informer() cache.SharedIndexInformer {
|
func (f *webhookConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.WebhookConfig{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.WebhookConfig{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *webhookConfigInformer) Lister() v2.WebhookConfigLister {
|
func (f *webhookConfigInformer) Lister() v2alpha1.WebhookConfigLister {
|
||||||
return v2.NewWebhookConfigLister(f.Informer().GetIndexer())
|
return v2alpha1.NewWebhookConfigLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WebhookReceiverInformer provides access to a shared informer and lister for
|
// WebhookReceiverInformer provides access to a shared informer and lister for
|
||||||
// WebhookReceivers.
|
// WebhookReceivers.
|
||||||
type WebhookReceiverInformer interface {
|
type WebhookReceiverInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.WebhookReceiverLister
|
Lister() v2alpha1.WebhookReceiverLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type webhookReceiverInformer struct {
|
type webhookReceiverInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredWebhookReceiverInformer(client versioned.Interface, resyncPeriod
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WebhookReceivers().List(context.TODO(), options)
|
return client.NotificationV2alpha1().WebhookReceivers().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WebhookReceivers().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().WebhookReceivers().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.WebhookReceiver{},
|
¬ificationv2alpha1.WebhookReceiver{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *webhookReceiverInformer) defaultInformer(client versioned.Interface, re
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *webhookReceiverInformer) Informer() cache.SharedIndexInformer {
|
func (f *webhookReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.WebhookReceiver{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.WebhookReceiver{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *webhookReceiverInformer) Lister() v2.WebhookReceiverLister {
|
func (f *webhookReceiverInformer) Lister() v2alpha1.WebhookReceiverLister {
|
||||||
return v2.NewWebhookReceiverLister(f.Informer().GetIndexer())
|
return v2alpha1.NewWebhookReceiverLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WechatConfigInformer provides access to a shared informer and lister for
|
// WechatConfigInformer provides access to a shared informer and lister for
|
||||||
// WechatConfigs.
|
// WechatConfigs.
|
||||||
type WechatConfigInformer interface {
|
type WechatConfigInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.WechatConfigLister
|
Lister() v2alpha1.WechatConfigLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type wechatConfigInformer struct {
|
type wechatConfigInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredWechatConfigInformer(client versioned.Interface, resyncPeriod ti
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WechatConfigs().List(context.TODO(), options)
|
return client.NotificationV2alpha1().WechatConfigs().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WechatConfigs().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().WechatConfigs().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.WechatConfig{},
|
¬ificationv2alpha1.WechatConfig{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *wechatConfigInformer) defaultInformer(client versioned.Interface, resyn
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *wechatConfigInformer) Informer() cache.SharedIndexInformer {
|
func (f *wechatConfigInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.WechatConfig{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.WechatConfig{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *wechatConfigInformer) Lister() v2.WechatConfigLister {
|
func (f *wechatConfigInformer) Lister() v2alpha1.WechatConfigLister {
|
||||||
return v2.NewWechatConfigLister(f.Informer().GetIndexer())
|
return v2alpha1.NewWechatConfigLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -26,17 +26,17 @@ import (
|
|||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WechatReceiverInformer provides access to a shared informer and lister for
|
// WechatReceiverInformer provides access to a shared informer and lister for
|
||||||
// WechatReceivers.
|
// WechatReceivers.
|
||||||
type WechatReceiverInformer interface {
|
type WechatReceiverInformer interface {
|
||||||
Informer() cache.SharedIndexInformer
|
Informer() cache.SharedIndexInformer
|
||||||
Lister() v2.WechatReceiverLister
|
Lister() v2alpha1.WechatReceiverLister
|
||||||
}
|
}
|
||||||
|
|
||||||
type wechatReceiverInformer struct {
|
type wechatReceiverInformer struct {
|
||||||
@@ -61,16 +61,16 @@ func NewFilteredWechatReceiverInformer(client versioned.Interface, resyncPeriod
|
|||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WechatReceivers().List(context.TODO(), options)
|
return client.NotificationV2alpha1().WechatReceivers().List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.NotificationV2().WechatReceivers().Watch(context.TODO(), options)
|
return client.NotificationV2alpha1().WechatReceivers().Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
¬ificationv2.WechatReceiver{},
|
¬ificationv2alpha1.WechatReceiver{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
@@ -81,9 +81,9 @@ func (f *wechatReceiverInformer) defaultInformer(client versioned.Interface, res
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *wechatReceiverInformer) Informer() cache.SharedIndexInformer {
|
func (f *wechatReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(¬ificationv2.WechatReceiver{}, f.defaultInformer)
|
return f.factory.InformerFor(¬ificationv2alpha1.WechatReceiver{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *wechatReceiverInformer) Lister() v2.WechatReceiverLister {
|
func (f *wechatReceiverInformer) Lister() v2alpha1.WechatReceiverLister {
|
||||||
return v2.NewWechatReceiverLister(f.Informer().GetIndexer())
|
return v2alpha1.NewWechatReceiverLister(f.Informer().GetIndexer())
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DingTalkConfigLister helps list DingTalkConfigs.
|
// DingTalkConfigLister helps list DingTalkConfigs.
|
||||||
type DingTalkConfigLister interface {
|
type DingTalkConfigLister interface {
|
||||||
// List lists all DingTalkConfigs in the indexer.
|
// List lists all DingTalkConfigs in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.DingTalkConfig, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.DingTalkConfig, err error)
|
||||||
// Get retrieves the DingTalkConfig from the index for a given name.
|
// Get retrieves the DingTalkConfig from the index for a given name.
|
||||||
Get(name string) (*v2.DingTalkConfig, error)
|
Get(name string) (*v2alpha1.DingTalkConfig, error)
|
||||||
DingTalkConfigListerExpansion
|
DingTalkConfigListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewDingTalkConfigLister(indexer cache.Indexer) DingTalkConfigLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all DingTalkConfigs in the indexer.
|
// List lists all DingTalkConfigs in the indexer.
|
||||||
func (s *dingTalkConfigLister) List(selector labels.Selector) (ret []*v2.DingTalkConfig, err error) {
|
func (s *dingTalkConfigLister) List(selector labels.Selector) (ret []*v2alpha1.DingTalkConfig, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.DingTalkConfig))
|
ret = append(ret, m.(*v2alpha1.DingTalkConfig))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the DingTalkConfig from the index for a given name.
|
// Get retrieves the DingTalkConfig from the index for a given name.
|
||||||
func (s *dingTalkConfigLister) Get(name string) (*v2.DingTalkConfig, error) {
|
func (s *dingTalkConfigLister) Get(name string) (*v2alpha1.DingTalkConfig, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("dingtalkconfig"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("dingtalkconfig"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkConfig), nil
|
return obj.(*v2alpha1.DingTalkConfig), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DingTalkReceiverLister helps list DingTalkReceivers.
|
// DingTalkReceiverLister helps list DingTalkReceivers.
|
||||||
type DingTalkReceiverLister interface {
|
type DingTalkReceiverLister interface {
|
||||||
// List lists all DingTalkReceivers in the indexer.
|
// List lists all DingTalkReceivers in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.DingTalkReceiver, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.DingTalkReceiver, err error)
|
||||||
// Get retrieves the DingTalkReceiver from the index for a given name.
|
// Get retrieves the DingTalkReceiver from the index for a given name.
|
||||||
Get(name string) (*v2.DingTalkReceiver, error)
|
Get(name string) (*v2alpha1.DingTalkReceiver, error)
|
||||||
DingTalkReceiverListerExpansion
|
DingTalkReceiverListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewDingTalkReceiverLister(indexer cache.Indexer) DingTalkReceiverLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all DingTalkReceivers in the indexer.
|
// List lists all DingTalkReceivers in the indexer.
|
||||||
func (s *dingTalkReceiverLister) List(selector labels.Selector) (ret []*v2.DingTalkReceiver, err error) {
|
func (s *dingTalkReceiverLister) List(selector labels.Selector) (ret []*v2alpha1.DingTalkReceiver, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.DingTalkReceiver))
|
ret = append(ret, m.(*v2alpha1.DingTalkReceiver))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the DingTalkReceiver from the index for a given name.
|
// Get retrieves the DingTalkReceiver from the index for a given name.
|
||||||
func (s *dingTalkReceiverLister) Get(name string) (*v2.DingTalkReceiver, error) {
|
func (s *dingTalkReceiverLister) Get(name string) (*v2alpha1.DingTalkReceiver, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("dingtalkreceiver"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("dingtalkreceiver"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.DingTalkReceiver), nil
|
return obj.(*v2alpha1.DingTalkReceiver), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EmailConfigLister helps list EmailConfigs.
|
// EmailConfigLister helps list EmailConfigs.
|
||||||
type EmailConfigLister interface {
|
type EmailConfigLister interface {
|
||||||
// List lists all EmailConfigs in the indexer.
|
// List lists all EmailConfigs in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.EmailConfig, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.EmailConfig, err error)
|
||||||
// Get retrieves the EmailConfig from the index for a given name.
|
// Get retrieves the EmailConfig from the index for a given name.
|
||||||
Get(name string) (*v2.EmailConfig, error)
|
Get(name string) (*v2alpha1.EmailConfig, error)
|
||||||
EmailConfigListerExpansion
|
EmailConfigListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewEmailConfigLister(indexer cache.Indexer) EmailConfigLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all EmailConfigs in the indexer.
|
// List lists all EmailConfigs in the indexer.
|
||||||
func (s *emailConfigLister) List(selector labels.Selector) (ret []*v2.EmailConfig, err error) {
|
func (s *emailConfigLister) List(selector labels.Selector) (ret []*v2alpha1.EmailConfig, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.EmailConfig))
|
ret = append(ret, m.(*v2alpha1.EmailConfig))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the EmailConfig from the index for a given name.
|
// Get retrieves the EmailConfig from the index for a given name.
|
||||||
func (s *emailConfigLister) Get(name string) (*v2.EmailConfig, error) {
|
func (s *emailConfigLister) Get(name string) (*v2alpha1.EmailConfig, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("emailconfig"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("emailconfig"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailConfig), nil
|
return obj.(*v2alpha1.EmailConfig), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EmailReceiverLister helps list EmailReceivers.
|
// EmailReceiverLister helps list EmailReceivers.
|
||||||
type EmailReceiverLister interface {
|
type EmailReceiverLister interface {
|
||||||
// List lists all EmailReceivers in the indexer.
|
// List lists all EmailReceivers in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.EmailReceiver, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.EmailReceiver, err error)
|
||||||
// Get retrieves the EmailReceiver from the index for a given name.
|
// Get retrieves the EmailReceiver from the index for a given name.
|
||||||
Get(name string) (*v2.EmailReceiver, error)
|
Get(name string) (*v2alpha1.EmailReceiver, error)
|
||||||
EmailReceiverListerExpansion
|
EmailReceiverListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewEmailReceiverLister(indexer cache.Indexer) EmailReceiverLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all EmailReceivers in the indexer.
|
// List lists all EmailReceivers in the indexer.
|
||||||
func (s *emailReceiverLister) List(selector labels.Selector) (ret []*v2.EmailReceiver, err error) {
|
func (s *emailReceiverLister) List(selector labels.Selector) (ret []*v2alpha1.EmailReceiver, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.EmailReceiver))
|
ret = append(ret, m.(*v2alpha1.EmailReceiver))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the EmailReceiver from the index for a given name.
|
// Get retrieves the EmailReceiver from the index for a given name.
|
||||||
func (s *emailReceiverLister) Get(name string) (*v2.EmailReceiver, error) {
|
func (s *emailReceiverLister) Get(name string) (*v2alpha1.EmailReceiver, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("emailreceiver"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("emailreceiver"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.EmailReceiver), nil
|
return obj.(*v2alpha1.EmailReceiver), nil
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
// DingTalkConfigListerExpansion allows custom methods to be added to
|
// DingTalkConfigListerExpansion allows custom methods to be added to
|
||||||
// DingTalkConfigLister.
|
// DingTalkConfigLister.
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SlackConfigLister helps list SlackConfigs.
|
// SlackConfigLister helps list SlackConfigs.
|
||||||
type SlackConfigLister interface {
|
type SlackConfigLister interface {
|
||||||
// List lists all SlackConfigs in the indexer.
|
// List lists all SlackConfigs in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.SlackConfig, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.SlackConfig, err error)
|
||||||
// Get retrieves the SlackConfig from the index for a given name.
|
// Get retrieves the SlackConfig from the index for a given name.
|
||||||
Get(name string) (*v2.SlackConfig, error)
|
Get(name string) (*v2alpha1.SlackConfig, error)
|
||||||
SlackConfigListerExpansion
|
SlackConfigListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewSlackConfigLister(indexer cache.Indexer) SlackConfigLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all SlackConfigs in the indexer.
|
// List lists all SlackConfigs in the indexer.
|
||||||
func (s *slackConfigLister) List(selector labels.Selector) (ret []*v2.SlackConfig, err error) {
|
func (s *slackConfigLister) List(selector labels.Selector) (ret []*v2alpha1.SlackConfig, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.SlackConfig))
|
ret = append(ret, m.(*v2alpha1.SlackConfig))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the SlackConfig from the index for a given name.
|
// Get retrieves the SlackConfig from the index for a given name.
|
||||||
func (s *slackConfigLister) Get(name string) (*v2.SlackConfig, error) {
|
func (s *slackConfigLister) Get(name string) (*v2alpha1.SlackConfig, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("slackconfig"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("slackconfig"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackConfig), nil
|
return obj.(*v2alpha1.SlackConfig), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SlackReceiverLister helps list SlackReceivers.
|
// SlackReceiverLister helps list SlackReceivers.
|
||||||
type SlackReceiverLister interface {
|
type SlackReceiverLister interface {
|
||||||
// List lists all SlackReceivers in the indexer.
|
// List lists all SlackReceivers in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.SlackReceiver, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.SlackReceiver, err error)
|
||||||
// Get retrieves the SlackReceiver from the index for a given name.
|
// Get retrieves the SlackReceiver from the index for a given name.
|
||||||
Get(name string) (*v2.SlackReceiver, error)
|
Get(name string) (*v2alpha1.SlackReceiver, error)
|
||||||
SlackReceiverListerExpansion
|
SlackReceiverListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewSlackReceiverLister(indexer cache.Indexer) SlackReceiverLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all SlackReceivers in the indexer.
|
// List lists all SlackReceivers in the indexer.
|
||||||
func (s *slackReceiverLister) List(selector labels.Selector) (ret []*v2.SlackReceiver, err error) {
|
func (s *slackReceiverLister) List(selector labels.Selector) (ret []*v2alpha1.SlackReceiver, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.SlackReceiver))
|
ret = append(ret, m.(*v2alpha1.SlackReceiver))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the SlackReceiver from the index for a given name.
|
// Get retrieves the SlackReceiver from the index for a given name.
|
||||||
func (s *slackReceiverLister) Get(name string) (*v2.SlackReceiver, error) {
|
func (s *slackReceiverLister) Get(name string) (*v2alpha1.SlackReceiver, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("slackreceiver"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("slackreceiver"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.SlackReceiver), nil
|
return obj.(*v2alpha1.SlackReceiver), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WebhookConfigLister helps list WebhookConfigs.
|
// WebhookConfigLister helps list WebhookConfigs.
|
||||||
type WebhookConfigLister interface {
|
type WebhookConfigLister interface {
|
||||||
// List lists all WebhookConfigs in the indexer.
|
// List lists all WebhookConfigs in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.WebhookConfig, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.WebhookConfig, err error)
|
||||||
// Get retrieves the WebhookConfig from the index for a given name.
|
// Get retrieves the WebhookConfig from the index for a given name.
|
||||||
Get(name string) (*v2.WebhookConfig, error)
|
Get(name string) (*v2alpha1.WebhookConfig, error)
|
||||||
WebhookConfigListerExpansion
|
WebhookConfigListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewWebhookConfigLister(indexer cache.Indexer) WebhookConfigLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all WebhookConfigs in the indexer.
|
// List lists all WebhookConfigs in the indexer.
|
||||||
func (s *webhookConfigLister) List(selector labels.Selector) (ret []*v2.WebhookConfig, err error) {
|
func (s *webhookConfigLister) List(selector labels.Selector) (ret []*v2alpha1.WebhookConfig, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.WebhookConfig))
|
ret = append(ret, m.(*v2alpha1.WebhookConfig))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the WebhookConfig from the index for a given name.
|
// Get retrieves the WebhookConfig from the index for a given name.
|
||||||
func (s *webhookConfigLister) Get(name string) (*v2.WebhookConfig, error) {
|
func (s *webhookConfigLister) Get(name string) (*v2alpha1.WebhookConfig, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("webhookconfig"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("webhookconfig"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookConfig), nil
|
return obj.(*v2alpha1.WebhookConfig), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WebhookReceiverLister helps list WebhookReceivers.
|
// WebhookReceiverLister helps list WebhookReceivers.
|
||||||
type WebhookReceiverLister interface {
|
type WebhookReceiverLister interface {
|
||||||
// List lists all WebhookReceivers in the indexer.
|
// List lists all WebhookReceivers in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.WebhookReceiver, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.WebhookReceiver, err error)
|
||||||
// Get retrieves the WebhookReceiver from the index for a given name.
|
// Get retrieves the WebhookReceiver from the index for a given name.
|
||||||
Get(name string) (*v2.WebhookReceiver, error)
|
Get(name string) (*v2alpha1.WebhookReceiver, error)
|
||||||
WebhookReceiverListerExpansion
|
WebhookReceiverListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewWebhookReceiverLister(indexer cache.Indexer) WebhookReceiverLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all WebhookReceivers in the indexer.
|
// List lists all WebhookReceivers in the indexer.
|
||||||
func (s *webhookReceiverLister) List(selector labels.Selector) (ret []*v2.WebhookReceiver, err error) {
|
func (s *webhookReceiverLister) List(selector labels.Selector) (ret []*v2alpha1.WebhookReceiver, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.WebhookReceiver))
|
ret = append(ret, m.(*v2alpha1.WebhookReceiver))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the WebhookReceiver from the index for a given name.
|
// Get retrieves the WebhookReceiver from the index for a given name.
|
||||||
func (s *webhookReceiverLister) Get(name string) (*v2.WebhookReceiver, error) {
|
func (s *webhookReceiverLister) Get(name string) (*v2alpha1.WebhookReceiver, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("webhookreceiver"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("webhookreceiver"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.WebhookReceiver), nil
|
return obj.(*v2alpha1.WebhookReceiver), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WechatConfigLister helps list WechatConfigs.
|
// WechatConfigLister helps list WechatConfigs.
|
||||||
type WechatConfigLister interface {
|
type WechatConfigLister interface {
|
||||||
// List lists all WechatConfigs in the indexer.
|
// List lists all WechatConfigs in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.WechatConfig, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.WechatConfig, err error)
|
||||||
// Get retrieves the WechatConfig from the index for a given name.
|
// Get retrieves the WechatConfig from the index for a given name.
|
||||||
Get(name string) (*v2.WechatConfig, error)
|
Get(name string) (*v2alpha1.WechatConfig, error)
|
||||||
WechatConfigListerExpansion
|
WechatConfigListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewWechatConfigLister(indexer cache.Indexer) WechatConfigLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all WechatConfigs in the indexer.
|
// List lists all WechatConfigs in the indexer.
|
||||||
func (s *wechatConfigLister) List(selector labels.Selector) (ret []*v2.WechatConfig, err error) {
|
func (s *wechatConfigLister) List(selector labels.Selector) (ret []*v2alpha1.WechatConfig, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.WechatConfig))
|
ret = append(ret, m.(*v2alpha1.WechatConfig))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the WechatConfig from the index for a given name.
|
// Get retrieves the WechatConfig from the index for a given name.
|
||||||
func (s *wechatConfigLister) Get(name string) (*v2.WechatConfig, error) {
|
func (s *wechatConfigLister) Get(name string) (*v2alpha1.WechatConfig, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("wechatconfig"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("wechatconfig"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatConfig), nil
|
return obj.(*v2alpha1.WechatConfig), nil
|
||||||
}
|
}
|
||||||
@@ -16,21 +16,21 @@ limitations under the License.
|
|||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
package v2
|
package v2alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WechatReceiverLister helps list WechatReceivers.
|
// WechatReceiverLister helps list WechatReceivers.
|
||||||
type WechatReceiverLister interface {
|
type WechatReceiverLister interface {
|
||||||
// List lists all WechatReceivers in the indexer.
|
// List lists all WechatReceivers in the indexer.
|
||||||
List(selector labels.Selector) (ret []*v2.WechatReceiver, err error)
|
List(selector labels.Selector) (ret []*v2alpha1.WechatReceiver, err error)
|
||||||
// Get retrieves the WechatReceiver from the index for a given name.
|
// Get retrieves the WechatReceiver from the index for a given name.
|
||||||
Get(name string) (*v2.WechatReceiver, error)
|
Get(name string) (*v2alpha1.WechatReceiver, error)
|
||||||
WechatReceiverListerExpansion
|
WechatReceiverListerExpansion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,21 +45,21 @@ func NewWechatReceiverLister(indexer cache.Indexer) WechatReceiverLister {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List lists all WechatReceivers in the indexer.
|
// List lists all WechatReceivers in the indexer.
|
||||||
func (s *wechatReceiverLister) List(selector labels.Selector) (ret []*v2.WechatReceiver, err error) {
|
func (s *wechatReceiverLister) List(selector labels.Selector) (ret []*v2alpha1.WechatReceiver, err error) {
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
ret = append(ret, m.(*v2.WechatReceiver))
|
ret = append(ret, m.(*v2alpha1.WechatReceiver))
|
||||||
})
|
})
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get retrieves the WechatReceiver from the index for a given name.
|
// Get retrieves the WechatReceiver from the index for a given name.
|
||||||
func (s *wechatReceiverLister) Get(name string) (*v2.WechatReceiver, error) {
|
func (s *wechatReceiverLister) Get(name string) (*v2alpha1.WechatReceiver, error) {
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, errors.NewNotFound(v2.Resource("wechatreceiver"), name)
|
return nil, errors.NewNotFound(v2alpha1.Resource("wechatreceiver"), name)
|
||||||
}
|
}
|
||||||
return obj.(*v2.WechatReceiver), nil
|
return obj.(*v2alpha1.WechatReceiver), nil
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,7 @@ import (
|
|||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
"k8s.io/client-go/util/workqueue"
|
"k8s.io/client-go/util/workqueue"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
"kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
||||||
"kubesphere.io/kubesphere/pkg/constants"
|
"kubesphere.io/kubesphere/pkg/constants"
|
||||||
"reflect"
|
"reflect"
|
||||||
@@ -95,16 +95,16 @@ func (c *Controller) setEventHandlers() error {
|
|||||||
if c.reconciledObjs != nil && len(c.reconciledObjs) > 0 {
|
if c.reconciledObjs != nil && len(c.reconciledObjs) > 0 {
|
||||||
c.reconciledObjs = c.reconciledObjs[:0]
|
c.reconciledObjs = c.reconciledObjs[:0]
|
||||||
}
|
}
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.DingTalkConfig{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.DingTalkConfig{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.DingTalkReceiver{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.DingTalkReceiver{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.EmailConfig{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.EmailConfig{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.EmailReceiver{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.EmailReceiver{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.SlackConfig{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.SlackConfig{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.SlackReceiver{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.SlackReceiver{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.WebhookConfig{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.WebhookConfig{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.WebhookReceiver{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.WebhookReceiver{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.WechatConfig{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.WechatConfig{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &v2.WechatReceiver{})
|
c.reconciledObjs = append(c.reconciledObjs, &v2alpha1.WechatReceiver{})
|
||||||
c.reconciledObjs = append(c.reconciledObjs, &corev1.Secret{})
|
c.reconciledObjs = append(c.reconciledObjs, &corev1.Secret{})
|
||||||
|
|
||||||
if c.informerSynced != nil && len(c.informerSynced) > 0 {
|
if c.informerSynced != nil && len(c.informerSynced) > 0 {
|
||||||
@@ -269,26 +269,26 @@ func (c *Controller) multiClusterSync(ctx context.Context, obj runtime.Object) e
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch obj.(type) {
|
switch obj.(type) {
|
||||||
case *v2.DingTalkConfig:
|
case *v2alpha1.DingTalkConfig:
|
||||||
return c.syncFederatedDingTalkConfig(obj.(*v2.DingTalkConfig))
|
return c.syncFederatedDingTalkConfig(obj.(*v2alpha1.DingTalkConfig))
|
||||||
case *v2.DingTalkReceiver:
|
case *v2alpha1.DingTalkReceiver:
|
||||||
return c.syncFederatedDingTalkReceiver(obj.(*v2.DingTalkReceiver))
|
return c.syncFederatedDingTalkReceiver(obj.(*v2alpha1.DingTalkReceiver))
|
||||||
case *v2.EmailConfig:
|
case *v2alpha1.EmailConfig:
|
||||||
return c.syncFederatedEmailConfig(obj.(*v2.EmailConfig))
|
return c.syncFederatedEmailConfig(obj.(*v2alpha1.EmailConfig))
|
||||||
case *v2.EmailReceiver:
|
case *v2alpha1.EmailReceiver:
|
||||||
return c.syncFederatedEmailReceiver(obj.(*v2.EmailReceiver))
|
return c.syncFederatedEmailReceiver(obj.(*v2alpha1.EmailReceiver))
|
||||||
case *v2.SlackConfig:
|
case *v2alpha1.SlackConfig:
|
||||||
return c.syncFederatedSlackConfig(obj.(*v2.SlackConfig))
|
return c.syncFederatedSlackConfig(obj.(*v2alpha1.SlackConfig))
|
||||||
case *v2.SlackReceiver:
|
case *v2alpha1.SlackReceiver:
|
||||||
return c.syncFederatedSlackReceiver(obj.(*v2.SlackReceiver))
|
return c.syncFederatedSlackReceiver(obj.(*v2alpha1.SlackReceiver))
|
||||||
case *v2.WebhookConfig:
|
case *v2alpha1.WebhookConfig:
|
||||||
return c.syncFederatedWebhookConfig(obj.(*v2.WebhookConfig))
|
return c.syncFederatedWebhookConfig(obj.(*v2alpha1.WebhookConfig))
|
||||||
case *v2.WebhookReceiver:
|
case *v2alpha1.WebhookReceiver:
|
||||||
return c.syncFederatedWebhookReceiver(obj.(*v2.WebhookReceiver))
|
return c.syncFederatedWebhookReceiver(obj.(*v2alpha1.WebhookReceiver))
|
||||||
case *v2.WechatConfig:
|
case *v2alpha1.WechatConfig:
|
||||||
return c.syncFederatedWechatConfig(obj.(*v2.WechatConfig))
|
return c.syncFederatedWechatConfig(obj.(*v2alpha1.WechatConfig))
|
||||||
case *v2.WechatReceiver:
|
case *v2alpha1.WechatReceiver:
|
||||||
return c.syncFederatedWechatReceiver(obj.(*v2.WechatReceiver))
|
return c.syncFederatedWechatReceiver(obj.(*v2alpha1.WechatReceiver))
|
||||||
case *corev1.Secret:
|
case *corev1.Secret:
|
||||||
return c.syncFederatedSecret(obj.(*corev1.Secret))
|
return c.syncFederatedSecret(obj.(*corev1.Secret))
|
||||||
default:
|
default:
|
||||||
@@ -297,7 +297,7 @@ func (c *Controller) multiClusterSync(ctx context.Context, obj runtime.Object) e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedDingTalkConfig(obj *v2.DingTalkConfig) error {
|
func (c *Controller) syncFederatedDingTalkConfig(obj *v2alpha1.DingTalkConfig) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedDingTalkConfig{}
|
fedObj := &v1beta1.FederatedDingTalkConfig{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -353,7 +353,7 @@ func (c *Controller) syncFederatedDingTalkConfig(obj *v2.DingTalkConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedDingTalkReceiver(obj *v2.DingTalkReceiver) error {
|
func (c *Controller) syncFederatedDingTalkReceiver(obj *v2alpha1.DingTalkReceiver) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedDingTalkReceiver{}
|
fedObj := &v1beta1.FederatedDingTalkReceiver{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -409,7 +409,7 @@ func (c *Controller) syncFederatedDingTalkReceiver(obj *v2.DingTalkReceiver) err
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedEmailConfig(obj *v2.EmailConfig) error {
|
func (c *Controller) syncFederatedEmailConfig(obj *v2alpha1.EmailConfig) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedEmailConfig{}
|
fedObj := &v1beta1.FederatedEmailConfig{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -465,7 +465,7 @@ func (c *Controller) syncFederatedEmailConfig(obj *v2.EmailConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedEmailReceiver(obj *v2.EmailReceiver) error {
|
func (c *Controller) syncFederatedEmailReceiver(obj *v2alpha1.EmailReceiver) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedEmailReceiver{}
|
fedObj := &v1beta1.FederatedEmailReceiver{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -521,7 +521,7 @@ func (c *Controller) syncFederatedEmailReceiver(obj *v2.EmailReceiver) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedSlackConfig(obj *v2.SlackConfig) error {
|
func (c *Controller) syncFederatedSlackConfig(obj *v2alpha1.SlackConfig) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedSlackConfig{}
|
fedObj := &v1beta1.FederatedSlackConfig{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -577,7 +577,7 @@ func (c *Controller) syncFederatedSlackConfig(obj *v2.SlackConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedSlackReceiver(obj *v2.SlackReceiver) error {
|
func (c *Controller) syncFederatedSlackReceiver(obj *v2alpha1.SlackReceiver) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedSlackReceiver{}
|
fedObj := &v1beta1.FederatedSlackReceiver{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -633,7 +633,7 @@ func (c *Controller) syncFederatedSlackReceiver(obj *v2.SlackReceiver) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedWebhookConfig(obj *v2.WebhookConfig) error {
|
func (c *Controller) syncFederatedWebhookConfig(obj *v2alpha1.WebhookConfig) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedWebhookConfig{}
|
fedObj := &v1beta1.FederatedWebhookConfig{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -689,7 +689,7 @@ func (c *Controller) syncFederatedWebhookConfig(obj *v2.WebhookConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedWebhookReceiver(obj *v2.WebhookReceiver) error {
|
func (c *Controller) syncFederatedWebhookReceiver(obj *v2alpha1.WebhookReceiver) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedWebhookReceiver{}
|
fedObj := &v1beta1.FederatedWebhookReceiver{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -745,7 +745,7 @@ func (c *Controller) syncFederatedWebhookReceiver(obj *v2.WebhookReceiver) error
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedWechatConfig(obj *v2.WechatConfig) error {
|
func (c *Controller) syncFederatedWechatConfig(obj *v2alpha1.WechatConfig) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedWechatConfig{}
|
fedObj := &v1beta1.FederatedWechatConfig{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
@@ -801,7 +801,7 @@ func (c *Controller) syncFederatedWechatConfig(obj *v2.WechatConfig) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) syncFederatedWechatReceiver(obj *v2.WechatReceiver) error {
|
func (c *Controller) syncFederatedWechatReceiver(obj *v2alpha1.WechatReceiver) error {
|
||||||
|
|
||||||
fedObj := &v1beta1.FederatedWechatReceiver{}
|
fedObj := &v1beta1.FederatedWechatReceiver{}
|
||||||
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
err := c.Get(context.Background(), client.ObjectKey{Name: obj.Name}, fedObj)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
"k8s.io/client-go/kubernetes/fake"
|
"k8s.io/client-go/kubernetes/fake"
|
||||||
"k8s.io/client-go/kubernetes/scheme"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
"kubesphere.io/kubesphere/pkg/apis"
|
"kubesphere.io/kubesphere/pkg/apis"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ var _ = BeforeSuite(func(done Done) {
|
|||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(cfg).ToNot(BeNil())
|
Expect(cfg).ToNot(BeNil())
|
||||||
|
|
||||||
err = v2.AddToScheme(scheme.Scheme)
|
err = v2alpha1.AddToScheme(scheme.Scheme)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|
||||||
err = apis.AddToScheme(scheme.Scheme)
|
err = apis.AddToScheme(scheme.Scheme)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
"kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
||||||
"kubesphere.io/kubesphere/pkg/constants"
|
"kubesphere.io/kubesphere/pkg/constants"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/cache"
|
"sigs.k8s.io/controller-runtime/pkg/cache"
|
||||||
@@ -126,7 +126,7 @@ var (
|
|||||||
const timeout = time.Second * 30
|
const timeout = time.Second * 30
|
||||||
const interval = time.Second * 1
|
const interval = time.Second * 1
|
||||||
|
|
||||||
obj := &v2.DingTalkConfig{
|
obj := &v2alpha1.DingTalkConfig{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: constants.NotificationSecretNamespace,
|
Namespace: constants.NotificationSecretNamespace,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
"kubesphere.io/kubesphere/pkg/api"
|
"kubesphere.io/kubesphere/pkg/api"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
v2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"kubesphere.io/kubesphere/pkg/apiserver/query"
|
"kubesphere.io/kubesphere/pkg/apiserver/query"
|
||||||
kubesphere "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
kubesphere "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||||
"kubesphere.io/kubesphere/pkg/constants"
|
"kubesphere.io/kubesphere/pkg/constants"
|
||||||
@@ -100,26 +100,26 @@ func (o *operator) Create(user, resource string, obj runtime.Object) (runtime.Ob
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch resource {
|
switch resource {
|
||||||
case v2.ResourcesPluralDingTalkConfig:
|
case v2alpha1.ResourcesPluralDingTalkConfig:
|
||||||
return o.ksClient.NotificationV2().DingTalkConfigs().Create(context.Background(), obj.(*v2.DingTalkConfig), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkConfigs().Create(context.Background(), obj.(*v2alpha1.DingTalkConfig), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralDingTalkReceiver:
|
case v2alpha1.ResourcesPluralDingTalkReceiver:
|
||||||
return o.ksClient.NotificationV2().DingTalkReceivers().Create(context.Background(), obj.(*v2.DingTalkReceiver), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkReceivers().Create(context.Background(), obj.(*v2alpha1.DingTalkReceiver), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralEmailConfig:
|
case v2alpha1.ResourcesPluralEmailConfig:
|
||||||
return o.ksClient.NotificationV2().EmailConfigs().Create(context.Background(), obj.(*v2.EmailConfig), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailConfigs().Create(context.Background(), obj.(*v2alpha1.EmailConfig), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralEmailReceiver:
|
case v2alpha1.ResourcesPluralEmailReceiver:
|
||||||
return o.ksClient.NotificationV2().EmailReceivers().Create(context.Background(), obj.(*v2.EmailReceiver), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailReceivers().Create(context.Background(), obj.(*v2alpha1.EmailReceiver), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralSlackConfig:
|
case v2alpha1.ResourcesPluralSlackConfig:
|
||||||
return o.ksClient.NotificationV2().SlackConfigs().Create(context.Background(), obj.(*v2.SlackConfig), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackConfigs().Create(context.Background(), obj.(*v2alpha1.SlackConfig), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralSlackReceiver:
|
case v2alpha1.ResourcesPluralSlackReceiver:
|
||||||
return o.ksClient.NotificationV2().SlackReceivers().Create(context.Background(), obj.(*v2.SlackReceiver), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackReceivers().Create(context.Background(), obj.(*v2alpha1.SlackReceiver), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralWebhookConfig:
|
case v2alpha1.ResourcesPluralWebhookConfig:
|
||||||
return o.ksClient.NotificationV2().WebhookConfigs().Create(context.Background(), obj.(*v2.WebhookConfig), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookConfigs().Create(context.Background(), obj.(*v2alpha1.WebhookConfig), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralWebhookReceiver:
|
case v2alpha1.ResourcesPluralWebhookReceiver:
|
||||||
return o.ksClient.NotificationV2().WebhookReceivers().Create(context.Background(), obj.(*v2.WebhookReceiver), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookReceivers().Create(context.Background(), obj.(*v2alpha1.WebhookReceiver), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralWechatConfig:
|
case v2alpha1.ResourcesPluralWechatConfig:
|
||||||
return o.ksClient.NotificationV2().WechatConfigs().Create(context.Background(), obj.(*v2.WechatConfig), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatConfigs().Create(context.Background(), obj.(*v2alpha1.WechatConfig), v1.CreateOptions{})
|
||||||
case v2.ResourcesPluralWechatReceiver:
|
case v2alpha1.ResourcesPluralWechatReceiver:
|
||||||
return o.ksClient.NotificationV2().WechatReceivers().Create(context.Background(), obj.(*v2.WechatReceiver), v1.CreateOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatReceivers().Create(context.Background(), obj.(*v2alpha1.WechatReceiver), v1.CreateOptions{})
|
||||||
case "secrets":
|
case "secrets":
|
||||||
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Create(context.Background(), obj.(*corev1.Secret), v1.CreateOptions{})
|
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Create(context.Background(), obj.(*corev1.Secret), v1.CreateOptions{})
|
||||||
default:
|
default:
|
||||||
@@ -140,26 +140,26 @@ func (o *operator) Delete(user, resource, name string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch resource {
|
switch resource {
|
||||||
case v2.ResourcesPluralDingTalkConfig:
|
case v2alpha1.ResourcesPluralDingTalkConfig:
|
||||||
return o.ksClient.NotificationV2().DingTalkConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralDingTalkReceiver:
|
case v2alpha1.ResourcesPluralDingTalkReceiver:
|
||||||
return o.ksClient.NotificationV2().DingTalkReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralEmailConfig:
|
case v2alpha1.ResourcesPluralEmailConfig:
|
||||||
return o.ksClient.NotificationV2().EmailConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralEmailReceiver:
|
case v2alpha1.ResourcesPluralEmailReceiver:
|
||||||
return o.ksClient.NotificationV2().EmailReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralSlackConfig:
|
case v2alpha1.ResourcesPluralSlackConfig:
|
||||||
return o.ksClient.NotificationV2().SlackConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralSlackReceiver:
|
case v2alpha1.ResourcesPluralSlackReceiver:
|
||||||
return o.ksClient.NotificationV2().SlackReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralWebhookConfig:
|
case v2alpha1.ResourcesPluralWebhookConfig:
|
||||||
return o.ksClient.NotificationV2().WebhookConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralWebhookReceiver:
|
case v2alpha1.ResourcesPluralWebhookReceiver:
|
||||||
return o.ksClient.NotificationV2().WebhookReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralWechatConfig:
|
case v2alpha1.ResourcesPluralWechatConfig:
|
||||||
return o.ksClient.NotificationV2().WechatConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatConfigs().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case v2.ResourcesPluralWechatReceiver:
|
case v2alpha1.ResourcesPluralWechatReceiver:
|
||||||
return o.ksClient.NotificationV2().WechatReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatReceivers().Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
case "secrets":
|
case "secrets":
|
||||||
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Delete(context.Background(), name, v1.DeleteOptions{})
|
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Delete(context.Background(), name, v1.DeleteOptions{})
|
||||||
default:
|
default:
|
||||||
@@ -184,26 +184,26 @@ func (o *operator) Update(user, resource, name string, obj runtime.Object) (runt
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch resource {
|
switch resource {
|
||||||
case v2.ResourcesPluralDingTalkConfig:
|
case v2alpha1.ResourcesPluralDingTalkConfig:
|
||||||
return o.ksClient.NotificationV2().DingTalkConfigs().Update(context.Background(), obj.(*v2.DingTalkConfig), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkConfigs().Update(context.Background(), obj.(*v2alpha1.DingTalkConfig), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralDingTalkReceiver:
|
case v2alpha1.ResourcesPluralDingTalkReceiver:
|
||||||
return o.ksClient.NotificationV2().DingTalkReceivers().Update(context.Background(), obj.(*v2.DingTalkReceiver), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().DingTalkReceivers().Update(context.Background(), obj.(*v2alpha1.DingTalkReceiver), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralEmailConfig:
|
case v2alpha1.ResourcesPluralEmailConfig:
|
||||||
return o.ksClient.NotificationV2().EmailConfigs().Update(context.Background(), obj.(*v2.EmailConfig), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailConfigs().Update(context.Background(), obj.(*v2alpha1.EmailConfig), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralEmailReceiver:
|
case v2alpha1.ResourcesPluralEmailReceiver:
|
||||||
return o.ksClient.NotificationV2().EmailReceivers().Update(context.Background(), obj.(*v2.EmailReceiver), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().EmailReceivers().Update(context.Background(), obj.(*v2alpha1.EmailReceiver), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralSlackConfig:
|
case v2alpha1.ResourcesPluralSlackConfig:
|
||||||
return o.ksClient.NotificationV2().SlackConfigs().Update(context.Background(), obj.(*v2.SlackConfig), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackConfigs().Update(context.Background(), obj.(*v2alpha1.SlackConfig), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralSlackReceiver:
|
case v2alpha1.ResourcesPluralSlackReceiver:
|
||||||
return o.ksClient.NotificationV2().SlackReceivers().Update(context.Background(), obj.(*v2.SlackReceiver), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().SlackReceivers().Update(context.Background(), obj.(*v2alpha1.SlackReceiver), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralWebhookConfig:
|
case v2alpha1.ResourcesPluralWebhookConfig:
|
||||||
return o.ksClient.NotificationV2().WebhookConfigs().Update(context.Background(), obj.(*v2.WebhookConfig), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookConfigs().Update(context.Background(), obj.(*v2alpha1.WebhookConfig), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralWebhookReceiver:
|
case v2alpha1.ResourcesPluralWebhookReceiver:
|
||||||
return o.ksClient.NotificationV2().WebhookReceivers().Update(context.Background(), obj.(*v2.WebhookReceiver), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().WebhookReceivers().Update(context.Background(), obj.(*v2alpha1.WebhookReceiver), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralWechatConfig:
|
case v2alpha1.ResourcesPluralWechatConfig:
|
||||||
return o.ksClient.NotificationV2().WechatConfigs().Update(context.Background(), obj.(*v2.WechatConfig), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatConfigs().Update(context.Background(), obj.(*v2alpha1.WechatConfig), v1.UpdateOptions{})
|
||||||
case v2.ResourcesPluralWechatReceiver:
|
case v2alpha1.ResourcesPluralWechatReceiver:
|
||||||
return o.ksClient.NotificationV2().WechatReceivers().Update(context.Background(), obj.(*v2.WechatReceiver), v1.UpdateOptions{})
|
return o.ksClient.NotificationV2alpha1().WechatReceivers().Update(context.Background(), obj.(*v2alpha1.WechatReceiver), v1.UpdateOptions{})
|
||||||
case "secrets":
|
case "secrets":
|
||||||
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Update(context.Background(), obj.(*corev1.Secret), v1.UpdateOptions{})
|
return o.k8sClient.CoreV1().Secrets(constants.NotificationSecretNamespace).Update(context.Background(), obj.(*corev1.Secret), v1.UpdateOptions{})
|
||||||
default:
|
default:
|
||||||
@@ -214,26 +214,26 @@ func (o *operator) Update(user, resource, name string, obj runtime.Object) (runt
|
|||||||
func (o *operator) GetObject(resource string) runtime.Object {
|
func (o *operator) GetObject(resource string) runtime.Object {
|
||||||
|
|
||||||
switch resource {
|
switch resource {
|
||||||
case v2.ResourcesPluralDingTalkConfig:
|
case v2alpha1.ResourcesPluralDingTalkConfig:
|
||||||
return &v2.DingTalkConfig{}
|
return &v2alpha1.DingTalkConfig{}
|
||||||
case v2.ResourcesPluralDingTalkReceiver:
|
case v2alpha1.ResourcesPluralDingTalkReceiver:
|
||||||
return &v2.DingTalkReceiver{}
|
return &v2alpha1.DingTalkReceiver{}
|
||||||
case v2.ResourcesPluralEmailConfig:
|
case v2alpha1.ResourcesPluralEmailConfig:
|
||||||
return &v2.EmailConfig{}
|
return &v2alpha1.EmailConfig{}
|
||||||
case v2.ResourcesPluralEmailReceiver:
|
case v2alpha1.ResourcesPluralEmailReceiver:
|
||||||
return &v2.EmailReceiver{}
|
return &v2alpha1.EmailReceiver{}
|
||||||
case v2.ResourcesPluralSlackConfig:
|
case v2alpha1.ResourcesPluralSlackConfig:
|
||||||
return &v2.SlackConfig{}
|
return &v2alpha1.SlackConfig{}
|
||||||
case v2.ResourcesPluralSlackReceiver:
|
case v2alpha1.ResourcesPluralSlackReceiver:
|
||||||
return &v2.SlackReceiver{}
|
return &v2alpha1.SlackReceiver{}
|
||||||
case v2.ResourcesPluralWebhookConfig:
|
case v2alpha1.ResourcesPluralWebhookConfig:
|
||||||
return &v2.WebhookConfig{}
|
return &v2alpha1.WebhookConfig{}
|
||||||
case v2.ResourcesPluralWebhookReceiver:
|
case v2alpha1.ResourcesPluralWebhookReceiver:
|
||||||
return &v2.WebhookReceiver{}
|
return &v2alpha1.WebhookReceiver{}
|
||||||
case v2.ResourcesPluralWechatConfig:
|
case v2alpha1.ResourcesPluralWechatConfig:
|
||||||
return &v2.WechatConfig{}
|
return &v2alpha1.WechatConfig{}
|
||||||
case v2.ResourcesPluralWechatReceiver:
|
case v2alpha1.ResourcesPluralWechatReceiver:
|
||||||
return &v2.WechatReceiver{}
|
return &v2alpha1.WechatReceiver{}
|
||||||
case "secrets":
|
case "secrets":
|
||||||
return &corev1.Secret{}
|
return &corev1.Secret{}
|
||||||
default:
|
default:
|
||||||
@@ -254,13 +254,13 @@ func (o *operator) IsKnownResource(resource string) bool {
|
|||||||
func authorizer(user string, obj runtime.Object) error {
|
func authorizer(user string, obj runtime.Object) error {
|
||||||
// If the user is not nil, it must equal to the tenant specified in labels of the object.
|
// If the user is not nil, it must equal to the tenant specified in labels of the object.
|
||||||
if user != "" && !isOwner(user, obj) {
|
if user != "" && !isOwner(user, obj) {
|
||||||
return errors.NewForbidden(v2.Resource(obj.GetObjectKind().GroupVersionKind().GroupKind().Kind), "",
|
return errors.NewForbidden(v2alpha1.Resource(obj.GetObjectKind().GroupVersionKind().GroupKind().Kind), "",
|
||||||
fmt.Errorf("user '%s' is not the owner of object", user))
|
fmt.Errorf("user '%s' is not the owner of object", user))
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the user is nil, the object must be a global object.
|
// If the user is nil, the object must be a global object.
|
||||||
if user == "" && !isGlobal(obj) {
|
if user == "" && !isGlobal(obj) {
|
||||||
return errors.NewForbidden(v2.Resource(obj.GetObjectKind().GroupVersionKind().GroupKind().Kind), "",
|
return errors.NewForbidden(v2alpha1.Resource(obj.GetObjectKind().GroupVersionKind().GroupKind().Kind), "",
|
||||||
fmt.Errorf("object is not a global object"))
|
fmt.Errorf("object is not a global object"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ func isOwner(user string, obj interface{}) bool {
|
|||||||
|
|
||||||
func isConfig(obj runtime.Object) bool {
|
func isConfig(obj runtime.Object) bool {
|
||||||
switch obj.(type) {
|
switch obj.(type) {
|
||||||
case *v2.DingTalkConfig, *v2.EmailConfig, *v2.SlackConfig, *v2.WebhookConfig, *v2.WechatConfig:
|
case *v2alpha1.DingTalkConfig, *v2alpha1.EmailConfig, *v2alpha1.SlackConfig, *v2alpha1.WebhookConfig, *v2alpha1.WechatConfig:
|
||||||
return true
|
return true
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ func NewDingTalkConfigGetter(informer ksinformers.SharedInformerFactory) v1alpha
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *dingtalkConfigGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *dingtalkConfigGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().DingTalkConfigs().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().DingTalkConfigs().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *dingtalkConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *dingtalkConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().DingTalkConfigs().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().DingTalkConfigs().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -59,11 +59,11 @@ func NewDingTalkReceiverGetter(informer ksinformers.SharedInformerFactory) v1alp
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *dingtalkReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *dingtalkReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().DingTalkReceivers().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().DingTalkReceivers().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *dingtalkReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *dingtalkReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().DingTalkReceivers().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().DingTalkReceivers().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -84,11 +84,11 @@ func NewEmailConfigGetter(informer ksinformers.SharedInformerFactory) v1alpha3.I
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *emailConfigGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *emailConfigGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().EmailConfigs().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().EmailConfigs().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *emailConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *emailConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().EmailConfigs().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().EmailConfigs().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -109,11 +109,11 @@ func NewEmailReceiverGetter(informer ksinformers.SharedInformerFactory) v1alpha3
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *emailReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *emailReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().EmailReceivers().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().EmailReceivers().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *emailReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *emailReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().EmailReceivers().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().EmailReceivers().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -134,11 +134,11 @@ func NewSlackConfigGetter(informer ksinformers.SharedInformerFactory) v1alpha3.I
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *slackConfigGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *slackConfigGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().SlackConfigs().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().SlackConfigs().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *slackConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *slackConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().SlackConfigs().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().SlackConfigs().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -159,11 +159,11 @@ func NewSlackReceiverGetter(informer ksinformers.SharedInformerFactory) v1alpha3
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *slackReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *slackReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().SlackReceivers().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().SlackReceivers().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *slackReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *slackReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().SlackReceivers().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().SlackReceivers().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -184,11 +184,11 @@ func NewWebhookConfigGetter(informer ksinformers.SharedInformerFactory) v1alpha3
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *webhookConfigGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *webhookConfigGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().WebhookConfigs().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().WebhookConfigs().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *webhookConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *webhookConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().WebhookConfigs().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().WebhookConfigs().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -209,11 +209,11 @@ func NewWebhookReceiverGetter(informer ksinformers.SharedInformerFactory) v1alph
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *webhookReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *webhookReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().WebhookReceivers().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().WebhookReceivers().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *webhookReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *webhookReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().WebhookReceivers().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().WebhookReceivers().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -234,11 +234,11 @@ func NewWechatConfigGetter(informer ksinformers.SharedInformerFactory) v1alpha3.
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *wechatConfigGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *wechatConfigGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().WechatConfigs().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().WechatConfigs().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *wechatConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *wechatConfigGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().WechatConfigs().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().WechatConfigs().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -259,11 +259,11 @@ func NewWechatReceiverGetter(informer ksinformers.SharedInformerFactory) v1alpha
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *wechatReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
func (g *wechatReceiverGetter) Get(_, name string) (runtime.Object, error) {
|
||||||
return g.ksInformer.Notification().V2().WechatReceivers().Lister().Get(name)
|
return g.ksInformer.Notification().V2alpha1().WechatReceivers().Lister().Get(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *wechatReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
func (g *wechatReceiverGetter) List(_ string, query *query.Query) (*api.ListResult, error) {
|
||||||
objs, err := g.ksInformer.Notification().V2().WechatReceivers().Lister().List(query.Selector())
|
objs, err := g.ksInformer.Notification().V2alpha1().WechatReceivers().Lister().List(query.Selector())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
"kubesphere.io/kubesphere/pkg/api"
|
"kubesphere.io/kubesphere/pkg/api"
|
||||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
"kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
"kubesphere.io/kubesphere/pkg/apiserver/query"
|
"kubesphere.io/kubesphere/pkg/apiserver/query"
|
||||||
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/fake"
|
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/fake"
|
||||||
ksinformers "kubesphere.io/kubesphere/pkg/client/informers/externalversions"
|
ksinformers "kubesphere.io/kubesphere/pkg/client/informers/externalversions"
|
||||||
@@ -47,43 +47,43 @@ func TestListObjects(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralDingTalkConfig,
|
v2alpha1.ResourcesPluralDingTalkConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralDingTalkReceiver,
|
v2alpha1.ResourcesPluralDingTalkReceiver,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralEmailConfig,
|
v2alpha1.ResourcesPluralEmailConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralEmailReceiver,
|
v2alpha1.ResourcesPluralEmailReceiver,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralSlackConfig,
|
v2alpha1.ResourcesPluralSlackConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralSlackReceiver,
|
v2alpha1.ResourcesPluralSlackReceiver,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralWebhookConfig,
|
v2alpha1.ResourcesPluralWebhookConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralWebhookReceiver,
|
v2alpha1.ResourcesPluralWebhookReceiver,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralWechatConfig,
|
v2alpha1.ResourcesPluralWechatConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"test name filter",
|
"test name filter",
|
||||||
v2.ResourcesPluralWechatReceiver,
|
v2alpha1.ResourcesPluralWechatReceiver,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,48 +128,48 @@ func prepare(key string) (v1alpha3.Interface, []interface{}, error) {
|
|||||||
var indexer cache.Indexer
|
var indexer cache.Indexer
|
||||||
var getter func(informer ksinformers.SharedInformerFactory) v1alpha3.Interface
|
var getter func(informer ksinformers.SharedInformerFactory) v1alpha3.Interface
|
||||||
switch key {
|
switch key {
|
||||||
case v2.ResourcesPluralDingTalkConfig:
|
case v2alpha1.ResourcesPluralDingTalkConfig:
|
||||||
indexer = informer.Notification().V2().DingTalkConfigs().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().DingTalkConfigs().Informer().GetIndexer()
|
||||||
getter = NewDingTalkConfigGetter
|
getter = NewDingTalkConfigGetter
|
||||||
obj = &v2.DingTalkConfig{}
|
obj = &v2alpha1.DingTalkConfig{}
|
||||||
case v2.ResourcesPluralDingTalkReceiver:
|
case v2alpha1.ResourcesPluralDingTalkReceiver:
|
||||||
indexer = informer.Notification().V2().DingTalkReceivers().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().DingTalkReceivers().Informer().GetIndexer()
|
||||||
getter = NewDingTalkReceiverGetter
|
getter = NewDingTalkReceiverGetter
|
||||||
obj = &v2.DingTalkReceiver{}
|
obj = &v2alpha1.DingTalkReceiver{}
|
||||||
case v2.ResourcesPluralEmailConfig:
|
case v2alpha1.ResourcesPluralEmailConfig:
|
||||||
indexer = informer.Notification().V2().EmailConfigs().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().EmailConfigs().Informer().GetIndexer()
|
||||||
getter = NewEmailConfigGetter
|
getter = NewEmailConfigGetter
|
||||||
obj = &v2.EmailConfig{}
|
obj = &v2alpha1.EmailConfig{}
|
||||||
case v2.ResourcesPluralEmailReceiver:
|
case v2alpha1.ResourcesPluralEmailReceiver:
|
||||||
indexer = informer.Notification().V2().EmailReceivers().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().EmailReceivers().Informer().GetIndexer()
|
||||||
getter = NewEmailReceiverGetter
|
getter = NewEmailReceiverGetter
|
||||||
obj = &v2.EmailReceiver{}
|
obj = &v2alpha1.EmailReceiver{}
|
||||||
case v2.ResourcesPluralSlackConfig:
|
case v2alpha1.ResourcesPluralSlackConfig:
|
||||||
indexer = informer.Notification().V2().SlackConfigs().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().SlackConfigs().Informer().GetIndexer()
|
||||||
getter = NewSlackConfigGetter
|
getter = NewSlackConfigGetter
|
||||||
obj = &v2.SlackConfig{}
|
obj = &v2alpha1.SlackConfig{}
|
||||||
case v2.ResourcesPluralSlackReceiver:
|
case v2alpha1.ResourcesPluralSlackReceiver:
|
||||||
indexer = informer.Notification().V2().SlackReceivers().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().SlackReceivers().Informer().GetIndexer()
|
||||||
getter = NewSlackReceiverGetter
|
getter = NewSlackReceiverGetter
|
||||||
obj = &v2.SlackReceiver{}
|
obj = &v2alpha1.SlackReceiver{}
|
||||||
case v2.ResourcesPluralWebhookConfig:
|
case v2alpha1.ResourcesPluralWebhookConfig:
|
||||||
indexer = informer.Notification().V2().WebhookConfigs().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().WebhookConfigs().Informer().GetIndexer()
|
||||||
getter = NewWebhookConfigGetter
|
getter = NewWebhookConfigGetter
|
||||||
obj = &v2.WebhookConfig{}
|
obj = &v2alpha1.WebhookConfig{}
|
||||||
case v2.ResourcesPluralWebhookReceiver:
|
case v2alpha1.ResourcesPluralWebhookReceiver:
|
||||||
indexer = informer.Notification().V2().WebhookReceivers().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().WebhookReceivers().Informer().GetIndexer()
|
||||||
getter = NewWebhookReceiverGetter
|
getter = NewWebhookReceiverGetter
|
||||||
obj = &v2.WebhookReceiver{}
|
obj = &v2alpha1.WebhookReceiver{}
|
||||||
case v2.ResourcesPluralWechatConfig:
|
case v2alpha1.ResourcesPluralWechatConfig:
|
||||||
indexer = informer.Notification().V2().WechatConfigs().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().WechatConfigs().Informer().GetIndexer()
|
||||||
getter = NewWechatConfigGetter
|
getter = NewWechatConfigGetter
|
||||||
obj = &v2.WechatConfig{}
|
obj = &v2alpha1.WechatConfig{}
|
||||||
case v2.ResourcesPluralWechatReceiver:
|
case v2alpha1.ResourcesPluralWechatReceiver:
|
||||||
indexer = informer.Notification().V2().WechatReceivers().Informer().GetIndexer()
|
indexer = informer.Notification().V2alpha1().WechatReceivers().Informer().GetIndexer()
|
||||||
getter = NewWechatReceiverGetter
|
getter = NewWechatReceiverGetter
|
||||||
obj = &v2.WechatReceiver{}
|
obj = &v2alpha1.WechatReceiver{}
|
||||||
default:
|
default:
|
||||||
return nil, nil, errors.New("unkonwed type %s", key)
|
return nil, nil, errors.New("unowned type %s", key)
|
||||||
}
|
}
|
||||||
|
|
||||||
num := rand.Intn(LengthMax)
|
num := rand.Intn(LengthMax)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import (
|
|||||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
notificationv2alpha1 "kubesphere.io/kubesphere/pkg/apis/notification/v2alpha1"
|
||||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||||
tenantv1alpha2 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha2"
|
tenantv1alpha2 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha2"
|
||||||
typesv1beta1 "kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
typesv1beta1 "kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
||||||
@@ -126,16 +126,16 @@ func NewResourceGetter(factory informers.InformerFactory, cache cache.Cache) *Re
|
|||||||
getters[schema.GroupVersionResource{Group: "cluster.kubesphere.io", Version: "v1alpha1", Resource: "clusters"}] = cluster.New(factory.KubeSphereSharedInformerFactory())
|
getters[schema.GroupVersionResource{Group: "cluster.kubesphere.io", Version: "v1alpha1", Resource: "clusters"}] = cluster.New(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"}] = customresourcedefinition.New(factory.ApiExtensionSharedInformerFactory())
|
getters[schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"}] = customresourcedefinition.New(factory.ApiExtensionSharedInformerFactory())
|
||||||
|
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralDingTalkConfig)] = notification.NewDingTalkConfigGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralDingTalkConfig)] = notification.NewDingTalkConfigGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralDingTalkReceiver)] = notification.NewDingTalkReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralDingTalkReceiver)] = notification.NewDingTalkReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralEmailConfig)] = notification.NewEmailConfigGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralEmailConfig)] = notification.NewEmailConfigGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralEmailReceiver)] = notification.NewEmailReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralEmailReceiver)] = notification.NewEmailReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralSlackConfig)] = notification.NewSlackConfigGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralSlackConfig)] = notification.NewSlackConfigGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralSlackReceiver)] = notification.NewSlackReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralSlackReceiver)] = notification.NewSlackReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralWebhookConfig)] = notification.NewWebhookConfigGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralWebhookConfig)] = notification.NewWebhookConfigGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralWebhookReceiver)] = notification.NewWebhookReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralWebhookReceiver)] = notification.NewWebhookReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralWechatConfig)] = notification.NewWechatConfigGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralWechatConfig)] = notification.NewWechatConfigGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
getters[notificationv2.SchemeGroupVersion.WithResource(notificationv2.ResourcesPluralWechatReceiver)] = notification.NewWechatReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
getters[notificationv2alpha1.SchemeGroupVersion.WithResource(notificationv2alpha1.ResourcesPluralWechatReceiver)] = notification.NewWechatReceiverGetter(factory.KubeSphereSharedInformerFactory())
|
||||||
|
|
||||||
// federated resources
|
// federated resources
|
||||||
getters[typesv1beta1.SchemeGroupVersion.WithResource(typesv1beta1.ResourcePluralFederatedNamespace)] = federatednamespace.New(factory.KubeSphereSharedInformerFactory())
|
getters[typesv1beta1.SchemeGroupVersion.WithResource(typesv1beta1.ResourcePluralFederatedNamespace)] = federatednamespace.New(factory.KubeSphereSharedInformerFactory())
|
||||||
|
|||||||
Reference in New Issue
Block a user