本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/unversioned/testclient.NewCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCreateAction函数的具体用法?Golang NewCreateAction怎么用?Golang NewCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewCreateAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Create
func (c *FakeSubjectRulesReviews) Create(inObj *authorizationapi.SubjectRulesReview) (*authorizationapi.SubjectRulesReview, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("selfsubjectrulesreviews", c.Namespace, inObj), &authorizationapi.SubjectRulesReview{})
if cast, ok := obj.(*authorizationapi.SubjectRulesReview); ok {
return cast, err
}
return nil, err
}
示例2: Create
func (c *FakeLocalResourceAccessReviews) Create(inObj *authorizationapi.LocalResourceAccessReview) (*authorizationapi.ResourceAccessReviewResponse, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("localresourceaccessreviews", c.Namespace, inObj), &authorizationapi.ResourceAccessReviewResponse{})
if cast, ok := obj.(*authorizationapi.ResourceAccessReviewResponse); ok {
return cast, err
}
return nil, err
}
示例3: Create
func (c *FakeRoutes) Create(inObj *routeapi.Route) (*routeapi.Route, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("routes", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*routeapi.Route), err
}
示例4: Create
func (c *FakeImageStreamTags) Create(inObj *imageapi.ImageStreamTag) (*imageapi.ImageStreamTag, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("imagestreamtags", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*imageapi.ImageStreamTag), err
}
示例5: Create
func (c *FakeBackingServiceInstances) Create(inObj *backingserviceinstanceapi.BackingServiceInstance) (*backingserviceinstanceapi.BackingServiceInstance, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("backingserviceinstances", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*backingserviceinstanceapi.BackingServiceInstance), err
}
示例6: Create
func (c *FakeRoleBindings) Create(inObj *authorizationapi.RoleBinding) (*authorizationapi.RoleBinding, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("rolebindings", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.RoleBinding), err
}
示例7: Create
func (c *FakeTemplateConfigs) Create(inObj *templateapi.Template) (*templateapi.Template, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("templateconfigs", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*templateapi.Template), err
}
示例8: Create
func (c *FakeEgressNetworkPolicy) Create(inObj *sdnapi.EgressNetworkPolicy) (*sdnapi.EgressNetworkPolicy, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("egressnetworkpolicies", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*sdnapi.EgressNetworkPolicy), err
}
示例9: Create
func (c *FakeBuilds) Create(inObj *buildapi.Build) (*buildapi.Build, error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("builds", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*buildapi.Build), err
}
示例10: Rollback
func (c *FakeDeploymentConfigs) Rollback(inObj *deployapi.DeploymentConfigRollback) (result *deployapi.DeploymentConfig, err error) {
obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("deploymentconfigrollbacks", c.Namespace, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*deployapi.DeploymentConfig), err
}
示例11: Clone
func (c *FakeBuilds) Clone(request *buildapi.BuildRequest) (result *buildapi.Build, err error) {
action := ktestclient.NewCreateAction("buildconfigs", c.Namespace, request)
action.Subresource = "clone"
obj, err := c.Fake.Invokes(action, &buildapi.Build{})
if obj == nil {
return nil, err
}
return obj.(*buildapi.Build), err
}
示例12: InstantiateBinary
func (c *FakeBuildConfigs) InstantiateBinary(request *buildapi.BinaryBuildRequestOptions, r io.Reader) (result *buildapi.Build, err error) {
action := ktestclient.NewCreateAction("buildconfigs", c.Namespace, request)
action.Subresource = "instantiatebinary"
obj, err := c.Fake.Invokes(action, &buildapi.Build{})
if obj == nil {
return nil, err
}
return obj.(*buildapi.Build), err
}
示例13: expectCreateRCAction
func (f *fixture) expectCreateRCAction(rc *api.ReplicationController) {
f.actions = append(f.actions, testclient.NewCreateAction("replicationcontrollers", rc.Namespace, rc))
f.objects.Items = append(f.objects.Items, rc)
}
示例14: Create
func (c *fakeRc) Create(controller *api.ReplicationController) (*api.ReplicationController, error) {
c.Fake.Invokes(testclient.NewCreateAction("replicationcontrollers", controller.Namespace, controller), nil)
return controller, nil
}
示例15: CreateBinding
func (c *FakeBackingServiceInstances) CreateBinding(name string, bro *backingserviceinstanceapi.BindingRequestOptions) (err error) {
_, err = c.Fake.Invokes(ktestclient.NewCreateAction("backingserviceinstances/binding", c.Namespace, bro), bro)
return
}