1
0
mirror of https://github.com/rancher/types.git synced 2025-09-16 14:59:16 +00:00

Update generated code

This commit is contained in:
Darren Shepherd
2017-12-13 17:31:09 -07:00
parent 0409513f2e
commit 9c9def8b3c
31 changed files with 651 additions and 279 deletions

View File

@@ -7,25 +7,37 @@ import (
)
type DeploymentLifecycle interface {
Create(obj *v1beta2.Deployment) error
Remove(obj *v1beta2.Deployment) error
Updated(obj *v1beta2.Deployment) error
Create(obj *v1beta2.Deployment) (*v1beta2.Deployment, error)
Remove(obj *v1beta2.Deployment) (*v1beta2.Deployment, error)
Updated(obj *v1beta2.Deployment) (*v1beta2.Deployment, error)
}
type deploymentLifecycleAdapter struct {
lifecycle DeploymentLifecycle
}
func (w *deploymentLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1beta2.Deployment))
func (w *deploymentLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1beta2.Deployment))
if o == nil {
return nil, err
}
return o, err
}
func (w *deploymentLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1beta2.Deployment))
func (w *deploymentLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1beta2.Deployment))
if o == nil {
return nil, err
}
return o, err
}
func (w *deploymentLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1beta2.Deployment))
func (w *deploymentLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1beta2.Deployment))
if o == nil {
return nil, err
}
return o, err
}
func NewDeploymentLifecycleAdapter(name string, client DeploymentInterface, l DeploymentLifecycle) DeploymentHandlerFunc {