1
0
mirror of https://github.com/rancher/types.git synced 2025-09-26 20:52:57 +00:00

Generate types

This commit is contained in:
Dax McDonald
2019-08-16 16:46:31 -07:00
committed by Craig Jellick
parent 8daa5dae5d
commit cf412afc1a
218 changed files with 436 additions and 109 deletions

View File

@@ -150,7 +150,6 @@ func (c *clusterAuthTokenController) AddHandler(ctx context.Context, name string
}
func (c *clusterAuthTokenController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ClusterAuthTokenHandlerFunc) {
resource.PutClusterScoped(ClusterAuthTokenGroupVersionResource)
c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
if obj == nil {
return handler(key, nil)

View File

@@ -2,6 +2,7 @@ package v3
import (
"github.com/rancher/norman/lifecycle"
"github.com/rancher/norman/resource"
"k8s.io/apimachinery/pkg/runtime"
)
@@ -50,6 +51,9 @@ func (w *clusterAuthTokenLifecycleAdapter) Updated(obj runtime.Object) (runtime.
}
func NewClusterAuthTokenLifecycleAdapter(name string, clusterScoped bool, client ClusterAuthTokenInterface, l ClusterAuthTokenLifecycle) ClusterAuthTokenHandlerFunc {
if clusterScoped {
resource.PutClusterScoped(ClusterAuthTokenGroupVersionResource)
}
adapter := &clusterAuthTokenLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
return func(key string, obj *ClusterAuthToken) (runtime.Object, error) {

View File

@@ -150,7 +150,6 @@ func (c *clusterUserAttributeController) AddHandler(ctx context.Context, name st
}
func (c *clusterUserAttributeController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ClusterUserAttributeHandlerFunc) {
resource.PutClusterScoped(ClusterUserAttributeGroupVersionResource)
c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
if obj == nil {
return handler(key, nil)

View File

@@ -2,6 +2,7 @@ package v3
import (
"github.com/rancher/norman/lifecycle"
"github.com/rancher/norman/resource"
"k8s.io/apimachinery/pkg/runtime"
)
@@ -50,6 +51,9 @@ func (w *clusterUserAttributeLifecycleAdapter) Updated(obj runtime.Object) (runt
}
func NewClusterUserAttributeLifecycleAdapter(name string, clusterScoped bool, client ClusterUserAttributeInterface, l ClusterUserAttributeLifecycle) ClusterUserAttributeHandlerFunc {
if clusterScoped {
resource.PutClusterScoped(ClusterUserAttributeGroupVersionResource)
}
adapter := &clusterUserAttributeLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
return func(key string, obj *ClusterUserAttribute) (runtime.Object, error) {