1
0
mirror of https://github.com/rancher/types.git synced 2025-09-12 13:03:45 +00:00

Update generated code

This commit is contained in:
Darren Shepherd
2017-12-13 08:49:28 -07:00
parent 50ff898c3e
commit e019d5ae40
14 changed files with 16 additions and 1156 deletions

View File

@@ -883,8 +883,6 @@ func (in *Filter) DeepCopy() *Filter {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GithubCredential) DeepCopyInto(out *GithubCredential) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
return
}
@@ -898,49 +896,6 @@ func (in *GithubCredential) DeepCopy() *GithubCredential {
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GithubCredential) 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 *GithubCredentialList) DeepCopyInto(out *GithubCredentialList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]GithubCredential, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubCredentialList.
func (in *GithubCredentialList) DeepCopy() *GithubCredentialList {
if in == nil {
return nil
}
out := new(GithubCredentialList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GithubCredentialList) 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 *GoogleKubernetesEngineConfig) DeepCopyInto(out *GoogleKubernetesEngineConfig) {
*out = *in
@@ -1253,8 +1208,6 @@ func (in *ListOpts) DeepCopy() *ListOpts {
// 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
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
return
}
@@ -1268,56 +1221,11 @@ func (in *LocalCredential) DeepCopy() *LocalCredential {
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LocalCredential) 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 *LocalCredentialList) DeepCopyInto(out *LocalCredentialList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]LocalCredential, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalCredentialList.
func (in *LocalCredentialList) DeepCopy() *LocalCredentialList {
if in == nil {
return nil
}
out := new(LocalCredentialList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LocalCredentialList) 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 *LoginInput) DeepCopyInto(out *LoginInput) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.LocalCredential.DeepCopyInto(&out.LocalCredential)
in.GithubCredential.DeepCopyInto(&out.GithubCredential)
out.LocalCredential = in.LocalCredential
out.GithubCredential = in.GithubCredential
return
}
@@ -1331,49 +1239,6 @@ func (in *LoginInput) DeepCopy() *LoginInput {
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LoginInput) 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 *LoginInputList) DeepCopyInto(out *LoginInputList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]LoginInput, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginInputList.
func (in *LoginInputList) DeepCopy() *LoginInputList {
if in == nil {
return nil
}
out := new(LoginInputList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LoginInputList) 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 *Machine) DeepCopyInto(out *Machine) {
*out = *in

View File

@@ -1,193 +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 (
GithubCredentialGroupVersionKind = schema.GroupVersionKind{
Version: "v3",
Group: "management.cattle.io",
Kind: "GithubCredential",
}
GithubCredentialResource = metav1.APIResource{
Name: "githubcredentials",
SingularName: "githubcredential",
Namespaced: false,
Kind: GithubCredentialGroupVersionKind.Kind,
}
)
type GithubCredentialList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []GithubCredential
}
type GithubCredentialHandlerFunc func(key string, obj *GithubCredential) error
type GithubCredentialLister interface {
List(namespace string, selector labels.Selector) (ret []*GithubCredential, err error)
Get(namespace, name string) (*GithubCredential, error)
}
type GithubCredentialController interface {
Informer() cache.SharedIndexInformer
Lister() GithubCredentialLister
AddHandler(handler GithubCredentialHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type GithubCredentialInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*GithubCredential) (*GithubCredential, error)
Get(name string, opts metav1.GetOptions) (*GithubCredential, error)
Update(*GithubCredential) (*GithubCredential, error)
Delete(name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*GithubCredentialList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() GithubCredentialController
}
type githubCredentialLister struct {
controller *githubCredentialController
}
func (l *githubCredentialLister) List(namespace string, selector labels.Selector) (ret []*GithubCredential, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*GithubCredential))
})
return
}
func (l *githubCredentialLister) Get(namespace, name string) (*GithubCredential, 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: GithubCredentialGroupVersionKind.Group,
Resource: "githubCredential",
}, name)
}
return obj.(*GithubCredential), nil
}
type githubCredentialController struct {
controller.GenericController
}
func (c *githubCredentialController) Lister() GithubCredentialLister {
return &githubCredentialLister{
controller: c,
}
}
func (c *githubCredentialController) AddHandler(handler GithubCredentialHandlerFunc) {
c.GenericController.AddHandler(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.(*GithubCredential))
})
}
type githubCredentialFactory struct {
}
func (c githubCredentialFactory) Object() runtime.Object {
return &GithubCredential{}
}
func (c githubCredentialFactory) List() runtime.Object {
return &GithubCredentialList{}
}
func (s *githubCredentialClient) Controller() GithubCredentialController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.githubCredentialControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(GithubCredentialGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &githubCredentialController{
GenericController: genericController,
}
s.client.githubCredentialControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type githubCredentialClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller GithubCredentialController
}
func (s *githubCredentialClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *githubCredentialClient) Create(o *GithubCredential) (*GithubCredential, error) {
obj, err := s.objectClient.Create(o)
return obj.(*GithubCredential), err
}
func (s *githubCredentialClient) Get(name string, opts metav1.GetOptions) (*GithubCredential, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*GithubCredential), err
}
func (s *githubCredentialClient) Update(o *GithubCredential) (*GithubCredential, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*GithubCredential), err
}
func (s *githubCredentialClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *githubCredentialClient) List(opts metav1.ListOptions) (*GithubCredentialList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*GithubCredentialList), err
}
func (s *githubCredentialClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
func (s *githubCredentialClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}

View File

@@ -1,39 +0,0 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type GithubCredentialLifecycle interface {
Create(obj *GithubCredential) error
Remove(obj *GithubCredential) error
Updated(obj *GithubCredential) error
}
type githubCredentialLifecycleAdapter struct {
lifecycle GithubCredentialLifecycle
}
func (w *githubCredentialLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*GithubCredential))
}
func (w *githubCredentialLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*GithubCredential))
}
func (w *githubCredentialLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*GithubCredential))
}
func NewGithubCredentialLifecycleAdapter(name string, client GithubCredentialInterface, l GithubCredentialLifecycle) GithubCredentialHandlerFunc {
adapter := &githubCredentialLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
return func(key string, obj *GithubCredential) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@@ -33,9 +33,6 @@ type Interface interface {
GroupsGetter
GroupMembersGetter
IdentitiesGetter
LocalCredentialsGetter
GithubCredentialsGetter
LoginInputsGetter
DynamicSchemasGetter
}
@@ -63,9 +60,6 @@ type Client struct {
groupControllers map[string]GroupController
groupMemberControllers map[string]GroupMemberController
identityControllers map[string]IdentityController
localCredentialControllers map[string]LocalCredentialController
githubCredentialControllers map[string]GithubCredentialController
loginInputControllers map[string]LoginInputController
dynamicSchemaControllers map[string]DynamicSchemaController
}
@@ -102,9 +96,6 @@ func NewForConfig(config rest.Config) (Interface, error) {
groupControllers: map[string]GroupController{},
groupMemberControllers: map[string]GroupMemberController{},
identityControllers: map[string]IdentityController{},
localCredentialControllers: map[string]LocalCredentialController{},
githubCredentialControllers: map[string]GithubCredentialController{},
loginInputControllers: map[string]LoginInputController{},
dynamicSchemaControllers: map[string]DynamicSchemaController{},
}, nil
}
@@ -368,45 +359,6 @@ func (c *Client) Identities(namespace string) IdentityInterface {
}
}
type LocalCredentialsGetter interface {
LocalCredentials(namespace string) LocalCredentialInterface
}
func (c *Client) LocalCredentials(namespace string) LocalCredentialInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &LocalCredentialResource, LocalCredentialGroupVersionKind, localCredentialFactory{})
return &localCredentialClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type GithubCredentialsGetter interface {
GithubCredentials(namespace string) GithubCredentialInterface
}
func (c *Client) GithubCredentials(namespace string) GithubCredentialInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &GithubCredentialResource, GithubCredentialGroupVersionKind, githubCredentialFactory{})
return &githubCredentialClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type LoginInputsGetter interface {
LoginInputs(namespace string) LoginInputInterface
}
func (c *Client) LoginInputs(namespace string) LoginInputInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &LoginInputResource, LoginInputGroupVersionKind, loginInputFactory{})
return &loginInputClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type DynamicSchemasGetter interface {
DynamicSchemas(namespace string) DynamicSchemaInterface
}

View File

@@ -1,193 +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 (
LocalCredentialGroupVersionKind = schema.GroupVersionKind{
Version: "v3",
Group: "management.cattle.io",
Kind: "LocalCredential",
}
LocalCredentialResource = metav1.APIResource{
Name: "localcredentials",
SingularName: "localcredential",
Namespaced: false,
Kind: LocalCredentialGroupVersionKind.Kind,
}
)
type LocalCredentialList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LocalCredential
}
type LocalCredentialHandlerFunc func(key string, obj *LocalCredential) error
type LocalCredentialLister interface {
List(namespace string, selector labels.Selector) (ret []*LocalCredential, err error)
Get(namespace, name string) (*LocalCredential, error)
}
type LocalCredentialController interface {
Informer() cache.SharedIndexInformer
Lister() LocalCredentialLister
AddHandler(handler LocalCredentialHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type LocalCredentialInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*LocalCredential) (*LocalCredential, error)
Get(name string, opts metav1.GetOptions) (*LocalCredential, error)
Update(*LocalCredential) (*LocalCredential, error)
Delete(name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*LocalCredentialList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() LocalCredentialController
}
type localCredentialLister struct {
controller *localCredentialController
}
func (l *localCredentialLister) List(namespace string, selector labels.Selector) (ret []*LocalCredential, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*LocalCredential))
})
return
}
func (l *localCredentialLister) Get(namespace, name string) (*LocalCredential, 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: LocalCredentialGroupVersionKind.Group,
Resource: "localCredential",
}, name)
}
return obj.(*LocalCredential), nil
}
type localCredentialController struct {
controller.GenericController
}
func (c *localCredentialController) Lister() LocalCredentialLister {
return &localCredentialLister{
controller: c,
}
}
func (c *localCredentialController) AddHandler(handler LocalCredentialHandlerFunc) {
c.GenericController.AddHandler(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.(*LocalCredential))
})
}
type localCredentialFactory struct {
}
func (c localCredentialFactory) Object() runtime.Object {
return &LocalCredential{}
}
func (c localCredentialFactory) List() runtime.Object {
return &LocalCredentialList{}
}
func (s *localCredentialClient) Controller() LocalCredentialController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.localCredentialControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(LocalCredentialGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &localCredentialController{
GenericController: genericController,
}
s.client.localCredentialControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type localCredentialClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller LocalCredentialController
}
func (s *localCredentialClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *localCredentialClient) Create(o *LocalCredential) (*LocalCredential, error) {
obj, err := s.objectClient.Create(o)
return obj.(*LocalCredential), err
}
func (s *localCredentialClient) Get(name string, opts metav1.GetOptions) (*LocalCredential, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*LocalCredential), err
}
func (s *localCredentialClient) Update(o *LocalCredential) (*LocalCredential, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*LocalCredential), err
}
func (s *localCredentialClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *localCredentialClient) List(opts metav1.ListOptions) (*LocalCredentialList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*LocalCredentialList), err
}
func (s *localCredentialClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
func (s *localCredentialClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}

View File

@@ -1,39 +0,0 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type LocalCredentialLifecycle interface {
Create(obj *LocalCredential) error
Remove(obj *LocalCredential) error
Updated(obj *LocalCredential) error
}
type localCredentialLifecycleAdapter struct {
lifecycle LocalCredentialLifecycle
}
func (w *localCredentialLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*LocalCredential))
}
func (w *localCredentialLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*LocalCredential))
}
func (w *localCredentialLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*LocalCredential))
}
func NewLocalCredentialLifecycleAdapter(name string, client LocalCredentialInterface, l LocalCredentialLifecycle) LocalCredentialHandlerFunc {
adapter := &localCredentialLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
return func(key string, obj *LocalCredential) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@@ -1,193 +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 (
LoginInputGroupVersionKind = schema.GroupVersionKind{
Version: "v3",
Group: "management.cattle.io",
Kind: "LoginInput",
}
LoginInputResource = metav1.APIResource{
Name: "logininputs",
SingularName: "logininput",
Namespaced: false,
Kind: LoginInputGroupVersionKind.Kind,
}
)
type LoginInputList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LoginInput
}
type LoginInputHandlerFunc func(key string, obj *LoginInput) error
type LoginInputLister interface {
List(namespace string, selector labels.Selector) (ret []*LoginInput, err error)
Get(namespace, name string) (*LoginInput, error)
}
type LoginInputController interface {
Informer() cache.SharedIndexInformer
Lister() LoginInputLister
AddHandler(handler LoginInputHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type LoginInputInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*LoginInput) (*LoginInput, error)
Get(name string, opts metav1.GetOptions) (*LoginInput, error)
Update(*LoginInput) (*LoginInput, error)
Delete(name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*LoginInputList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() LoginInputController
}
type loginInputLister struct {
controller *loginInputController
}
func (l *loginInputLister) List(namespace string, selector labels.Selector) (ret []*LoginInput, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*LoginInput))
})
return
}
func (l *loginInputLister) Get(namespace, name string) (*LoginInput, 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: LoginInputGroupVersionKind.Group,
Resource: "loginInput",
}, name)
}
return obj.(*LoginInput), nil
}
type loginInputController struct {
controller.GenericController
}
func (c *loginInputController) Lister() LoginInputLister {
return &loginInputLister{
controller: c,
}
}
func (c *loginInputController) AddHandler(handler LoginInputHandlerFunc) {
c.GenericController.AddHandler(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.(*LoginInput))
})
}
type loginInputFactory struct {
}
func (c loginInputFactory) Object() runtime.Object {
return &LoginInput{}
}
func (c loginInputFactory) List() runtime.Object {
return &LoginInputList{}
}
func (s *loginInputClient) Controller() LoginInputController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.loginInputControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(LoginInputGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &loginInputController{
GenericController: genericController,
}
s.client.loginInputControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type loginInputClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller LoginInputController
}
func (s *loginInputClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *loginInputClient) Create(o *LoginInput) (*LoginInput, error) {
obj, err := s.objectClient.Create(o)
return obj.(*LoginInput), err
}
func (s *loginInputClient) Get(name string, opts metav1.GetOptions) (*LoginInput, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*LoginInput), err
}
func (s *loginInputClient) Update(o *LoginInput) (*LoginInput, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*LoginInput), err
}
func (s *loginInputClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *loginInputClient) List(opts metav1.ListOptions) (*LoginInputList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*LoginInputList), err
}
func (s *loginInputClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
func (s *loginInputClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}

View File

@@ -1,39 +0,0 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type LoginInputLifecycle interface {
Create(obj *LoginInput) error
Remove(obj *LoginInput) error
Updated(obj *LoginInput) error
}
type loginInputLifecycleAdapter struct {
lifecycle LoginInputLifecycle
}
func (w *loginInputLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*LoginInput))
}
func (w *loginInputLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*LoginInput))
}
func (w *loginInputLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*LoginInput))
}
func NewLoginInputLifecycleAdapter(name string, client LoginInputInterface, l LoginInputLifecycle) LoginInputHandlerFunc {
adapter := &loginInputLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, adapter, client.ObjectClient())
return func(key string, obj *LoginInput) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@@ -27,9 +27,6 @@ type Client struct {
Group GroupOperations
GroupMember GroupMemberOperations
Identity IdentityOperations
LocalCredential LocalCredentialOperations
GithubCredential GithubCredentialOperations
LoginInput LoginInputOperations
DynamicSchema DynamicSchemaOperations
}
@@ -63,9 +60,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
client.Group = newGroupClient(client)
client.GroupMember = newGroupMemberClient(client)
client.Identity = newIdentityClient(client)
client.LocalCredential = newLocalCredentialClient(client)
client.GithubCredential = newGithubCredentialClient(client)
client.LoginInput = newLoginInputClient(client)
client.DynamicSchema = newDynamicSchemaClient(client)
return client, nil

View File

@@ -7,9 +7,10 @@ import (
const (
ClusterEventType = "clusterEvent"
ClusterEventFieldAnnotations = "annotations"
ClusterEventFieldClusterName = "clusterName"
ClusterEventFieldClusterId = "clusterId"
ClusterEventFieldCount = "count"
ClusterEventFieldCreated = "created"
ClusterEventFieldEventType = "eventType"
ClusterEventFieldFinalizers = "finalizers"
ClusterEventFieldFirstTimestamp = "firstTimestamp"
ClusterEventFieldInvolvedObject = "involvedObject"
@@ -22,16 +23,16 @@ const (
ClusterEventFieldRemoved = "removed"
ClusterEventFieldResourcePath = "resourcePath"
ClusterEventFieldSource = "source"
ClusterEventFieldType = "type"
ClusterEventFieldUuid = "uuid"
)
type ClusterEvent struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
ClusterName string `json:"clusterName,omitempty"`
ClusterId string `json:"clusterId,omitempty"`
Count *int64 `json:"count,omitempty"`
Created string `json:"created,omitempty"`
EventType string `json:"eventType,omitempty"`
Finalizers []string `json:"finalizers,omitempty"`
FirstTimestamp string `json:"firstTimestamp,omitempty"`
InvolvedObject *ObjectReference `json:"involvedObject,omitempty"`
@@ -44,7 +45,6 @@ type ClusterEvent struct {
Removed string `json:"removed,omitempty"`
ResourcePath string `json:"resourcePath,omitempty"`
Source *EventSource `json:"source,omitempty"`
Type string `json:"type,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type ClusterEventCollection struct {

View File

@@ -1,95 +1,10 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
GithubCredentialType = "githubCredential"
GithubCredentialFieldAnnotations = "annotations"
GithubCredentialFieldCode = "code"
GithubCredentialFieldCreated = "created"
GithubCredentialFieldFinalizers = "finalizers"
GithubCredentialFieldLabels = "labels"
GithubCredentialFieldName = "name"
GithubCredentialFieldOwnerReferences = "ownerReferences"
GithubCredentialFieldRemoved = "removed"
GithubCredentialFieldResourcePath = "resourcePath"
GithubCredentialFieldUuid = "uuid"
GithubCredentialType = "githubCredential"
GithubCredentialFieldCode = "code"
)
type GithubCredential struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
Code string `json:"code,omitempty"`
Created string `json:"created,omitempty"`
Finalizers []string `json:"finalizers,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Name string `json:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
Removed string `json:"removed,omitempty"`
ResourcePath string `json:"resourcePath,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type GithubCredentialCollection struct {
types.Collection
Data []GithubCredential `json:"data,omitempty"`
client *GithubCredentialClient
}
type GithubCredentialClient struct {
apiClient *Client
}
type GithubCredentialOperations interface {
List(opts *types.ListOpts) (*GithubCredentialCollection, error)
Create(opts *GithubCredential) (*GithubCredential, error)
Update(existing *GithubCredential, updates interface{}) (*GithubCredential, error)
ByID(id string) (*GithubCredential, error)
Delete(container *GithubCredential) error
}
func newGithubCredentialClient(apiClient *Client) *GithubCredentialClient {
return &GithubCredentialClient{
apiClient: apiClient,
}
}
func (c *GithubCredentialClient) Create(container *GithubCredential) (*GithubCredential, error) {
resp := &GithubCredential{}
err := c.apiClient.Ops.DoCreate(GithubCredentialType, container, resp)
return resp, err
}
func (c *GithubCredentialClient) Update(existing *GithubCredential, updates interface{}) (*GithubCredential, error) {
resp := &GithubCredential{}
err := c.apiClient.Ops.DoUpdate(GithubCredentialType, &existing.Resource, updates, resp)
return resp, err
}
func (c *GithubCredentialClient) List(opts *types.ListOpts) (*GithubCredentialCollection, error) {
resp := &GithubCredentialCollection{}
err := c.apiClient.Ops.DoList(GithubCredentialType, opts, resp)
resp.client = c
return resp, err
}
func (cc *GithubCredentialCollection) Next() (*GithubCredentialCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &GithubCredentialCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *GithubCredentialClient) ByID(id string) (*GithubCredential, error) {
resp := &GithubCredential{}
err := c.apiClient.Ops.DoByID(GithubCredentialType, id, resp)
return resp, err
}
func (c *GithubCredentialClient) Delete(container *GithubCredential) error {
return c.apiClient.Ops.DoResourceDelete(GithubCredentialType, &container.Resource)
Code string `json:"code,omitempty"`
}

View File

@@ -1,97 +1,12 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
LocalCredentialType = "localCredential"
LocalCredentialFieldAnnotations = "annotations"
LocalCredentialFieldCreated = "created"
LocalCredentialFieldFinalizers = "finalizers"
LocalCredentialFieldLabels = "labels"
LocalCredentialFieldName = "name"
LocalCredentialFieldOwnerReferences = "ownerReferences"
LocalCredentialFieldPassword = "password"
LocalCredentialFieldRemoved = "removed"
LocalCredentialFieldResourcePath = "resourcePath"
LocalCredentialFieldUsername = "username"
LocalCredentialFieldUuid = "uuid"
LocalCredentialType = "localCredential"
LocalCredentialFieldPassword = "password"
LocalCredentialFieldUsername = "username"
)
type LocalCredential struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
Created string `json:"created,omitempty"`
Finalizers []string `json:"finalizers,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Name string `json:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
Password string `json:"password,omitempty"`
Removed string `json:"removed,omitempty"`
ResourcePath string `json:"resourcePath,omitempty"`
Username string `json:"username,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type LocalCredentialCollection struct {
types.Collection
Data []LocalCredential `json:"data,omitempty"`
client *LocalCredentialClient
}
type LocalCredentialClient struct {
apiClient *Client
}
type LocalCredentialOperations interface {
List(opts *types.ListOpts) (*LocalCredentialCollection, error)
Create(opts *LocalCredential) (*LocalCredential, error)
Update(existing *LocalCredential, updates interface{}) (*LocalCredential, error)
ByID(id string) (*LocalCredential, error)
Delete(container *LocalCredential) error
}
func newLocalCredentialClient(apiClient *Client) *LocalCredentialClient {
return &LocalCredentialClient{
apiClient: apiClient,
}
}
func (c *LocalCredentialClient) Create(container *LocalCredential) (*LocalCredential, error) {
resp := &LocalCredential{}
err := c.apiClient.Ops.DoCreate(LocalCredentialType, container, resp)
return resp, err
}
func (c *LocalCredentialClient) Update(existing *LocalCredential, updates interface{}) (*LocalCredential, error) {
resp := &LocalCredential{}
err := c.apiClient.Ops.DoUpdate(LocalCredentialType, &existing.Resource, updates, resp)
return resp, err
}
func (c *LocalCredentialClient) List(opts *types.ListOpts) (*LocalCredentialCollection, error) {
resp := &LocalCredentialCollection{}
err := c.apiClient.Ops.DoList(LocalCredentialType, opts, resp)
resp.client = c
return resp, err
}
func (cc *LocalCredentialCollection) Next() (*LocalCredentialCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &LocalCredentialCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *LocalCredentialClient) ByID(id string) (*LocalCredential, error) {
resp := &LocalCredential{}
err := c.apiClient.Ops.DoByID(LocalCredentialType, id, resp)
return resp, err
}
func (c *LocalCredentialClient) Delete(container *LocalCredential) error {
return c.apiClient.Ops.DoResourceDelete(LocalCredentialType, &container.Resource)
Password string `json:"password,omitempty"`
Username string `json:"username,omitempty"`
}

View File

@@ -1,105 +1,20 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
LoginInputType = "loginInput"
LoginInputFieldAnnotations = "annotations"
LoginInputFieldCreated = "created"
LoginInputFieldDescription = "description"
LoginInputFieldFinalizers = "finalizers"
LoginInputFieldGithubCredential = "githubCredential"
LoginInputFieldIdentityRefreshTTLMillis = "identityRefreshTTL"
LoginInputFieldLabels = "labels"
LoginInputFieldLocalCredential = "localCredential"
LoginInputFieldName = "name"
LoginInputFieldOwnerReferences = "ownerReferences"
LoginInputFieldRemoved = "removed"
LoginInputFieldResourcePath = "resourcePath"
LoginInputFieldResponseType = "responseType"
LoginInputFieldTTLMillis = "ttl"
LoginInputFieldUuid = "uuid"
)
type LoginInput struct {
types.Resource
Annotations map[string]string `json:"annotations,omitempty"`
Created string `json:"created,omitempty"`
Description string `json:"description,omitempty"`
Finalizers []string `json:"finalizers,omitempty"`
GithubCredential *GithubCredential `json:"githubCredential,omitempty"`
IdentityRefreshTTLMillis string `json:"identityRefreshTTL,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
LocalCredential *LocalCredential `json:"localCredential,omitempty"`
Name string `json:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
Removed string `json:"removed,omitempty"`
ResourcePath string `json:"resourcePath,omitempty"`
ResponseType string `json:"responseType,omitempty"`
TTLMillis string `json:"ttl,omitempty"`
Uuid string `json:"uuid,omitempty"`
}
type LoginInputCollection struct {
types.Collection
Data []LoginInput `json:"data,omitempty"`
client *LoginInputClient
}
type LoginInputClient struct {
apiClient *Client
}
type LoginInputOperations interface {
List(opts *types.ListOpts) (*LoginInputCollection, error)
Create(opts *LoginInput) (*LoginInput, error)
Update(existing *LoginInput, updates interface{}) (*LoginInput, error)
ByID(id string) (*LoginInput, error)
Delete(container *LoginInput) error
}
func newLoginInputClient(apiClient *Client) *LoginInputClient {
return &LoginInputClient{
apiClient: apiClient,
}
}
func (c *LoginInputClient) Create(container *LoginInput) (*LoginInput, error) {
resp := &LoginInput{}
err := c.apiClient.Ops.DoCreate(LoginInputType, container, resp)
return resp, err
}
func (c *LoginInputClient) Update(existing *LoginInput, updates interface{}) (*LoginInput, error) {
resp := &LoginInput{}
err := c.apiClient.Ops.DoUpdate(LoginInputType, &existing.Resource, updates, resp)
return resp, err
}
func (c *LoginInputClient) List(opts *types.ListOpts) (*LoginInputCollection, error) {
resp := &LoginInputCollection{}
err := c.apiClient.Ops.DoList(LoginInputType, opts, resp)
resp.client = c
return resp, err
}
func (cc *LoginInputCollection) Next() (*LoginInputCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &LoginInputCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *LoginInputClient) ByID(id string) (*LoginInput, error) {
resp := &LoginInput{}
err := c.apiClient.Ops.DoByID(LoginInputType, id, resp)
return resp, err
}
func (c *LoginInputClient) Delete(container *LoginInput) error {
return c.apiClient.Ops.DoResourceDelete(LoginInputType, &container.Resource)
}

View File

@@ -3,14 +3,14 @@ package client
const (
ContainerPortType = "containerPort"
ContainerPortFieldContainerPort = "containerPort"
ContainerPortFieldHostIP = "hostIP"
ContainerPortFieldHostIp = "hostIp"
ContainerPortFieldHostPort = "hostPort"
ContainerPortFieldProtocol = "protocol"
)
type ContainerPort struct {
ContainerPort *int64 `json:"containerPort,omitempty"`
HostIP string `json:"hostIP,omitempty"`
HostIp string `json:"hostIp,omitempty"`
HostPort *int64 `json:"hostPort,omitempty"`
Protocol string `json:"protocol,omitempty"`
}