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


Golang core.NewRootGetAction函數代碼示例

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


在下文中一共展示了NewRootGetAction函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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), &quotaapi.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


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