1
0
mirror of https://github.com/rancher/types.git synced 2025-06-27 14:06:49 +00:00

generated changes

This commit is contained in:
Craig Jellick 2018-01-31 19:24:26 -07:00
parent b7f233b36c
commit 11a5bafb3e
10 changed files with 0 additions and 876 deletions

View File

@ -191,10 +191,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*GithubConfigApplyInput).DeepCopyInto(out.(*GithubConfigApplyInput))
return nil
}, InType: reflect.TypeOf(&GithubConfigApplyInput{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GithubConfigList).DeepCopyInto(out.(*GithubConfigList))
return nil
}, InType: reflect.TypeOf(&GithubConfigList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GithubConfigTestInput).DeepCopyInto(out.(*GithubConfigTestInput))
return nil
@ -283,10 +279,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*LocalConfig).DeepCopyInto(out.(*LocalConfig))
return nil
}, InType: reflect.TypeOf(&LocalConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LocalConfigList).DeepCopyInto(out.(*LocalConfigList))
return nil
}, InType: reflect.TypeOf(&LocalConfigList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LocalCredential).DeepCopyInto(out.(*LocalCredential))
return nil
@ -1728,40 +1720,6 @@ func (in *GithubConfigApplyInput) DeepCopy() *GithubConfigApplyInput {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GithubConfigList) DeepCopyInto(out *GithubConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]GithubConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubConfigList.
func (in *GithubConfigList) DeepCopy() *GithubConfigList {
if in == nil {
return nil
}
out := new(GithubConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GithubConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GithubConfigTestInput) DeepCopyInto(out *GithubConfigTestInput) {
*out = *in
@ -2344,40 +2302,6 @@ func (in *LocalConfig) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LocalConfigList) DeepCopyInto(out *LocalConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]LocalConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalConfigList.
func (in *LocalConfigList) DeepCopy() *LocalConfigList {
if in == nil {
return nil
}
out := new(LocalConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LocalConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LocalCredential) DeepCopyInto(out *LocalCredential) {
*out = *in

View File

@ -1,251 +0,0 @@
package v3
import (
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
)
var (
GithubConfigGroupVersionKind = schema.GroupVersionKind{
Version: Version,
Group: GroupName,
Kind: "GithubConfig",
}
GithubConfigResource = metav1.APIResource{
Name: "githubconfigs",
SingularName: "githubconfig",
Namespaced: false,
Kind: GithubConfigGroupVersionKind.Kind,
}
)
type GithubConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GithubConfig
}
type GithubConfigHandlerFunc func(key string, obj *GithubConfig) error
type GithubConfigLister interface {
List(namespace string, selector labels.Selector) (ret []*GithubConfig, err error)
Get(namespace, name string) (*GithubConfig, error)
}
type GithubConfigController interface {
Informer() cache.SharedIndexInformer
Lister() GithubConfigLister
AddHandler(name string, handler GithubConfigHandlerFunc)
AddClusterScopedHandler(name, clusterName string, handler GithubConfigHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type GithubConfigInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*GithubConfig) (*GithubConfig, error)
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GithubConfig, error)
Get(name string, opts metav1.GetOptions) (*GithubConfig, error)
Update(*GithubConfig) (*GithubConfig, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*GithubConfigList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() GithubConfigController
AddHandler(name string, sync GithubConfigHandlerFunc)
AddLifecycle(name string, lifecycle GithubConfigLifecycle)
AddClusterScopedHandler(name, clusterName string, sync GithubConfigHandlerFunc)
AddClusterScopedLifecycle(name, clusterName string, lifecycle GithubConfigLifecycle)
}
type githubConfigLister struct {
controller *githubConfigController
}
func (l *githubConfigLister) List(namespace string, selector labels.Selector) (ret []*GithubConfig, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*GithubConfig))
})
return
}
func (l *githubConfigLister) Get(namespace, name string) (*GithubConfig, error) {
var key string
if namespace != "" {
key = namespace + "/" + name
} else {
key = name
}
obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: GithubConfigGroupVersionKind.Group,
Resource: "githubConfig",
}, name)
}
return obj.(*GithubConfig), nil
}
type githubConfigController struct {
controller.GenericController
}
func (c *githubConfigController) Lister() GithubConfigLister {
return &githubConfigLister{
controller: c,
}
}
func (c *githubConfigController) AddHandler(name string, handler GithubConfigHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
return handler(key, obj.(*GithubConfig))
})
}
func (c *githubConfigController) AddClusterScopedHandler(name, cluster string, handler GithubConfigHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
if !controller.ObjectInCluster(cluster, obj) {
return nil
}
return handler(key, obj.(*GithubConfig))
})
}
type githubConfigFactory struct {
}
func (c githubConfigFactory) Object() runtime.Object {
return &GithubConfig{}
}
func (c githubConfigFactory) List() runtime.Object {
return &GithubConfigList{}
}
func (s *githubConfigClient) Controller() GithubConfigController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.githubConfigControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(GithubConfigGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &githubConfigController{
GenericController: genericController,
}
s.client.githubConfigControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type githubConfigClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller GithubConfigController
}
func (s *githubConfigClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *githubConfigClient) Create(o *GithubConfig) (*GithubConfig, error) {
obj, err := s.objectClient.Create(o)
return obj.(*GithubConfig), err
}
func (s *githubConfigClient) Get(name string, opts metav1.GetOptions) (*GithubConfig, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*GithubConfig), err
}
func (s *githubConfigClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GithubConfig, error) {
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
return obj.(*GithubConfig), err
}
func (s *githubConfigClient) Update(o *GithubConfig) (*GithubConfig, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*GithubConfig), err
}
func (s *githubConfigClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *githubConfigClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *githubConfigClient) List(opts metav1.ListOptions) (*GithubConfigList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*GithubConfigList), err
}
func (s *githubConfigClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
// Patch applies the patch and returns the patched deployment.
func (s *githubConfigClient) Patch(o *GithubConfig, data []byte, subresources ...string) (*GithubConfig, error) {
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
return obj.(*GithubConfig), err
}
func (s *githubConfigClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}
func (s *githubConfigClient) AddHandler(name string, sync GithubConfigHandlerFunc) {
s.Controller().AddHandler(name, sync)
}
func (s *githubConfigClient) AddLifecycle(name string, lifecycle GithubConfigLifecycle) {
sync := NewGithubConfigLifecycleAdapter(name, false, s, lifecycle)
s.AddHandler(name, sync)
}
func (s *githubConfigClient) AddClusterScopedHandler(name, clusterName string, sync GithubConfigHandlerFunc) {
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
}
func (s *githubConfigClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle GithubConfigLifecycle) {
sync := NewGithubConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
s.AddClusterScopedHandler(name, clusterName, sync)
}

View File

@ -1,51 +0,0 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type GithubConfigLifecycle interface {
Create(obj *GithubConfig) (*GithubConfig, error)
Remove(obj *GithubConfig) (*GithubConfig, error)
Updated(obj *GithubConfig) (*GithubConfig, error)
}
type githubConfigLifecycleAdapter struct {
lifecycle GithubConfigLifecycle
}
func (w *githubConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*GithubConfig))
if o == nil {
return nil, err
}
return o, err
}
func (w *githubConfigLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*GithubConfig))
if o == nil {
return nil, err
}
return o, err
}
func (w *githubConfigLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*GithubConfig))
if o == nil {
return nil, err
}
return o, err
}
func NewGithubConfigLifecycleAdapter(name string, clusterScoped bool, client GithubConfigInterface, l GithubConfigLifecycle) GithubConfigHandlerFunc {
adapter := &githubConfigLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
return func(key string, obj *GithubConfig) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@ -35,8 +35,6 @@ type Interface interface {
PrincipalsGetter
UsersGetter
AuthConfigsGetter
GithubConfigsGetter
LocalConfigsGetter
TokensGetter
DynamicSchemasGetter
StacksGetter
@ -73,8 +71,6 @@ type Client struct {
principalControllers map[string]PrincipalController
userControllers map[string]UserController
authConfigControllers map[string]AuthConfigController
githubConfigControllers map[string]GithubConfigController
localConfigControllers map[string]LocalConfigController
tokenControllers map[string]TokenController
dynamicSchemaControllers map[string]DynamicSchemaController
stackControllers map[string]StackController
@ -120,8 +116,6 @@ func NewForConfig(config rest.Config) (Interface, error) {
principalControllers: map[string]PrincipalController{},
userControllers: map[string]UserController{},
authConfigControllers: map[string]AuthConfigController{},
githubConfigControllers: map[string]GithubConfigController{},
localConfigControllers: map[string]LocalConfigController{},
tokenControllers: map[string]TokenController{},
dynamicSchemaControllers: map[string]DynamicSchemaController{},
stackControllers: map[string]StackController{},
@ -418,32 +412,6 @@ func (c *Client) AuthConfigs(namespace string) AuthConfigInterface {
}
}
type GithubConfigsGetter interface {
GithubConfigs(namespace string) GithubConfigInterface
}
func (c *Client) GithubConfigs(namespace string) GithubConfigInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &GithubConfigResource, GithubConfigGroupVersionKind, githubConfigFactory{})
return &githubConfigClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type LocalConfigsGetter interface {
LocalConfigs(namespace string) LocalConfigInterface
}
func (c *Client) LocalConfigs(namespace string) LocalConfigInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &LocalConfigResource, LocalConfigGroupVersionKind, localConfigFactory{})
return &localConfigClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type TokensGetter interface {
Tokens(namespace string) TokenInterface
}

View File

@ -1,251 +0,0 @@
package v3
import (
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
)
var (
LocalConfigGroupVersionKind = schema.GroupVersionKind{
Version: Version,
Group: GroupName,
Kind: "LocalConfig",
}
LocalConfigResource = metav1.APIResource{
Name: "localconfigs",
SingularName: "localconfig",
Namespaced: false,
Kind: LocalConfigGroupVersionKind.Kind,
}
)
type LocalConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LocalConfig
}
type LocalConfigHandlerFunc func(key string, obj *LocalConfig) error
type LocalConfigLister interface {
List(namespace string, selector labels.Selector) (ret []*LocalConfig, err error)
Get(namespace, name string) (*LocalConfig, error)
}
type LocalConfigController interface {
Informer() cache.SharedIndexInformer
Lister() LocalConfigLister
AddHandler(name string, handler LocalConfigHandlerFunc)
AddClusterScopedHandler(name, clusterName string, handler LocalConfigHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type LocalConfigInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*LocalConfig) (*LocalConfig, error)
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*LocalConfig, error)
Get(name string, opts metav1.GetOptions) (*LocalConfig, error)
Update(*LocalConfig) (*LocalConfig, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*LocalConfigList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() LocalConfigController
AddHandler(name string, sync LocalConfigHandlerFunc)
AddLifecycle(name string, lifecycle LocalConfigLifecycle)
AddClusterScopedHandler(name, clusterName string, sync LocalConfigHandlerFunc)
AddClusterScopedLifecycle(name, clusterName string, lifecycle LocalConfigLifecycle)
}
type localConfigLister struct {
controller *localConfigController
}
func (l *localConfigLister) List(namespace string, selector labels.Selector) (ret []*LocalConfig, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*LocalConfig))
})
return
}
func (l *localConfigLister) Get(namespace, name string) (*LocalConfig, error) {
var key string
if namespace != "" {
key = namespace + "/" + name
} else {
key = name
}
obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: LocalConfigGroupVersionKind.Group,
Resource: "localConfig",
}, name)
}
return obj.(*LocalConfig), nil
}
type localConfigController struct {
controller.GenericController
}
func (c *localConfigController) Lister() LocalConfigLister {
return &localConfigLister{
controller: c,
}
}
func (c *localConfigController) AddHandler(name string, handler LocalConfigHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
return handler(key, obj.(*LocalConfig))
})
}
func (c *localConfigController) AddClusterScopedHandler(name, cluster string, handler LocalConfigHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
if !controller.ObjectInCluster(cluster, obj) {
return nil
}
return handler(key, obj.(*LocalConfig))
})
}
type localConfigFactory struct {
}
func (c localConfigFactory) Object() runtime.Object {
return &LocalConfig{}
}
func (c localConfigFactory) List() runtime.Object {
return &LocalConfigList{}
}
func (s *localConfigClient) Controller() LocalConfigController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.localConfigControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(LocalConfigGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &localConfigController{
GenericController: genericController,
}
s.client.localConfigControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type localConfigClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller LocalConfigController
}
func (s *localConfigClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *localConfigClient) Create(o *LocalConfig) (*LocalConfig, error) {
obj, err := s.objectClient.Create(o)
return obj.(*LocalConfig), err
}
func (s *localConfigClient) Get(name string, opts metav1.GetOptions) (*LocalConfig, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*LocalConfig), err
}
func (s *localConfigClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*LocalConfig, error) {
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
return obj.(*LocalConfig), err
}
func (s *localConfigClient) Update(o *LocalConfig) (*LocalConfig, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*LocalConfig), err
}
func (s *localConfigClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *localConfigClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *localConfigClient) List(opts metav1.ListOptions) (*LocalConfigList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*LocalConfigList), err
}
func (s *localConfigClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
// Patch applies the patch and returns the patched deployment.
func (s *localConfigClient) Patch(o *LocalConfig, data []byte, subresources ...string) (*LocalConfig, error) {
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
return obj.(*LocalConfig), err
}
func (s *localConfigClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}
func (s *localConfigClient) AddHandler(name string, sync LocalConfigHandlerFunc) {
s.Controller().AddHandler(name, sync)
}
func (s *localConfigClient) AddLifecycle(name string, lifecycle LocalConfigLifecycle) {
sync := NewLocalConfigLifecycleAdapter(name, false, s, lifecycle)
s.AddHandler(name, sync)
}
func (s *localConfigClient) AddClusterScopedHandler(name, clusterName string, sync LocalConfigHandlerFunc) {
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
}
func (s *localConfigClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle LocalConfigLifecycle) {
sync := NewLocalConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
s.AddClusterScopedHandler(name, clusterName, sync)
}

View File

@ -1,51 +0,0 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type LocalConfigLifecycle interface {
Create(obj *LocalConfig) (*LocalConfig, error)
Remove(obj *LocalConfig) (*LocalConfig, error)
Updated(obj *LocalConfig) (*LocalConfig, error)
}
type localConfigLifecycleAdapter struct {
lifecycle LocalConfigLifecycle
}
func (w *localConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*LocalConfig))
if o == nil {
return nil, err
}
return o, err
}
func (w *localConfigLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*LocalConfig))
if o == nil {
return nil, err
}
return o, err
}
func (w *localConfigLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*LocalConfig))
if o == nil {
return nil, err
}
return o, err
}
func NewLocalConfigLifecycleAdapter(name string, clusterScoped bool, client LocalConfigInterface, l LocalConfigLifecycle) LocalConfigHandlerFunc {
adapter := &localConfigLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
return func(key string, obj *LocalConfig) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@ -75,10 +75,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&UserList{},
&AuthConfig{},
&AuthConfigList{},
&GithubConfig{},
&GithubConfigList{},
&LocalConfig{},
&LocalConfigList{},
&Token{},
&TokenList{},
&DynamicSchema{},

View File

@ -29,8 +29,6 @@ type Client struct {
Principal PrincipalOperations
User UserOperations
AuthConfig AuthConfigOperations
GithubConfig GithubConfigOperations
LocalConfig LocalConfigOperations
Token TokenOperations
DynamicSchema DynamicSchemaOperations
Stack StackOperations
@ -73,8 +71,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
client.Principal = newPrincipalClient(client)
client.User = newUserClient(client)
client.AuthConfig = newAuthConfigClient(client)
client.GithubConfig = newGithubConfigClient(client)
client.LocalConfig = newLocalConfigClient(client)
client.Token = newTokenClient(client)
client.DynamicSchema = newDynamicSchemaClient(client)
client.Stack = newStackClient(client)

View File

@ -1,9 +1,5 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
GithubConfigType = "githubConfig"
GithubConfigFieldAnnotations = "annotations"
@ -23,7 +19,6 @@ const (
)
type GithubConfig struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
ClientID string `json:"clientId,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
@ -39,87 +34,3 @@ type GithubConfig struct {
Type string `json:"type,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type GithubConfigCollection struct {
types.Collection
Data []GithubConfig `json:"data,omitempty"`
client *GithubConfigClient
}
type GithubConfigClient struct {
apiClient *Client
}
type GithubConfigOperations interface {
List(opts *types.ListOpts) (*GithubConfigCollection, error)
Create(opts *GithubConfig) (*GithubConfig, error)
Update(existing *GithubConfig, updates interface{}) (*GithubConfig, error)
ByID(id string) (*GithubConfig, error)
Delete(container *GithubConfig) error
ActionConfigureTest(*GithubConfig, *GithubConfigTestInput) (*GithubConfig, error)
ActionTestAndApply(*GithubConfig, *GithubConfigApplyInput) (*GithubConfig, error)
}
func newGithubConfigClient(apiClient *Client) *GithubConfigClient {
return &GithubConfigClient{
apiClient: apiClient,
}
}
func (c *GithubConfigClient) Create(container *GithubConfig) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoCreate(GithubConfigType, container, resp)
return resp, err
}
func (c *GithubConfigClient) Update(existing *GithubConfig, updates interface{}) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoUpdate(GithubConfigType, &existing.Resource, updates, resp)
return resp, err
}
func (c *GithubConfigClient) List(opts *types.ListOpts) (*GithubConfigCollection, error) {
resp := &GithubConfigCollection{}
err := c.apiClient.Ops.DoList(GithubConfigType, opts, resp)
resp.client = c
return resp, err
}
func (cc *GithubConfigCollection) Next() (*GithubConfigCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &GithubConfigCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *GithubConfigClient) ByID(id string) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoByID(GithubConfigType, id, resp)
return resp, err
}
func (c *GithubConfigClient) Delete(container *GithubConfig) error {
return c.apiClient.Ops.DoResourceDelete(GithubConfigType, &container.Resource)
}
func (c *GithubConfigClient) ActionConfigureTest(resource *GithubConfig, input *GithubConfigTestInput) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoAction(GithubConfigType, "configureTest", &resource.Resource, input, resp)
return resp, err
}
func (c *GithubConfigClient) ActionTestAndApply(resource *GithubConfig, input *GithubConfigApplyInput) (*GithubConfig, error) {
resp := &GithubConfig{}
err := c.apiClient.Ops.DoAction(GithubConfigType, "testAndApply", &resource.Resource, input, resp)
return resp, err
}

View File

@ -1,9 +1,5 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
LocalConfigType = "localConfig"
LocalConfigFieldAnnotations = "annotations"
@ -17,7 +13,6 @@ const (
)
type LocalConfig struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
Created string `json:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty"`
@ -27,65 +22,3 @@ type LocalConfig struct {
Removed string `json:"removed,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type LocalConfigCollection struct {
types.Collection
Data []LocalConfig `json:"data,omitempty"`
client *LocalConfigClient
}
type LocalConfigClient struct {
apiClient *Client
}
type LocalConfigOperations interface {
List(opts *types.ListOpts) (*LocalConfigCollection, error)
Create(opts *LocalConfig) (*LocalConfig, error)
Update(existing *LocalConfig, updates interface{}) (*LocalConfig, error)
ByID(id string) (*LocalConfig, error)
Delete(container *LocalConfig) error
}
func newLocalConfigClient(apiClient *Client) *LocalConfigClient {
return &LocalConfigClient{
apiClient: apiClient,
}
}
func (c *LocalConfigClient) Create(container *LocalConfig) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoCreate(LocalConfigType, container, resp)
return resp, err
}
func (c *LocalConfigClient) Update(existing *LocalConfig, updates interface{}) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoUpdate(LocalConfigType, &existing.Resource, updates, resp)
return resp, err
}
func (c *LocalConfigClient) List(opts *types.ListOpts) (*LocalConfigCollection, error) {
resp := &LocalConfigCollection{}
err := c.apiClient.Ops.DoList(LocalConfigType, opts, resp)
resp.client = c
return resp, err
}
func (cc *LocalConfigCollection) Next() (*LocalConfigCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &LocalConfigCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *LocalConfigClient) ByID(id string) (*LocalConfig, error) {
resp := &LocalConfig{}
err := c.apiClient.Ops.DoByID(LocalConfigType, id, resp)
return resp, err
}
func (c *LocalConfigClient) Delete(container *LocalConfig) error {
return c.apiClient.Ops.DoResourceDelete(LocalConfigType, &container.Resource)
}