本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewRootCreateAction函数的具体用法?Golang NewRootCreateAction怎么用?Golang NewRootCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewRootCreateAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Create
func (c *FakePersistentVolumes) Create(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction("persistentVolumes", persistentVolume), &api.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*api.PersistentVolume), err
}
示例2: Create
func (c *FakeOAuthAccessTokens) Create(inObj *oauthapi.OAuthAccessToken) (*oauthapi.OAuthAccessToken, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(oAuthAccessTokensResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthAccessToken), err
}
示例3: Create
func (c *FakeUserIdentityMappings) Create(inObj *userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(userIdentityMappingsResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
示例4: Create
func (c *FakeIdentities) Create(inObj *userapi.Identity) (*userapi.Identity, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(identitiesResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.Identity), err
}
示例5: Create
func (c *FakeClusterResourceQuotas) Create(inObj *quotaapi.ClusterResourceQuota) (*quotaapi.ClusterResourceQuota, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(clusteResourceQuotasResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*quotaapi.ClusterResourceQuota), err
}
示例6: Create
func (c *FakeComponentStatus) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction("componentStatus", componentStatus), &api.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*api.ComponentStatus), err
}
示例7: Create
func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.PodSecurityPolicy), err
}
示例8: Create
func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*v1.Namespace), err
}
示例9: Create
func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*v1.ComponentStatus), err
}
示例10: Create
func (c *FakeClusterPolicyBindings) Create(inObj *authorizationapi.ClusterPolicyBinding) (*authorizationapi.ClusterPolicyBinding, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(clusterPolicyBindingsResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.ClusterPolicyBinding), err
}
示例11: Create
func (c *FakeImages) Create(inObj *imageapi.Image) (*imageapi.Image, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(imagesResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*imageapi.Image), err
}
示例12: Create
func (c *FakeNetworks) Create(network *v1.Network) (result *v1.Network, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(networksResource, network), &v1.Network{})
if obj == nil {
return nil, err
}
return obj.(*v1.Network), err
}
示例13: Create
func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
示例14: Create
func (c *FakeClusterRoles) Create(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(clusterrolesResource, clusterRole), &rbac.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac.ClusterRole), err
}
示例15: Create
func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificates.CertificateSigningRequest), err
}