本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootGetAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewRootGetAction函数的具体用法?Golang NewRootGetAction怎么用?Golang NewRootGetAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewRootGetAction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Get
func (c *FakeProjects) Get(name string) (result *api.Project, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(projectsResource, name), &api.Project{})
if obj == nil {
return nil, err
}
return obj.(*api.Project), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:8,代码来源:fake_project.go
示例2: Get
func (c *FakeThirdPartyResources) Get(name string) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:8,代码来源:fake_thirdpartyresource.go
示例3: Get
func (c *FakeClusters) Get(name string) (result *federation.Cluster, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(clustersResource, name), &federation.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*federation.Cluster), err
}
开发者ID:Clarifai,项目名称:kubernetes,代码行数:8,代码来源:fake_cluster.go
示例4: Get
func (c *FakePersistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(persistentvolumesResource, name), &v1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*v1.PersistentVolume), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_persistentvolume.go
示例5: Get
func (c *FakeOAuthClient) Get(name string) (*oauthapi.OAuthClient, error) {
obj, err := c.Fake.Invokes(core.NewRootGetAction(oAuthClientsResource, name), &oauthapi.OAuthClient{})
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthClient), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_oauthclient.go
示例6: Get
func (c *FakeNodes) Get(name string) (result *api.Node, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction("nodes", name), &api.Node{})
if obj == nil {
return nil, err
}
return obj.(*api.Node), err
}
开发者ID:XiaoningDing,项目名称:UbernetesPOC,代码行数:8,代码来源:fake_node.go
示例7: Get
func (c *FakeStorageClasses) Get(name string) (result *storage.StorageClass, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(storageclassesResource, name), &storage.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage.StorageClass), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:8,代码来源:fake_storageclass.go
示例8: Get
func (c *FakeStorageClasses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StorageClass, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.StorageClass), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_storageclass.go
示例9: Get
func (c *FakeComponentStatus) Get(name string) (result *api.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction("componentStatus", name), &api.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*api.ComponentStatus), err
}
开发者ID:mitake,项目名称:kubernetes,代码行数:8,代码来源:fake_componentstatus.go
示例10: Get
func (c *FakeAPIServices) Get(name string) (result *v1alpha1.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(apiservicesResource, name), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
开发者ID:gambol99,项目名称:kubernetes,代码行数:8,代码来源:fake_apiservice.go
示例11: Get
// Get returns information about a particular image and error if one occurs.
func (c *FakeOAuthAccessTokens) Get(name string) (*oauthapi.OAuthAccessToken, error) {
obj, err := c.Fake.Invokes(core.NewRootGetAction(oAuthAccessTokensResource, name), &oauthapi.OAuthAccessToken{})
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthAccessToken), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:9,代码来源:fake_oauthaccesstoken.go
示例12: Get
func (c *FakeUserIdentityMappings) Get(name string) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(core.NewRootGetAction(userIdentityMappingsResource, name), &userapi.UserIdentityMapping{})
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_useridentitymappings.go
示例13: Get
func (c *FakeIdentities) Get(name string) (*userapi.Identity, error) {
obj, err := c.Fake.Invokes(core.NewRootGetAction(identitiesResource, name), &userapi.Identity{})
if obj == nil {
return nil, err
}
return obj.(*userapi.Identity), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_identities.go
示例14: Get
func (c *FakeClusterResourceQuotas) Get(name string) (*quotaapi.ClusterResourceQuota, error) {
obj, err := c.Fake.Invokes(core.NewRootGetAction(clusteResourceQuotasResource, name), "aapi.ClusterResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*quotaapi.ClusterResourceQuota), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_clusterresourcequota.go
示例15: Get
func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(apiservicesResource, name), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:fake_apiservice.go
示例16: Get
func (c *FakeCertificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CertificateSigningRequest), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_certificatesigningrequest.go
示例17: Get
func (c *FakePodSecurityPolicies) Get(name string, options meta_v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.PodSecurityPolicy), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_podsecuritypolicy.go
示例18: Get
func (c *FakeNodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(nodesResource, name), &v1.Node{})
if obj == nil {
return nil, err
}
return obj.(*v1.Node), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_node.go
示例19: Get
func (c *FakeSecurityContextConstraints) Get(name string) (result *v1.SecurityContextConstraints, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(securitycontextconstraintsResource, name), &v1.SecurityContextConstraints{})
if obj == nil {
return nil, err
}
return obj.(*v1.SecurityContextConstraints), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:8,代码来源:fake_securitycontextconstraints.go
示例20: Get
func (c *FakeClusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Cluster, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(clustersResource, name), &v1beta1.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Cluster), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:fake_cluster.go
注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootGetAction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论