1
0
mirror of https://github.com/rancher/types.git synced 2025-09-18 16:10:58 +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 {

View File

@@ -7,25 +7,37 @@ import (
)
type ComponentStatusLifecycle interface {
Create(obj *v1.ComponentStatus) error
Remove(obj *v1.ComponentStatus) error
Updated(obj *v1.ComponentStatus) error
Create(obj *v1.ComponentStatus) (*v1.ComponentStatus, error)
Remove(obj *v1.ComponentStatus) (*v1.ComponentStatus, error)
Updated(obj *v1.ComponentStatus) (*v1.ComponentStatus, error)
}
type componentStatusLifecycleAdapter struct {
lifecycle ComponentStatusLifecycle
}
func (w *componentStatusLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.ComponentStatus))
func (w *componentStatusLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.ComponentStatus))
if o == nil {
return nil, err
}
return o, err
}
func (w *componentStatusLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.ComponentStatus))
func (w *componentStatusLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.ComponentStatus))
if o == nil {
return nil, err
}
return o, err
}
func (w *componentStatusLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.ComponentStatus))
func (w *componentStatusLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.ComponentStatus))
if o == nil {
return nil, err
}
return o, err
}
func NewComponentStatusLifecycleAdapter(name string, client ComponentStatusInterface, l ComponentStatusLifecycle) ComponentStatusHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type EventLifecycle interface {
Create(obj *v1.Event) error
Remove(obj *v1.Event) error
Updated(obj *v1.Event) error
Create(obj *v1.Event) (*v1.Event, error)
Remove(obj *v1.Event) (*v1.Event, error)
Updated(obj *v1.Event) (*v1.Event, error)
}
type eventLifecycleAdapter struct {
lifecycle EventLifecycle
}
func (w *eventLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.Event))
func (w *eventLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.Event))
if o == nil {
return nil, err
}
return o, err
}
func (w *eventLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.Event))
func (w *eventLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.Event))
if o == nil {
return nil, err
}
return o, err
}
func (w *eventLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.Event))
func (w *eventLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.Event))
if o == nil {
return nil, err
}
return o, err
}
func NewEventLifecycleAdapter(name string, client EventInterface, l EventLifecycle) EventHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type NamespaceLifecycle interface {
Create(obj *v1.Namespace) error
Remove(obj *v1.Namespace) error
Updated(obj *v1.Namespace) error
Create(obj *v1.Namespace) (*v1.Namespace, error)
Remove(obj *v1.Namespace) (*v1.Namespace, error)
Updated(obj *v1.Namespace) (*v1.Namespace, error)
}
type namespaceLifecycleAdapter struct {
lifecycle NamespaceLifecycle
}
func (w *namespaceLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.Namespace))
func (w *namespaceLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.Namespace))
if o == nil {
return nil, err
}
return o, err
}
func (w *namespaceLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.Namespace))
func (w *namespaceLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.Namespace))
if o == nil {
return nil, err
}
return o, err
}
func (w *namespaceLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.Namespace))
func (w *namespaceLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.Namespace))
if o == nil {
return nil, err
}
return o, err
}
func NewNamespaceLifecycleAdapter(name string, client NamespaceInterface, l NamespaceLifecycle) NamespaceHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type NodeLifecycle interface {
Create(obj *v1.Node) error
Remove(obj *v1.Node) error
Updated(obj *v1.Node) error
Create(obj *v1.Node) (*v1.Node, error)
Remove(obj *v1.Node) (*v1.Node, error)
Updated(obj *v1.Node) (*v1.Node, error)
}
type nodeLifecycleAdapter struct {
lifecycle NodeLifecycle
}
func (w *nodeLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.Node))
func (w *nodeLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.Node))
if o == nil {
return nil, err
}
return o, err
}
func (w *nodeLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.Node))
func (w *nodeLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.Node))
if o == nil {
return nil, err
}
return o, err
}
func (w *nodeLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.Node))
func (w *nodeLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.Node))
if o == nil {
return nil, err
}
return o, err
}
func NewNodeLifecycleAdapter(name string, client NodeInterface, l NodeLifecycle) NodeHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type PodLifecycle interface {
Create(obj *v1.Pod) error
Remove(obj *v1.Pod) error
Updated(obj *v1.Pod) error
Create(obj *v1.Pod) (*v1.Pod, error)
Remove(obj *v1.Pod) (*v1.Pod, error)
Updated(obj *v1.Pod) (*v1.Pod, error)
}
type podLifecycleAdapter struct {
lifecycle PodLifecycle
}
func (w *podLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.Pod))
func (w *podLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.Pod))
if o == nil {
return nil, err
}
return o, err
}
func (w *podLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.Pod))
func (w *podLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.Pod))
if o == nil {
return nil, err
}
return o, err
}
func (w *podLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.Pod))
func (w *podLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.Pod))
if o == nil {
return nil, err
}
return o, err
}
func NewPodLifecycleAdapter(name string, client PodInterface, l PodLifecycle) PodHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type PodSecurityPolicyLifecycle interface {
Create(obj *v1beta1.PodSecurityPolicy) error
Remove(obj *v1beta1.PodSecurityPolicy) error
Updated(obj *v1beta1.PodSecurityPolicy) error
Create(obj *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
Remove(obj *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
Updated(obj *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
}
type podSecurityPolicyLifecycleAdapter struct {
lifecycle PodSecurityPolicyLifecycle
}
func (w *podSecurityPolicyLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1beta1.PodSecurityPolicy))
func (w *podSecurityPolicyLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1beta1.PodSecurityPolicy))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1beta1.PodSecurityPolicy))
func (w *podSecurityPolicyLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1beta1.PodSecurityPolicy))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1beta1.PodSecurityPolicy))
func (w *podSecurityPolicyLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1beta1.PodSecurityPolicy))
if o == nil {
return nil, err
}
return o, err
}
func NewPodSecurityPolicyLifecycleAdapter(name string, client PodSecurityPolicyInterface, l PodSecurityPolicyLifecycle) PodSecurityPolicyHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type CatalogLifecycle interface {
Create(obj *Catalog) error
Remove(obj *Catalog) error
Updated(obj *Catalog) error
Create(obj *Catalog) (*Catalog, error)
Remove(obj *Catalog) (*Catalog, error)
Updated(obj *Catalog) (*Catalog, error)
}
type catalogLifecycleAdapter struct {
lifecycle CatalogLifecycle
}
func (w *catalogLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Catalog))
func (w *catalogLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Catalog))
if o == nil {
return nil, err
}
return o, err
}
func (w *catalogLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Catalog))
func (w *catalogLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Catalog))
if o == nil {
return nil, err
}
return o, err
}
func (w *catalogLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Catalog))
func (w *catalogLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Catalog))
if o == nil {
return nil, err
}
return o, err
}
func NewCatalogLifecycleAdapter(name string, client CatalogInterface, l CatalogLifecycle) CatalogHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ClusterEventLifecycle interface {
Create(obj *ClusterEvent) error
Remove(obj *ClusterEvent) error
Updated(obj *ClusterEvent) error
Create(obj *ClusterEvent) (*ClusterEvent, error)
Remove(obj *ClusterEvent) (*ClusterEvent, error)
Updated(obj *ClusterEvent) (*ClusterEvent, error)
}
type clusterEventLifecycleAdapter struct {
lifecycle ClusterEventLifecycle
}
func (w *clusterEventLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*ClusterEvent))
func (w *clusterEventLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*ClusterEvent))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterEventLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*ClusterEvent))
func (w *clusterEventLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*ClusterEvent))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterEventLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*ClusterEvent))
func (w *clusterEventLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*ClusterEvent))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterEventLifecycleAdapter(name string, client ClusterEventInterface, l ClusterEventLifecycle) ClusterEventHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ClusterLifecycle interface {
Create(obj *Cluster) error
Remove(obj *Cluster) error
Updated(obj *Cluster) error
Create(obj *Cluster) (*Cluster, error)
Remove(obj *Cluster) (*Cluster, error)
Updated(obj *Cluster) (*Cluster, error)
}
type clusterLifecycleAdapter struct {
lifecycle ClusterLifecycle
}
func (w *clusterLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Cluster))
func (w *clusterLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Cluster))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Cluster))
func (w *clusterLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Cluster))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Cluster))
func (w *clusterLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Cluster))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterLifecycleAdapter(name string, client ClusterInterface, l ClusterLifecycle) ClusterHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ClusterRegistrationTokenLifecycle interface {
Create(obj *ClusterRegistrationToken) error
Remove(obj *ClusterRegistrationToken) error
Updated(obj *ClusterRegistrationToken) error
Create(obj *ClusterRegistrationToken) (*ClusterRegistrationToken, error)
Remove(obj *ClusterRegistrationToken) (*ClusterRegistrationToken, error)
Updated(obj *ClusterRegistrationToken) (*ClusterRegistrationToken, error)
}
type clusterRegistrationTokenLifecycleAdapter struct {
lifecycle ClusterRegistrationTokenLifecycle
}
func (w *clusterRegistrationTokenLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*ClusterRegistrationToken))
func (w *clusterRegistrationTokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*ClusterRegistrationToken))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRegistrationTokenLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*ClusterRegistrationToken))
func (w *clusterRegistrationTokenLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*ClusterRegistrationToken))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRegistrationTokenLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*ClusterRegistrationToken))
func (w *clusterRegistrationTokenLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*ClusterRegistrationToken))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterRegistrationTokenLifecycleAdapter(name string, client ClusterRegistrationTokenInterface, l ClusterRegistrationTokenLifecycle) ClusterRegistrationTokenHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ClusterRoleTemplateBindingLifecycle interface {
Create(obj *ClusterRoleTemplateBinding) error
Remove(obj *ClusterRoleTemplateBinding) error
Updated(obj *ClusterRoleTemplateBinding) error
Create(obj *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error)
Remove(obj *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error)
Updated(obj *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error)
}
type clusterRoleTemplateBindingLifecycleAdapter struct {
lifecycle ClusterRoleTemplateBindingLifecycle
}
func (w *clusterRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*ClusterRoleTemplateBinding))
func (w *clusterRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*ClusterRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*ClusterRoleTemplateBinding))
func (w *clusterRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*ClusterRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*ClusterRoleTemplateBinding))
func (w *clusterRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*ClusterRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterRoleTemplateBindingLifecycleAdapter(name string, client ClusterRoleTemplateBindingInterface, l ClusterRoleTemplateBindingLifecycle) ClusterRoleTemplateBindingHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type DynamicSchemaLifecycle interface {
Create(obj *DynamicSchema) error
Remove(obj *DynamicSchema) error
Updated(obj *DynamicSchema) error
Create(obj *DynamicSchema) (*DynamicSchema, error)
Remove(obj *DynamicSchema) (*DynamicSchema, error)
Updated(obj *DynamicSchema) (*DynamicSchema, error)
}
type dynamicSchemaLifecycleAdapter struct {
lifecycle DynamicSchemaLifecycle
}
func (w *dynamicSchemaLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*DynamicSchema))
func (w *dynamicSchemaLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*DynamicSchema))
if o == nil {
return nil, err
}
return o, err
}
func (w *dynamicSchemaLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*DynamicSchema))
func (w *dynamicSchemaLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*DynamicSchema))
if o == nil {
return nil, err
}
return o, err
}
func (w *dynamicSchemaLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*DynamicSchema))
func (w *dynamicSchemaLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*DynamicSchema))
if o == nil {
return nil, err
}
return o, err
}
func NewDynamicSchemaLifecycleAdapter(name string, client DynamicSchemaInterface, l DynamicSchemaLifecycle) DynamicSchemaHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type GroupLifecycle interface {
Create(obj *Group) error
Remove(obj *Group) error
Updated(obj *Group) error
Create(obj *Group) (*Group, error)
Remove(obj *Group) (*Group, error)
Updated(obj *Group) (*Group, error)
}
type groupLifecycleAdapter struct {
lifecycle GroupLifecycle
}
func (w *groupLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Group))
func (w *groupLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Group))
if o == nil {
return nil, err
}
return o, err
}
func (w *groupLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Group))
func (w *groupLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Group))
if o == nil {
return nil, err
}
return o, err
}
func (w *groupLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Group))
func (w *groupLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Group))
if o == nil {
return nil, err
}
return o, err
}
func NewGroupLifecycleAdapter(name string, client GroupInterface, l GroupLifecycle) GroupHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type GroupMemberLifecycle interface {
Create(obj *GroupMember) error
Remove(obj *GroupMember) error
Updated(obj *GroupMember) error
Create(obj *GroupMember) (*GroupMember, error)
Remove(obj *GroupMember) (*GroupMember, error)
Updated(obj *GroupMember) (*GroupMember, error)
}
type groupMemberLifecycleAdapter struct {
lifecycle GroupMemberLifecycle
}
func (w *groupMemberLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*GroupMember))
func (w *groupMemberLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*GroupMember))
if o == nil {
return nil, err
}
return o, err
}
func (w *groupMemberLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*GroupMember))
func (w *groupMemberLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*GroupMember))
if o == nil {
return nil, err
}
return o, err
}
func (w *groupMemberLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*GroupMember))
func (w *groupMemberLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*GroupMember))
if o == nil {
return nil, err
}
return o, err
}
func NewGroupMemberLifecycleAdapter(name string, client GroupMemberInterface, l GroupMemberLifecycle) GroupMemberHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type IdentityLifecycle interface {
Create(obj *Identity) error
Remove(obj *Identity) error
Updated(obj *Identity) error
Create(obj *Identity) (*Identity, error)
Remove(obj *Identity) (*Identity, error)
Updated(obj *Identity) (*Identity, error)
}
type identityLifecycleAdapter struct {
lifecycle IdentityLifecycle
}
func (w *identityLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Identity))
func (w *identityLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Identity))
if o == nil {
return nil, err
}
return o, err
}
func (w *identityLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Identity))
func (w *identityLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Identity))
if o == nil {
return nil, err
}
return o, err
}
func (w *identityLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Identity))
func (w *identityLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Identity))
if o == nil {
return nil, err
}
return o, err
}
func NewIdentityLifecycleAdapter(name string, client IdentityInterface, l IdentityLifecycle) IdentityHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type MachineDriverLifecycle interface {
Create(obj *MachineDriver) error
Remove(obj *MachineDriver) error
Updated(obj *MachineDriver) error
Create(obj *MachineDriver) (*MachineDriver, error)
Remove(obj *MachineDriver) (*MachineDriver, error)
Updated(obj *MachineDriver) (*MachineDriver, error)
}
type machineDriverLifecycleAdapter struct {
lifecycle MachineDriverLifecycle
}
func (w *machineDriverLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*MachineDriver))
func (w *machineDriverLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*MachineDriver))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineDriverLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*MachineDriver))
func (w *machineDriverLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*MachineDriver))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineDriverLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*MachineDriver))
func (w *machineDriverLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*MachineDriver))
if o == nil {
return nil, err
}
return o, err
}
func NewMachineDriverLifecycleAdapter(name string, client MachineDriverInterface, l MachineDriverLifecycle) MachineDriverHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type MachineLifecycle interface {
Create(obj *Machine) error
Remove(obj *Machine) error
Updated(obj *Machine) error
Create(obj *Machine) (*Machine, error)
Remove(obj *Machine) (*Machine, error)
Updated(obj *Machine) (*Machine, error)
}
type machineLifecycleAdapter struct {
lifecycle MachineLifecycle
}
func (w *machineLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Machine))
func (w *machineLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Machine))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Machine))
func (w *machineLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Machine))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Machine))
func (w *machineLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Machine))
if o == nil {
return nil, err
}
return o, err
}
func NewMachineLifecycleAdapter(name string, client MachineInterface, l MachineLifecycle) MachineHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type MachineTemplateLifecycle interface {
Create(obj *MachineTemplate) error
Remove(obj *MachineTemplate) error
Updated(obj *MachineTemplate) error
Create(obj *MachineTemplate) (*MachineTemplate, error)
Remove(obj *MachineTemplate) (*MachineTemplate, error)
Updated(obj *MachineTemplate) (*MachineTemplate, error)
}
type machineTemplateLifecycleAdapter struct {
lifecycle MachineTemplateLifecycle
}
func (w *machineTemplateLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*MachineTemplate))
func (w *machineTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*MachineTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*MachineTemplate))
func (w *machineTemplateLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*MachineTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *machineTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*MachineTemplate))
func (w *machineTemplateLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*MachineTemplate))
if o == nil {
return nil, err
}
return o, err
}
func NewMachineTemplateLifecycleAdapter(name string, client MachineTemplateInterface, l MachineTemplateLifecycle) MachineTemplateHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type PodSecurityPolicyTemplateLifecycle interface {
Create(obj *PodSecurityPolicyTemplate) error
Remove(obj *PodSecurityPolicyTemplate) error
Updated(obj *PodSecurityPolicyTemplate) error
Create(obj *PodSecurityPolicyTemplate) (*PodSecurityPolicyTemplate, error)
Remove(obj *PodSecurityPolicyTemplate) (*PodSecurityPolicyTemplate, error)
Updated(obj *PodSecurityPolicyTemplate) (*PodSecurityPolicyTemplate, error)
}
type podSecurityPolicyTemplateLifecycleAdapter struct {
lifecycle PodSecurityPolicyTemplateLifecycle
}
func (w *podSecurityPolicyTemplateLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*PodSecurityPolicyTemplate))
func (w *podSecurityPolicyTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*PodSecurityPolicyTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*PodSecurityPolicyTemplate))
func (w *podSecurityPolicyTemplateLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*PodSecurityPolicyTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*PodSecurityPolicyTemplate))
func (w *podSecurityPolicyTemplateLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*PodSecurityPolicyTemplate))
if o == nil {
return nil, err
}
return o, err
}
func NewPodSecurityPolicyTemplateLifecycleAdapter(name string, client PodSecurityPolicyTemplateInterface, l PodSecurityPolicyTemplateLifecycle) PodSecurityPolicyTemplateHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ProjectLifecycle interface {
Create(obj *Project) error
Remove(obj *Project) error
Updated(obj *Project) error
Create(obj *Project) (*Project, error)
Remove(obj *Project) (*Project, error)
Updated(obj *Project) (*Project, error)
}
type projectLifecycleAdapter struct {
lifecycle ProjectLifecycle
}
func (w *projectLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Project))
func (w *projectLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Project))
if o == nil {
return nil, err
}
return o, err
}
func (w *projectLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Project))
func (w *projectLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Project))
if o == nil {
return nil, err
}
return o, err
}
func (w *projectLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Project))
func (w *projectLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Project))
if o == nil {
return nil, err
}
return o, err
}
func NewProjectLifecycleAdapter(name string, client ProjectInterface, l ProjectLifecycle) ProjectHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type ProjectRoleTemplateBindingLifecycle interface {
Create(obj *ProjectRoleTemplateBinding) error
Remove(obj *ProjectRoleTemplateBinding) error
Updated(obj *ProjectRoleTemplateBinding) error
Create(obj *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error)
Remove(obj *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error)
Updated(obj *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error)
}
type projectRoleTemplateBindingLifecycleAdapter struct {
lifecycle ProjectRoleTemplateBindingLifecycle
}
func (w *projectRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*ProjectRoleTemplateBinding))
func (w *projectRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*ProjectRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *projectRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*ProjectRoleTemplateBinding))
func (w *projectRoleTemplateBindingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*ProjectRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *projectRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*ProjectRoleTemplateBinding))
func (w *projectRoleTemplateBindingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*ProjectRoleTemplateBinding))
if o == nil {
return nil, err
}
return o, err
}
func NewProjectRoleTemplateBindingLifecycleAdapter(name string, client ProjectRoleTemplateBindingInterface, l ProjectRoleTemplateBindingLifecycle) ProjectRoleTemplateBindingHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type RoleTemplateLifecycle interface {
Create(obj *RoleTemplate) error
Remove(obj *RoleTemplate) error
Updated(obj *RoleTemplate) error
Create(obj *RoleTemplate) (*RoleTemplate, error)
Remove(obj *RoleTemplate) (*RoleTemplate, error)
Updated(obj *RoleTemplate) (*RoleTemplate, error)
}
type roleTemplateLifecycleAdapter struct {
lifecycle RoleTemplateLifecycle
}
func (w *roleTemplateLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*RoleTemplate))
func (w *roleTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*RoleTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *roleTemplateLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*RoleTemplate))
func (w *roleTemplateLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*RoleTemplate))
if o == nil {
return nil, err
}
return o, err
}
func (w *roleTemplateLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*RoleTemplate))
func (w *roleTemplateLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*RoleTemplate))
if o == nil {
return nil, err
}
return o, err
}
func NewRoleTemplateLifecycleAdapter(name string, client RoleTemplateInterface, l RoleTemplateLifecycle) RoleTemplateHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type TemplateLifecycle interface {
Create(obj *Template) error
Remove(obj *Template) error
Updated(obj *Template) error
Create(obj *Template) (*Template, error)
Remove(obj *Template) (*Template, error)
Updated(obj *Template) (*Template, error)
}
type templateLifecycleAdapter struct {
lifecycle TemplateLifecycle
}
func (w *templateLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Template))
func (w *templateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Template))
if o == nil {
return nil, err
}
return o, err
}
func (w *templateLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Template))
func (w *templateLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Template))
if o == nil {
return nil, err
}
return o, err
}
func (w *templateLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Template))
func (w *templateLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Template))
if o == nil {
return nil, err
}
return o, err
}
func NewTemplateLifecycleAdapter(name string, client TemplateInterface, l TemplateLifecycle) TemplateHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type TemplateVersionLifecycle interface {
Create(obj *TemplateVersion) error
Remove(obj *TemplateVersion) error
Updated(obj *TemplateVersion) error
Create(obj *TemplateVersion) (*TemplateVersion, error)
Remove(obj *TemplateVersion) (*TemplateVersion, error)
Updated(obj *TemplateVersion) (*TemplateVersion, error)
}
type templateVersionLifecycleAdapter struct {
lifecycle TemplateVersionLifecycle
}
func (w *templateVersionLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*TemplateVersion))
func (w *templateVersionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*TemplateVersion))
if o == nil {
return nil, err
}
return o, err
}
func (w *templateVersionLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*TemplateVersion))
func (w *templateVersionLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*TemplateVersion))
if o == nil {
return nil, err
}
return o, err
}
func (w *templateVersionLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*TemplateVersion))
func (w *templateVersionLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*TemplateVersion))
if o == nil {
return nil, err
}
return o, err
}
func NewTemplateVersionLifecycleAdapter(name string, client TemplateVersionInterface, l TemplateVersionLifecycle) TemplateVersionHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type TokenLifecycle interface {
Create(obj *Token) error
Remove(obj *Token) error
Updated(obj *Token) error
Create(obj *Token) (*Token, error)
Remove(obj *Token) (*Token, error)
Updated(obj *Token) (*Token, error)
}
type tokenLifecycleAdapter struct {
lifecycle TokenLifecycle
}
func (w *tokenLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Token))
func (w *tokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Token))
if o == nil {
return nil, err
}
return o, err
}
func (w *tokenLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Token))
func (w *tokenLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Token))
if o == nil {
return nil, err
}
return o, err
}
func (w *tokenLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Token))
func (w *tokenLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Token))
if o == nil {
return nil, err
}
return o, err
}
func NewTokenLifecycleAdapter(name string, client TokenInterface, l TokenLifecycle) TokenHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type UserLifecycle interface {
Create(obj *User) error
Remove(obj *User) error
Updated(obj *User) error
Create(obj *User) (*User, error)
Remove(obj *User) (*User, error)
Updated(obj *User) (*User, error)
}
type userLifecycleAdapter struct {
lifecycle UserLifecycle
}
func (w *userLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*User))
func (w *userLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*User))
if o == nil {
return nil, err
}
return o, err
}
func (w *userLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*User))
func (w *userLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*User))
if o == nil {
return nil, err
}
return o, err
}
func (w *userLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*User))
func (w *userLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*User))
if o == nil {
return nil, err
}
return o, err
}
func NewUserLifecycleAdapter(name string, client UserInterface, l UserLifecycle) UserHandlerFunc {

View File

@@ -6,25 +6,37 @@ import (
)
type WorkloadLifecycle interface {
Create(obj *Workload) error
Remove(obj *Workload) error
Updated(obj *Workload) error
Create(obj *Workload) (*Workload, error)
Remove(obj *Workload) (*Workload, error)
Updated(obj *Workload) (*Workload, error)
}
type workloadLifecycleAdapter struct {
lifecycle WorkloadLifecycle
}
func (w *workloadLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*Workload))
func (w *workloadLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*Workload))
if o == nil {
return nil, err
}
return o, err
}
func (w *workloadLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*Workload))
func (w *workloadLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*Workload))
if o == nil {
return nil, err
}
return o, err
}
func (w *workloadLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*Workload))
func (w *workloadLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*Workload))
if o == nil {
return nil, err
}
return o, err
}
func NewWorkloadLifecycleAdapter(name string, client WorkloadInterface, l WorkloadLifecycle) WorkloadHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type ClusterRoleBindingLifecycle interface {
Create(obj *v1.ClusterRoleBinding) error
Remove(obj *v1.ClusterRoleBinding) error
Updated(obj *v1.ClusterRoleBinding) error
Create(obj *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
Remove(obj *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
Updated(obj *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
}
type clusterRoleBindingLifecycleAdapter struct {
lifecycle ClusterRoleBindingLifecycle
}
func (w *clusterRoleBindingLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.ClusterRoleBinding))
func (w *clusterRoleBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.ClusterRoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.ClusterRoleBinding))
func (w *clusterRoleBindingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.ClusterRoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleBindingLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.ClusterRoleBinding))
func (w *clusterRoleBindingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.ClusterRoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterRoleBindingLifecycleAdapter(name string, client ClusterRoleBindingInterface, l ClusterRoleBindingLifecycle) ClusterRoleBindingHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type ClusterRoleLifecycle interface {
Create(obj *v1.ClusterRole) error
Remove(obj *v1.ClusterRole) error
Updated(obj *v1.ClusterRole) error
Create(obj *v1.ClusterRole) (*v1.ClusterRole, error)
Remove(obj *v1.ClusterRole) (*v1.ClusterRole, error)
Updated(obj *v1.ClusterRole) (*v1.ClusterRole, error)
}
type clusterRoleLifecycleAdapter struct {
lifecycle ClusterRoleLifecycle
}
func (w *clusterRoleLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.ClusterRole))
func (w *clusterRoleLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.ClusterRole))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.ClusterRole))
func (w *clusterRoleLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.ClusterRole))
if o == nil {
return nil, err
}
return o, err
}
func (w *clusterRoleLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.ClusterRole))
func (w *clusterRoleLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.ClusterRole))
if o == nil {
return nil, err
}
return o, err
}
func NewClusterRoleLifecycleAdapter(name string, client ClusterRoleInterface, l ClusterRoleLifecycle) ClusterRoleHandlerFunc {

View File

@@ -7,25 +7,37 @@ import (
)
type RoleBindingLifecycle interface {
Create(obj *v1.RoleBinding) error
Remove(obj *v1.RoleBinding) error
Updated(obj *v1.RoleBinding) error
Create(obj *v1.RoleBinding) (*v1.RoleBinding, error)
Remove(obj *v1.RoleBinding) (*v1.RoleBinding, error)
Updated(obj *v1.RoleBinding) (*v1.RoleBinding, error)
}
type roleBindingLifecycleAdapter struct {
lifecycle RoleBindingLifecycle
}
func (w *roleBindingLifecycleAdapter) Create(obj runtime.Object) error {
return w.lifecycle.Create(obj.(*v1.RoleBinding))
func (w *roleBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1.RoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *roleBindingLifecycleAdapter) Finalize(obj runtime.Object) error {
return w.lifecycle.Remove(obj.(*v1.RoleBinding))
func (w *roleBindingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*v1.RoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *roleBindingLifecycleAdapter) Updated(obj runtime.Object) error {
return w.lifecycle.Updated(obj.(*v1.RoleBinding))
func (w *roleBindingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*v1.RoleBinding))
if o == nil {
return nil, err
}
return o, err
}
func NewRoleBindingLifecycleAdapter(name string, client RoleBindingInterface, l RoleBindingLifecycle) RoleBindingHandlerFunc {