本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCreateAction函数的具体用法?Golang NewCreateAction怎么用?Golang NewCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewCreateAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}