func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Role))
	})
	return ret, err
}
List lists all Roles in the indexer for a given namespace.
package v1alpha1
import (
	v1alpha1 "k8s.io/api/rbac/v1alpha1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)
type RoleLister interface {
	List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
	Roles(namespace string) RoleNamespaceLister
	RoleListerExpansion
}
type roleLister struct {
	indexer cache.Indexer
}
func NewRoleLister(indexer cache.Indexer) RoleLister {
	return &roleLister{indexer: indexer}
}
func (s *roleLister) List(selector labels.Selector) (ret []*v1alpha1.Role, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Role))
	})
	return ret, err
}
func (s *roleLister) Roles(namespace string) RoleNamespaceLister {
	return roleNamespaceLister{indexer: s.indexer, namespace: namespace}
}
type RoleNamespaceLister interface {
	List(selector labels.Selector) (ret []*v1alpha1.Role, err error)
	Get(name string) (*v1alpha1.Role, error)
	RoleNamespaceListerExpansion
}
type roleNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}