本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootListAction函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRootListAction函數的具體用法?Golang NewRootListAction怎麽用?Golang NewRootListAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了NewRootListAction函數的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: List
func (c *FakeOAuthClient) List(opts kapi.ListOptions) (*oauthapi.OAuthClientList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction(oAuthClientsResource, opts), &oauthapi.OAuthClientList{})
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthClientList), err
}
示例2: List
func (c *FakeImages) List(opts kapi.ListOptions) (*imageapi.ImageList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction(imagesResource, opts), &imageapi.ImageList{})
if obj == nil {
return nil, err
}
return obj.(*imageapi.ImageList), err
}
示例3: List
func (c *FakeClusterPolicyBindings) List(opts kapi.ListOptions) (*authorizationapi.ClusterPolicyBindingList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction(clusterPolicyBindingsResource, opts), &authorizationapi.ClusterPolicyBindingList{})
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.ClusterPolicyBindingList), err
}
示例4: List
func (c *FakeIdentities) List(opts kapi.ListOptions) (*userapi.IdentityList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction(identitiesResource, opts), &userapi.IdentityList{})
if obj == nil {
return nil, err
}
return obj.(*userapi.IdentityList), err
}
示例5: List
func (c *FakeClusterResourceQuotas) List(opts kapi.ListOptions) (*quotaapi.ClusterResourceQuotaList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction(clusteResourceQuotasResource, opts), "aapi.ClusterResourceQuotaList{})
if obj == nil {
return nil, err
}
return obj.(*quotaapi.ClusterResourceQuotaList), err
}
示例6: Search
// Search returns a list of events matching the specified object.
func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
action := core.NewRootListAction(eventsResource, api.ListOptions{})
if c.ns != "" {
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
}
obj, err := c.Fake.Invokes(action, &v1.EventList{})
if obj == nil {
return nil, err
}
return obj.(*v1.EventList), err
}
示例7: List
func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &v1.NamespaceList{}
for _, item := range obj.(*v1.NamespaceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例8: List
func (c *FakeClusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(clusterrolesResource, opts), &rbac.ClusterRoleList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &rbac.ClusterRoleList{}
for _, item := range obj.(*rbac.ClusterRoleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例9: List
func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(thirdpartyresourcesResource, opts), &v1beta1.ThirdPartyResourceList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ThirdPartyResourceList{}
for _, item := range obj.(*v1beta1.ThirdPartyResourceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例10: List
func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &certificates.CertificateSigningRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &certificates.CertificateSigningRequestList{}
for _, item := range obj.(*certificates.CertificateSigningRequestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例11: List
func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions.PodSecurityPolicyList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(podsecuritypoliciesResource, opts), &extensions.PodSecurityPolicyList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &extensions.PodSecurityPolicyList{}
for _, item := range obj.(*extensions.PodSecurityPolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例12: List
func (c *FakeSecurityContextConstraints) List(opts api.ListOptions) (result *api.SecurityContextConstraintsList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction("securitycontextconstraints", opts), &api.SecurityContextConstraintsList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &api.SecurityContextConstraintsList{}
for _, item := range obj.(*api.SecurityContextConstraintsList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例13: List
func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction("persistentvolumes", opts), &api.PersistentVolumeList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &api.PersistentVolumeList{}
for _, item := range obj.(*api.PersistentVolumeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例14: List
func (c *FakeSecurityContextConstraints) List(opts api.ListOptions) (*api.SecurityContextConstraintsList, error) {
obj, err := c.Fake.Invokes(core.NewRootListAction("securitycontextconstraints", opts), &api.SecurityContextConstraintsList{})
return obj.(*api.SecurityContextConstraintsList), err
}