Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
68db7fe8
Commit
68db7fe8
authored
Feb 18, 2018
by
Nikhita Raghunath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample-controller: generate UpdateStatus for Foo resource
parent
7c06d6fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
fake_foo.go
...ersioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go
+12
-0
foo.go
...lientset/versioned/typed/samplecontroller/v1alpha1/foo.go
+17
-0
No files found.
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go
View file @
68db7fe8
...
@@ -98,6 +98,18 @@ func (c *FakeFoos) Update(foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) {
...
@@ -98,6 +98,18 @@ func (c *FakeFoos) Update(foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) {
return
obj
.
(
*
v1alpha1
.
Foo
),
err
return
obj
.
(
*
v1alpha1
.
Foo
),
err
}
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func
(
c
*
FakeFoos
)
UpdateStatus
(
foo
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
{
obj
,
err
:=
c
.
Fake
.
Invokes
(
testing
.
NewUpdateSubresourceAction
(
foosResource
,
"status"
,
c
.
ns
,
foo
),
&
v1alpha1
.
Foo
{})
if
obj
==
nil
{
return
nil
,
err
}
return
obj
.
(
*
v1alpha1
.
Foo
),
err
}
// Delete takes name of the foo and deletes it. Returns an error if one occurs.
// Delete takes name of the foo and deletes it. Returns an error if one occurs.
func
(
c
*
FakeFoos
)
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
{
func
(
c
*
FakeFoos
)
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
{
_
,
err
:=
c
.
Fake
.
_
,
err
:=
c
.
Fake
.
...
...
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go
View file @
68db7fe8
...
@@ -35,6 +35,7 @@ type FoosGetter interface {
...
@@ -35,6 +35,7 @@ type FoosGetter interface {
type
FooInterface
interface
{
type
FooInterface
interface
{
Create
(
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
Create
(
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
Update
(
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
Update
(
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
UpdateStatus
(
*
v1alpha1
.
Foo
)
(
*
v1alpha1
.
Foo
,
error
)
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
DeleteCollection
(
options
*
v1
.
DeleteOptions
,
listOptions
v1
.
ListOptions
)
error
DeleteCollection
(
options
*
v1
.
DeleteOptions
,
listOptions
v1
.
ListOptions
)
error
Get
(
name
string
,
options
v1
.
GetOptions
)
(
*
v1alpha1
.
Foo
,
error
)
Get
(
name
string
,
options
v1
.
GetOptions
)
(
*
v1alpha1
.
Foo
,
error
)
...
@@ -118,6 +119,22 @@ func (c *foos) Update(foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) {
...
@@ -118,6 +119,22 @@ func (c *foos) Update(foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) {
return
return
}
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func
(
c
*
foos
)
UpdateStatus
(
foo
*
v1alpha1
.
Foo
)
(
result
*
v1alpha1
.
Foo
,
err
error
)
{
result
=
&
v1alpha1
.
Foo
{}
err
=
c
.
client
.
Put
()
.
Namespace
(
c
.
ns
)
.
Resource
(
"foos"
)
.
Name
(
foo
.
Name
)
.
SubResource
(
"status"
)
.
Body
(
foo
)
.
Do
()
.
Into
(
result
)
return
}
// Delete takes name of the foo and deletes it. Returns an error if one occurs.
// Delete takes name of the foo and deletes it. Returns an error if one occurs.
func
(
c
*
foos
)
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
{
func
(
c
*
foos
)
Delete
(
name
string
,
options
*
v1
.
DeleteOptions
)
error
{
return
c
.
client
.
Delete
()
.
return
c
.
client
.
Delete
()
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment