func (s *auditSinkLister) Get(name string) (*v1alpha1.AuditSink, error) {
	obj, exists, err := s.indexer.GetByKey(name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1alpha1.Resource("auditsink"), name)
	}
	return obj.(*v1alpha1.AuditSink), nil
}
Get retrieves the AuditSink from the index for a given name.
package v1alpha1
import (
	v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)
type AuditSinkLister interface {
	List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error)
	Get(name string) (*v1alpha1.AuditSink, error)
	AuditSinkListerExpansion
}
type auditSinkLister struct {
	indexer cache.Indexer
}
func NewAuditSinkLister(indexer cache.Indexer) AuditSinkLister {
	return &auditSinkLister{indexer: indexer}
}
func (s *auditSinkLister) List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.AuditSink))
	})
	return ret, err
}