• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang core.NewRootListAction函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_oauthclient.go


示例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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_images.go


示例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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_clusterpolicybindings.go


示例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
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_identities.go


示例5: List

func (c *FakeClusterResourceQuotas) List(opts kapi.ListOptions) (*quotaapi.ClusterResourceQuotaList, error) {
	obj, err := c.Fake.Invokes(core.NewRootListAction(clusteResourceQuotasResource, opts), &quotaapi.ClusterResourceQuotaList{})
	if obj == nil {
		return nil, err
	}

	return obj.(*quotaapi.ClusterResourceQuotaList), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_clusterresourcequota.go


示例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
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:13,代码来源:fake_event_expansion.go


示例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
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:19,代码来源:fake_namespace.go


示例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
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:19,代码来源:fake_clusterrole.go


示例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
}
开发者ID:nak3,项目名称:kubernetes,代码行数:19,代码来源:fake_thirdpartyresource.go


示例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
}
开发者ID:humblec,项目名称:kubernetes,代码行数:19,代码来源:fake_certificatesigningrequest.go


示例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
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:19,代码来源:fake_podsecuritypolicy.go


示例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
}
开发者ID:RomainVabre,项目名称:origin,代码行数:19,代码来源:fake_securitycontextconstraints.go


示例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
}
开发者ID:CNDonny,项目名称:scope,代码行数:19,代码来源:fake_persistentvolume.go


示例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
}
开发者ID:richm,项目名称:origin,代码行数:4,代码来源:fake_securitycontextconstraints.go



注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootListAction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang core.NewRootPatchAction函数代码示例发布时间:2022-05-28
下一篇:
Golang core.NewRootGetAction函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap