2020-09-16 14:19:51 +00:00
|
|
|
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-08-05 14:54:51 +00:00
|
|
|
|
|
|
|
// Code generated by informer-gen. DO NOT EDIT.
|
|
|
|
|
|
|
|
package externalversions
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2020-10-30 16:03:25 +00:00
|
|
|
v1alpha1 "go.pinniped.dev/generated/1.19/apis/concierge/authentication/v1alpha1"
|
2020-10-30 20:09:14 +00:00
|
|
|
configv1alpha1 "go.pinniped.dev/generated/1.19/apis/concierge/config/v1alpha1"
|
2020-10-30 14:34:43 +00:00
|
|
|
loginv1alpha1 "go.pinniped.dev/generated/1.19/apis/concierge/login/v1alpha1"
|
2020-08-21 19:50:53 +00:00
|
|
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
|
|
cache "k8s.io/client-go/tools/cache"
|
2020-08-05 14:54:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
|
|
|
// sharedInformers based on type
|
|
|
|
type GenericInformer interface {
|
|
|
|
Informer() cache.SharedIndexInformer
|
|
|
|
Lister() cache.GenericLister
|
|
|
|
}
|
|
|
|
|
|
|
|
type genericInformer struct {
|
|
|
|
informer cache.SharedIndexInformer
|
|
|
|
resource schema.GroupResource
|
|
|
|
}
|
|
|
|
|
|
|
|
// Informer returns the SharedIndexInformer.
|
|
|
|
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
|
|
|
return f.informer
|
|
|
|
}
|
|
|
|
|
|
|
|
// Lister returns the GenericLister.
|
|
|
|
func (f *genericInformer) Lister() cache.GenericLister {
|
|
|
|
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ForResource gives generic access to a shared informer of the matching type
|
|
|
|
// TODO extend this to unknown resources with a client pool
|
|
|
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
|
|
|
switch resource {
|
2020-10-30 16:03:25 +00:00
|
|
|
// Group=authentication.concierge.pinniped.dev, Version=v1alpha1
|
2020-12-08 01:37:43 +00:00
|
|
|
case v1alpha1.SchemeGroupVersion.WithResource("jwtauthenticators"):
|
|
|
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Authentication().V1alpha1().JWTAuthenticators().Informer()}, nil
|
2020-10-30 16:39:26 +00:00
|
|
|
case v1alpha1.SchemeGroupVersion.WithResource("webhookauthenticators"):
|
|
|
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Authentication().V1alpha1().WebhookAuthenticators().Informer()}, nil
|
2020-10-30 16:03:25 +00:00
|
|
|
|
2020-10-30 20:09:14 +00:00
|
|
|
// Group=config.concierge.pinniped.dev, Version=v1alpha1
|
2020-11-02 21:39:43 +00:00
|
|
|
case configv1alpha1.SchemeGroupVersion.WithResource("credentialissuers"):
|
|
|
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().CredentialIssuers().Informer()}, nil
|
2020-08-05 14:54:51 +00:00
|
|
|
|
2020-10-30 14:34:43 +00:00
|
|
|
// Group=login.concierge.pinniped.dev, Version=v1alpha1
|
2020-09-16 14:04:20 +00:00
|
|
|
case loginv1alpha1.SchemeGroupVersion.WithResource("tokencredentialrequests"):
|
|
|
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Login().V1alpha1().TokenCredentialRequests().Informer()}, nil
|
|
|
|
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil, fmt.Errorf("no informer found for %v", resource)
|
|
|
|
}
|