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

Golang core.NewCreateAction函数代码示例

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

本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCreateAction函数的具体用法?Golang NewCreateAction怎么用?Golang NewCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NewCreateAction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: Create

func (c *FakeLocalResourceAccessReviews) Create(inObj *authorizationapi.LocalResourceAccessReview) (*authorizationapi.ResourceAccessReviewResponse, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(localResourceAccessReviewsResource, c.Namespace, inObj), &authorizationapi.ResourceAccessReviewResponse{})
	if cast, ok := obj.(*authorizationapi.ResourceAccessReviewResponse); ok {
		return cast, err
	}
	return nil, err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:7,代码来源:fake_localresourceaccessreview.go


示例2: Create

func (c *FakeSubjectRulesReviews) Create(inObj *authorizationapi.SubjectRulesReview) (*authorizationapi.SubjectRulesReview, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(selfSubjectRulesReviewsResource, c.Namespace, inObj), &authorizationapi.SubjectRulesReview{})
	if cast, ok := obj.(*authorizationapi.SubjectRulesReview); ok {
		return cast, err
	}
	return nil, err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:7,代码来源:fake_subjectrulesreview.go


示例3: RollbackDeprecated

func (c *FakeDeploymentConfigs) RollbackDeprecated(inObj *deployapi.DeploymentConfigRollback) (result *deployapi.DeploymentConfig, err error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(deployapi.SchemeGroupVersion.WithResource("deploymentconfigrollbacks"), c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

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


示例4: Create

func (c *FakeDeploymentConfigs) Create(inObj *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(deploymentConfigsResource, c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

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


示例5: Create

func (c *FakePolicyBindings) Create(inObj *authorizationapi.PolicyBinding) (*authorizationapi.PolicyBinding, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(policyBindingsResource, c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

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


示例6: Create

func (c *FakeBuildConfigs) Create(inObj *buildapi.BuildConfig) (*buildapi.BuildConfig, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(buildConfigsResource, c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

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


示例7: Create

func (c *FakeTemplates) Create(inObj *templateapi.Template) (*templateapi.Template, error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(templatesResource, c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

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


示例8: Create

func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.PodDisruptionBudget), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:9,代码来源:fake_poddisruptionbudget.go


示例9: Create

func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.LimitRange), err
}
开发者ID:Q-Lee,项目名称:kubernetes,代码行数:9,代码来源:fake_limitrange.go


示例10: Create

func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PodTemplate), err
}
开发者ID:Q-Lee,项目名称:kubernetes,代码行数:9,代码来源:fake_podtemplate.go


示例11: Create

func (c *FakePodTemplates) Create(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction("podtemplates", c.ns, podTemplate), &api.PodTemplate{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.PodTemplate), err
}
开发者ID:CNDonny,项目名称:scope,代码行数:9,代码来源:fake_podtemplate.go


示例12: Create

func (c *FakeStatefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.StatefulSet), err
}
开发者ID:eljefedelrodeodeljefe,项目名称:kubernetes,代码行数:9,代码来源:fake_statefulset.go


示例13: Create

func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction("limitranges", c.ns, limitRange), &api.LimitRange{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.LimitRange), err
}
开发者ID:CNDonny,项目名称:scope,代码行数:9,代码来源:fake_limitrange.go


示例14: Create

func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.HorizontalPodAutoscaler), err
}
开发者ID:mml,项目名称:kubernetes,代码行数:9,代码来源:fake_horizontalpodautoscaler.go


示例15: Create

func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(jobsResource, c.ns, job), &v1beta1.Job{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Job), err
}
开发者ID:nak3,项目名称:kubernetes,代码行数:9,代码来源:fake_job.go


示例16: Create

func (c *FakeSecrets) Create(secret *api.Secret) (result *api.Secret, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction("secrets", c.ns, secret), &api.Secret{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.Secret), err
}
开发者ID:XiaoningDing,项目名称:UbernetesPOC,代码行数:9,代码来源:fake_secret.go


示例17: Create

func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Deployment), err
}
开发者ID:Clarifai,项目名称:kubernetes,代码行数:9,代码来源:fake_deployment.go


示例18: Create

func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction("pods", c.ns, pod), &v1.Pod{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Pod), err
}
开发者ID:RomainVabre,项目名称:origin,代码行数:9,代码来源:fake_pod.go


示例19: Create

func (c *FakeUsers) Create(user *api.User) (result *api.User, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(usersResource, c.ns, user), &api.User{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.User), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:9,代码来源:fake_user.go


示例20: Create

func (c *FakeDeploymentConfigs) Create(deploymentConfig *v1.DeploymentConfig) (result *v1.DeploymentConfig, err error) {
	obj, err := c.Fake.
		Invokes(core.NewCreateAction(deploymentconfigsResource, c.ns, deploymentConfig), &v1.DeploymentConfig{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.DeploymentConfig), err
}
开发者ID:Xmagicer,项目名称:origin,代码行数:9,代码来源:fake_deploymentconfig.go



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Golang core.NewDeleteAction函数代码示例发布时间:2022-05-28
下一篇:
Golang core.ExtractFromListOptions函数代码示例发布时间: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