當前位置: 首頁>>代碼示例>>Golang>>正文


Golang core.NewGetAction函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewGetAction函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewGetAction函數的具體用法?Golang NewGetAction怎麽用?Golang NewGetAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewGetAction函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Secrets

func (c *FakeImageStreamSecrets) Secrets(name string, options kapi.ListOptions) (*kapi.SecretList, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(imageapi.SchemeGroupVersion.WithResource("imagestreams/secrets"), c.Namespace, name), &kapi.SecretList{})
	if obj == nil {
		return nil, err
	}
	return obj.(*kapi.SecretList), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:7,代碼來源:fake_imagestreamsecrets.go

示例2: GetScale

func (c *FakeDeploymentConfigs) GetScale(name string) (*extensions.Scale, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(deployapi.SchemeGroupVersion.WithResource("deploymentconfigs/scale"), c.Namespace, name), &extensions.Scale{})
	if obj == nil {
		return nil, err
	}

	return obj.(*extensions.Scale), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_deploymentconfigs.go

示例3: Generate

func (c *FakeDeploymentConfigs) Generate(name string) (*deployapi.DeploymentConfig, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(deployapi.SchemeGroupVersion.WithResource("generatedeploymentconfigs"), c.Namespace, name), &deployapi.DeploymentConfig{})
	if obj == nil {
		return nil, err
	}

	return obj.(*deployapi.DeploymentConfig), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_deploymentconfigs.go

示例4: Get

func (c *FakeDeploymentConfigs) Get(name string) (*deployapi.DeploymentConfig, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(deploymentConfigsResource, c.Namespace, name), &deployapi.DeploymentConfig{})
	if obj == nil {
		return nil, err
	}

	return obj.(*deployapi.DeploymentConfig), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_deploymentconfigs.go

示例5: Get

func (c *FakePolicyBindings) Get(name string) (*authorizationapi.PolicyBinding, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(policyBindingsResource, c.Namespace, name), &authorizationapi.PolicyBinding{})
	if obj == nil {
		return nil, err
	}

	return obj.(*authorizationapi.PolicyBinding), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_policybindings.go

示例6: Get

func (c *FakeBuildConfigs) Get(name string) (*buildapi.BuildConfig, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(buildConfigsResource, c.Namespace, name), &buildapi.BuildConfig{})
	if obj == nil {
		return nil, err
	}

	return obj.(*buildapi.BuildConfig), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_buildconfigs.go

示例7: Get

func (c *FakeAppliedClusterResourceQuotas) Get(name string) (*quotaapi.AppliedClusterResourceQuota, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(appliedClusterResourceQuotasResource, c.Namespace, name), &quotaapi.AppliedClusterResourceQuota{})
	if obj == nil {
		return nil, err
	}

	return obj.(*quotaapi.AppliedClusterResourceQuota), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_appliedclusterresourcequota.go

示例8: Get

func (c *FakeTemplates) Get(name string) (*templateapi.Template, error) {
	obj, err := c.Fake.Invokes(core.NewGetAction(templatesResource, c.Namespace, name), &templateapi.Template{})
	if obj == nil {
		return nil, err
	}

	return obj.(*templateapi.Template), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_templates.go

示例9: Get

func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.PodDisruptionBudget), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_poddisruptionbudget.go

示例10: Get

func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(limitrangesResource, c.ns, name), &v1.LimitRange{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.LimitRange), err
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_limitrange.go

示例11: Get

func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.PodTemplate), err
}
開發者ID:Q-Lee,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_podtemplate.go

示例12: Get

func (c *FakeStatefulSets) Get(name string) (result *v1beta1.StatefulSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.StatefulSet), err
}
開發者ID:eljefedelrodeodeljefe,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_statefulset.go

示例13: Get

func (c *FakeRoles) Get(name string) (result *rbac.Role, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(rolesResource, c.ns, name), &rbac.Role{})

	if obj == nil {
		return nil, err
	}
	return obj.(*rbac.Role), err
}
開發者ID:humblec,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_role.go

示例14: Get

func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction("horizontalpodautoscalers", c.ns, name), &v1beta1.HorizontalPodAutoscaler{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.HorizontalPodAutoscaler), err
}
開發者ID:mml,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_horizontalpodautoscaler.go

示例15: Get

func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err error) {
	obj, err := c.Fake.
		Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Deployment), err
}
開發者ID:Clarifai,項目名稱:kubernetes,代碼行數:9,代碼來源:fake_deployment.go


注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewGetAction函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。