From bf135aa0f1d8255d6ed67eb246624023e0a13ebc Mon Sep 17 00:00:00 2001 From: gitlawr Date: Sun, 11 Feb 2018 17:22:50 +0800 Subject: [PATCH] update generated code for pipeline --- .../management.cattle.io/v3/pipeline_types.go | 4 +- ...z_generated_cluster_pipeline_controller.go | 252 +++++ ...ated_cluster_pipeline_lifecycle_adapter.go | 51 + .../v3/zz_generated_deepcopy.go | 938 ++++++++++++++++++ .../v3/zz_generated_k8s_client.go | 96 ++ .../v3/zz_generated_pipeline_controller.go | 252 +++++ ...generated_pipeline_execution_controller.go | 252 +++++ ...ed_pipeline_execution_lifecycle_adapter.go | 51 + ...rated_pipeline_execution_log_controller.go | 252 +++++ ...ipeline_execution_log_lifecycle_adapter.go | 51 + ...zz_generated_pipeline_lifecycle_adapter.go | 51 + .../v3/zz_generated_scheme.go | 12 + ...rated_source_code_credential_controller.go | 251 +++++ ...ource_code_credential_lifecycle_adapter.go | 51 + ...rated_source_code_repository_controller.go | 251 +++++ ...ource_code_repository_lifecycle_adapter.go | 51 + .../v3/zz_generated_auth_app_input.go | 22 + .../v3/zz_generated_auth_user_input.go | 14 + client/management/v3/zz_generated_client.go | 12 + .../v3/zz_generated_cluster_pipeline.go | 118 +++ .../v3/zz_generated_cluster_pipeline_spec.go | 14 + .../zz_generated_cluster_pipeline_status.go | 8 + .../v3/zz_generated_github_cluster_config.go | 18 + client/management/v3/zz_generated_pipeline.go | 113 +++ .../v3/zz_generated_pipeline_execution.go | 113 +++ .../v3/zz_generated_pipeline_execution_log.go | 105 ++ ...z_generated_pipeline_execution_log_spec.go | 20 + .../zz_generated_pipeline_execution_spec.go | 20 + .../zz_generated_pipeline_execution_status.go | 18 + .../v3/zz_generated_pipeline_spec.go | 20 + .../v3/zz_generated_pipeline_status.go | 24 + .../v3/zz_generated_publish_image_config.go | 14 + .../management/v3/zz_generated_repo_perm.go | 14 + .../v3/zz_generated_run_script_config.go | 20 + .../v3/zz_generated_source_code_config.go | 16 + .../v3/zz_generated_source_code_credential.go | 115 +++ ...z_generated_source_code_credential_spec.go | 24 + ...generated_source_code_credential_status.go | 8 + .../v3/zz_generated_source_code_repository.go | 113 +++ ...z_generated_source_code_repository_spec.go | 22 + ...generated_source_code_repository_status.go | 8 + client/management/v3/zz_generated_stage.go | 12 + .../v3/zz_generated_stage_status.go | 16 + client/management/v3/zz_generated_step.go | 16 + .../management/v3/zz_generated_step_status.go | 14 + 45 files changed, 3915 insertions(+), 2 deletions(-) create mode 100644 apis/management.cattle.io/v3/zz_generated_cluster_pipeline_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_cluster_pipeline_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_execution_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_source_code_credential_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_source_code_repository_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go create mode 100644 client/management/v3/zz_generated_auth_app_input.go create mode 100644 client/management/v3/zz_generated_auth_user_input.go create mode 100644 client/management/v3/zz_generated_cluster_pipeline.go create mode 100644 client/management/v3/zz_generated_cluster_pipeline_spec.go create mode 100644 client/management/v3/zz_generated_cluster_pipeline_status.go create mode 100644 client/management/v3/zz_generated_github_cluster_config.go create mode 100644 client/management/v3/zz_generated_pipeline.go create mode 100644 client/management/v3/zz_generated_pipeline_execution.go create mode 100644 client/management/v3/zz_generated_pipeline_execution_log.go create mode 100644 client/management/v3/zz_generated_pipeline_execution_log_spec.go create mode 100644 client/management/v3/zz_generated_pipeline_execution_spec.go create mode 100644 client/management/v3/zz_generated_pipeline_execution_status.go create mode 100644 client/management/v3/zz_generated_pipeline_spec.go create mode 100644 client/management/v3/zz_generated_pipeline_status.go create mode 100644 client/management/v3/zz_generated_publish_image_config.go create mode 100644 client/management/v3/zz_generated_repo_perm.go create mode 100644 client/management/v3/zz_generated_run_script_config.go create mode 100644 client/management/v3/zz_generated_source_code_config.go create mode 100644 client/management/v3/zz_generated_source_code_credential.go create mode 100644 client/management/v3/zz_generated_source_code_credential_spec.go create mode 100644 client/management/v3/zz_generated_source_code_credential_status.go create mode 100644 client/management/v3/zz_generated_source_code_repository.go create mode 100644 client/management/v3/zz_generated_source_code_repository_spec.go create mode 100644 client/management/v3/zz_generated_source_code_repository_status.go create mode 100644 client/management/v3/zz_generated_stage.go create mode 100644 client/management/v3/zz_generated_stage_status.go create mode 100644 client/management/v3/zz_generated_step.go create mode 100644 client/management/v3/zz_generated_step_status.go diff --git a/apis/management.cattle.io/v3/pipeline_types.go b/apis/management.cattle.io/v3/pipeline_types.go index c0ddca2a..7e496225 100644 --- a/apis/management.cattle.io/v3/pipeline_types.go +++ b/apis/management.cattle.io/v3/pipeline_types.go @@ -61,8 +61,8 @@ type SourceCodeRepository struct { } type ClusterPipelineSpec struct { - ClusterName string `json:"clusterName" norman:"type=reference[cluster]"` - Deploy bool `json:"deploy"` + ClusterName string `json:"clusterName" norman:"type=reference[cluster]"` + Deploy bool `json:"deploy"` GithubConfig *GithubClusterConfig `json:"githubConfig,omitempty"` } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_controller.go new file mode 100644 index 00000000..c23dc70c --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_controller.go @@ -0,0 +1,252 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + ClusterPipelineGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "ClusterPipeline", + } + ClusterPipelineResource = metav1.APIResource{ + Name: "clusterpipelines", + SingularName: "clusterpipeline", + Namespaced: true, + + Kind: ClusterPipelineGroupVersionKind.Kind, + } +) + +type ClusterPipelineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterPipeline +} + +type ClusterPipelineHandlerFunc func(key string, obj *ClusterPipeline) error + +type ClusterPipelineLister interface { + List(namespace string, selector labels.Selector) (ret []*ClusterPipeline, err error) + Get(namespace, name string) (*ClusterPipeline, error) +} + +type ClusterPipelineController interface { + Informer() cache.SharedIndexInformer + Lister() ClusterPipelineLister + AddHandler(name string, handler ClusterPipelineHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler ClusterPipelineHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type ClusterPipelineInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*ClusterPipeline) (*ClusterPipeline, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ClusterPipeline, error) + Get(name string, opts metav1.GetOptions) (*ClusterPipeline, error) + Update(*ClusterPipeline) (*ClusterPipeline, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*ClusterPipelineList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() ClusterPipelineController + AddHandler(name string, sync ClusterPipelineHandlerFunc) + AddLifecycle(name string, lifecycle ClusterPipelineLifecycle) + AddClusterScopedHandler(name, clusterName string, sync ClusterPipelineHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle ClusterPipelineLifecycle) +} + +type clusterPipelineLister struct { + controller *clusterPipelineController +} + +func (l *clusterPipelineLister) List(namespace string, selector labels.Selector) (ret []*ClusterPipeline, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*ClusterPipeline)) + }) + return +} + +func (l *clusterPipelineLister) Get(namespace, name string) (*ClusterPipeline, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: ClusterPipelineGroupVersionKind.Group, + Resource: "clusterPipeline", + }, name) + } + return obj.(*ClusterPipeline), nil +} + +type clusterPipelineController struct { + controller.GenericController +} + +func (c *clusterPipelineController) Lister() ClusterPipelineLister { + return &clusterPipelineLister{ + controller: c, + } +} + +func (c *clusterPipelineController) AddHandler(name string, handler ClusterPipelineHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*ClusterPipeline)) + }) +} + +func (c *clusterPipelineController) AddClusterScopedHandler(name, cluster string, handler ClusterPipelineHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*ClusterPipeline)) + }) +} + +type clusterPipelineFactory struct { +} + +func (c clusterPipelineFactory) Object() runtime.Object { + return &ClusterPipeline{} +} + +func (c clusterPipelineFactory) List() runtime.Object { + return &ClusterPipelineList{} +} + +func (s *clusterPipelineClient) Controller() ClusterPipelineController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.clusterPipelineControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(ClusterPipelineGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &clusterPipelineController{ + GenericController: genericController, + } + + s.client.clusterPipelineControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type clusterPipelineClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller ClusterPipelineController +} + +func (s *clusterPipelineClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *clusterPipelineClient) Create(o *ClusterPipeline) (*ClusterPipeline, error) { + obj, err := s.objectClient.Create(o) + return obj.(*ClusterPipeline), err +} + +func (s *clusterPipelineClient) Get(name string, opts metav1.GetOptions) (*ClusterPipeline, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*ClusterPipeline), err +} + +func (s *clusterPipelineClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ClusterPipeline, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*ClusterPipeline), err +} + +func (s *clusterPipelineClient) Update(o *ClusterPipeline) (*ClusterPipeline, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*ClusterPipeline), err +} + +func (s *clusterPipelineClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *clusterPipelineClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *clusterPipelineClient) List(opts metav1.ListOptions) (*ClusterPipelineList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*ClusterPipelineList), err +} + +func (s *clusterPipelineClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *clusterPipelineClient) Patch(o *ClusterPipeline, data []byte, subresources ...string) (*ClusterPipeline, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*ClusterPipeline), err +} + +func (s *clusterPipelineClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *clusterPipelineClient) AddHandler(name string, sync ClusterPipelineHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *clusterPipelineClient) AddLifecycle(name string, lifecycle ClusterPipelineLifecycle) { + sync := NewClusterPipelineLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *clusterPipelineClient) AddClusterScopedHandler(name, clusterName string, sync ClusterPipelineHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *clusterPipelineClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle ClusterPipelineLifecycle) { + sync := NewClusterPipelineLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_lifecycle_adapter.go new file mode 100644 index 00000000..56987c9b --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_cluster_pipeline_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type ClusterPipelineLifecycle interface { + Create(obj *ClusterPipeline) (*ClusterPipeline, error) + Remove(obj *ClusterPipeline) (*ClusterPipeline, error) + Updated(obj *ClusterPipeline) (*ClusterPipeline, error) +} + +type clusterPipelineLifecycleAdapter struct { + lifecycle ClusterPipelineLifecycle +} + +func (w *clusterPipelineLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*ClusterPipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *clusterPipelineLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*ClusterPipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *clusterPipelineLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*ClusterPipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func NewClusterPipelineLifecycleAdapter(name string, clusterScoped bool, client ClusterPipelineInterface, l ClusterPipelineLifecycle) ClusterPipelineHandlerFunc { + adapter := &clusterPipelineLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *ClusterPipeline) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/apis/management.cattle.io/v3/zz_generated_deepcopy.go index 11861daf..3b2624fb 100644 --- a/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -31,6 +31,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*AlertStatus).DeepCopyInto(out.(*AlertStatus)) return nil }, InType: reflect.TypeOf(&AlertStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*AuthAppInput).DeepCopyInto(out.(*AuthAppInput)) + return nil + }, InType: reflect.TypeOf(&AuthAppInput{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*AuthConfig).DeepCopyInto(out.(*AuthConfig)) return nil @@ -39,6 +43,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*AuthConfigList).DeepCopyInto(out.(*AuthConfigList)) return nil }, InType: reflect.TypeOf(&AuthConfigList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*AuthUserInput).DeepCopyInto(out.(*AuthUserInput)) + return nil + }, InType: reflect.TypeOf(&AuthUserInput{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*AuthnConfig).DeepCopyInto(out.(*AuthnConfig)) return nil @@ -123,6 +131,22 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*ClusterLoggingSpec).DeepCopyInto(out.(*ClusterLoggingSpec)) return nil }, InType: reflect.TypeOf(&ClusterLoggingSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ClusterPipeline).DeepCopyInto(out.(*ClusterPipeline)) + return nil + }, InType: reflect.TypeOf(&ClusterPipeline{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ClusterPipelineList).DeepCopyInto(out.(*ClusterPipelineList)) + return nil + }, InType: reflect.TypeOf(&ClusterPipelineList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ClusterPipelineSpec).DeepCopyInto(out.(*ClusterPipelineSpec)) + return nil + }, InType: reflect.TypeOf(&ClusterPipelineSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*ClusterPipelineStatus).DeepCopyInto(out.(*ClusterPipelineStatus)) + return nil + }, InType: reflect.TypeOf(&ClusterPipelineStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*ClusterRegistrationToken).DeepCopyInto(out.(*ClusterRegistrationToken)) return nil @@ -199,6 +223,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*Filter).DeepCopyInto(out.(*Filter)) return nil }, InType: reflect.TypeOf(&Filter{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*GithubClusterConfig).DeepCopyInto(out.(*GithubClusterConfig)) + return nil + }, InType: reflect.TypeOf(&GithubClusterConfig{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*GithubConfig).DeepCopyInto(out.(*GithubConfig)) return nil @@ -407,6 +435,50 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*PagerdutyConfig).DeepCopyInto(out.(*PagerdutyConfig)) return nil }, InType: reflect.TypeOf(&PagerdutyConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Pipeline).DeepCopyInto(out.(*Pipeline)) + return nil + }, InType: reflect.TypeOf(&Pipeline{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecution).DeepCopyInto(out.(*PipelineExecution)) + return nil + }, InType: reflect.TypeOf(&PipelineExecution{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionList).DeepCopyInto(out.(*PipelineExecutionList)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionLog).DeepCopyInto(out.(*PipelineExecutionLog)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionLog{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionLogList).DeepCopyInto(out.(*PipelineExecutionLogList)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionLogList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionLogSpec).DeepCopyInto(out.(*PipelineExecutionLogSpec)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionLogSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionSpec).DeepCopyInto(out.(*PipelineExecutionSpec)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineExecutionStatus).DeepCopyInto(out.(*PipelineExecutionStatus)) + return nil + }, InType: reflect.TypeOf(&PipelineExecutionStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineList).DeepCopyInto(out.(*PipelineList)) + return nil + }, InType: reflect.TypeOf(&PipelineList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineSpec).DeepCopyInto(out.(*PipelineSpec)) + return nil + }, InType: reflect.TypeOf(&PipelineSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PipelineStatus).DeepCopyInto(out.(*PipelineStatus)) + return nil + }, InType: reflect.TypeOf(&PipelineStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*PodSecurityPolicyTemplate).DeepCopyInto(out.(*PodSecurityPolicyTemplate)) return nil @@ -495,6 +567,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*ProjectStatus).DeepCopyInto(out.(*ProjectStatus)) return nil }, InType: reflect.TypeOf(&ProjectStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*PublishImageConfig).DeepCopyInto(out.(*PublishImageConfig)) + return nil + }, InType: reflect.TypeOf(&PublishImageConfig{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*Question).DeepCopyInto(out.(*Question)) return nil @@ -527,6 +603,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*Recipient).DeepCopyInto(out.(*Recipient)) return nil }, InType: reflect.TypeOf(&Recipient{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*RepoPerm).DeepCopyInto(out.(*RepoPerm)) + return nil + }, InType: reflect.TypeOf(&RepoPerm{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*RoleTemplate).DeepCopyInto(out.(*RoleTemplate)) return nil @@ -535,6 +615,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*RoleTemplateList).DeepCopyInto(out.(*RoleTemplateList)) return nil }, InType: reflect.TypeOf(&RoleTemplateList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*RunScriptConfig).DeepCopyInto(out.(*RunScriptConfig)) + return nil + }, InType: reflect.TypeOf(&RunScriptConfig{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*SMTPConfig).DeepCopyInto(out.(*SMTPConfig)) return nil @@ -563,10 +647,62 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*SlackConfig).DeepCopyInto(out.(*SlackConfig)) return nil }, InType: reflect.TypeOf(&SlackConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeConfig).DeepCopyInto(out.(*SourceCodeConfig)) + return nil + }, InType: reflect.TypeOf(&SourceCodeConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeCredential).DeepCopyInto(out.(*SourceCodeCredential)) + return nil + }, InType: reflect.TypeOf(&SourceCodeCredential{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeCredentialList).DeepCopyInto(out.(*SourceCodeCredentialList)) + return nil + }, InType: reflect.TypeOf(&SourceCodeCredentialList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeCredentialSpec).DeepCopyInto(out.(*SourceCodeCredentialSpec)) + return nil + }, InType: reflect.TypeOf(&SourceCodeCredentialSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeCredentialStatus).DeepCopyInto(out.(*SourceCodeCredentialStatus)) + return nil + }, InType: reflect.TypeOf(&SourceCodeCredentialStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeRepository).DeepCopyInto(out.(*SourceCodeRepository)) + return nil + }, InType: reflect.TypeOf(&SourceCodeRepository{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeRepositoryList).DeepCopyInto(out.(*SourceCodeRepositoryList)) + return nil + }, InType: reflect.TypeOf(&SourceCodeRepositoryList{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeRepositorySpec).DeepCopyInto(out.(*SourceCodeRepositorySpec)) + return nil + }, InType: reflect.TypeOf(&SourceCodeRepositorySpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*SourceCodeRepositoryStatus).DeepCopyInto(out.(*SourceCodeRepositoryStatus)) + return nil + }, InType: reflect.TypeOf(&SourceCodeRepositoryStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*SplunkConfig).DeepCopyInto(out.(*SplunkConfig)) return nil }, InType: reflect.TypeOf(&SplunkConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Stage).DeepCopyInto(out.(*Stage)) + return nil + }, InType: reflect.TypeOf(&Stage{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*StageStatus).DeepCopyInto(out.(*StageStatus)) + return nil + }, InType: reflect.TypeOf(&StageStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*Step).DeepCopyInto(out.(*Step)) + return nil + }, InType: reflect.TypeOf(&Step{})}, + conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { + in.(*StepStatus).DeepCopyInto(out.(*StepStatus)) + return nil + }, InType: reflect.TypeOf(&StepStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*SyslogConfig).DeepCopyInto(out.(*SyslogConfig)) return nil @@ -707,6 +843,22 @@ func (in *AlertStatus) DeepCopy() *AlertStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthAppInput) DeepCopyInto(out *AuthAppInput) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthAppInput. +func (in *AuthAppInput) DeepCopy() *AuthAppInput { + if in == nil { + return nil + } + out := new(AuthAppInput) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthConfig) DeepCopyInto(out *AuthConfig) { *out = *in @@ -773,6 +925,22 @@ func (in *AuthConfigList) DeepCopyObject() runtime.Object { } } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthUserInput) DeepCopyInto(out *AuthUserInput) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthUserInput. +func (in *AuthUserInput) DeepCopy() *AuthUserInput { + if in == nil { + return nil + } + out := new(AuthUserInput) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuthnConfig) DeepCopyInto(out *AuthnConfig) { *out = *in @@ -1318,6 +1486,111 @@ func (in *ClusterLoggingSpec) DeepCopy() *ClusterLoggingSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterPipeline) DeepCopyInto(out *ClusterPipeline) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPipeline. +func (in *ClusterPipeline) DeepCopy() *ClusterPipeline { + if in == nil { + return nil + } + out := new(ClusterPipeline) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterPipeline) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterPipelineList) DeepCopyInto(out *ClusterPipelineList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterPipeline, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPipelineList. +func (in *ClusterPipelineList) DeepCopy() *ClusterPipelineList { + if in == nil { + return nil + } + out := new(ClusterPipelineList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterPipelineList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterPipelineSpec) DeepCopyInto(out *ClusterPipelineSpec) { + *out = *in + if in.GithubConfig != nil { + in, out := &in.GithubConfig, &out.GithubConfig + if *in == nil { + *out = nil + } else { + *out = new(GithubClusterConfig) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPipelineSpec. +func (in *ClusterPipelineSpec) DeepCopy() *ClusterPipelineSpec { + if in == nil { + return nil + } + out := new(ClusterPipelineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterPipelineStatus) DeepCopyInto(out *ClusterPipelineStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPipelineStatus. +func (in *ClusterPipelineStatus) DeepCopy() *ClusterPipelineStatus { + if in == nil { + return nil + } + out := new(ClusterPipelineStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterRegistrationToken) DeepCopyInto(out *ClusterRegistrationToken) { *out = *in @@ -1879,6 +2152,22 @@ func (in *Filter) DeepCopy() *Filter { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GithubClusterConfig) DeepCopyInto(out *GithubClusterConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubClusterConfig. +func (in *GithubClusterConfig) DeepCopy() *GithubClusterConfig { + if in == nil { + return nil + } + out := new(GithubClusterConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GithubConfig) DeepCopyInto(out *GithubConfig) { *out = *in @@ -3346,6 +3635,292 @@ func (in *PagerdutyConfig) DeepCopy() *PagerdutyConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Pipeline) DeepCopyInto(out *Pipeline) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline. +func (in *Pipeline) DeepCopy() *Pipeline { + if in == nil { + return nil + } + out := new(Pipeline) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Pipeline) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecution) DeepCopyInto(out *PipelineExecution) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecution. +func (in *PipelineExecution) DeepCopy() *PipelineExecution { + if in == nil { + return nil + } + out := new(PipelineExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PipelineExecution) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionList) DeepCopyInto(out *PipelineExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PipelineExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionList. +func (in *PipelineExecutionList) DeepCopy() *PipelineExecutionList { + if in == nil { + return nil + } + out := new(PipelineExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PipelineExecutionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionLog) DeepCopyInto(out *PipelineExecutionLog) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionLog. +func (in *PipelineExecutionLog) DeepCopy() *PipelineExecutionLog { + if in == nil { + return nil + } + out := new(PipelineExecutionLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PipelineExecutionLog) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionLogList) DeepCopyInto(out *PipelineExecutionLogList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PipelineExecutionLog, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionLogList. +func (in *PipelineExecutionLogList) DeepCopy() *PipelineExecutionLogList { + if in == nil { + return nil + } + out := new(PipelineExecutionLogList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PipelineExecutionLogList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionLogSpec) DeepCopyInto(out *PipelineExecutionLogSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionLogSpec. +func (in *PipelineExecutionLogSpec) DeepCopy() *PipelineExecutionLogSpec { + if in == nil { + return nil + } + out := new(PipelineExecutionLogSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionSpec) DeepCopyInto(out *PipelineExecutionSpec) { + *out = *in + in.Pipeline.DeepCopyInto(&out.Pipeline) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionSpec. +func (in *PipelineExecutionSpec) DeepCopy() *PipelineExecutionSpec { + if in == nil { + return nil + } + out := new(PipelineExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineExecutionStatus) DeepCopyInto(out *PipelineExecutionStatus) { + *out = *in + if in.Stages != nil { + in, out := &in.Stages, &out.Stages + *out = make([]StageStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineExecutionStatus. +func (in *PipelineExecutionStatus) DeepCopy() *PipelineExecutionStatus { + if in == nil { + return nil + } + out := new(PipelineExecutionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineList) DeepCopyInto(out *PipelineList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Pipeline, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineList. +func (in *PipelineList) DeepCopy() *PipelineList { + if in == nil { + return nil + } + out := new(PipelineList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PipelineList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec) { + *out = *in + if in.Stages != nil { + in, out := &in.Stages, &out.Stages + *out = make([]Stage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpec. +func (in *PipelineSpec) DeepCopy() *PipelineSpec { + if in == nil { + return nil + } + out := new(PipelineSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStatus. +func (in *PipelineStatus) DeepCopy() *PipelineStatus { + if in == nil { + return nil + } + out := new(PipelineStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSecurityPolicyTemplate) DeepCopyInto(out *PodSecurityPolicyTemplate) { *out = *in @@ -3955,6 +4530,22 @@ func (in *ProjectStatus) DeepCopy() *ProjectStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublishImageConfig) DeepCopyInto(out *PublishImageConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublishImageConfig. +func (in *PublishImageConfig) DeepCopy() *PublishImageConfig { + if in == nil { + return nil + } + out := new(PublishImageConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Question) DeepCopyInto(out *Question) { *out = *in @@ -4143,6 +4734,22 @@ func (in *Recipient) DeepCopy() *Recipient { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepoPerm) DeepCopyInto(out *RepoPerm) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoPerm. +func (in *RepoPerm) DeepCopy() *RepoPerm { + if in == nil { + return nil + } + out := new(RepoPerm) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { *out = *in @@ -4216,6 +4823,27 @@ func (in *RoleTemplateList) DeepCopyObject() runtime.Object { } } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunScriptConfig) DeepCopyInto(out *RunScriptConfig) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunScriptConfig. +func (in *RunScriptConfig) DeepCopy() *RunScriptConfig { + if in == nil { + return nil + } + out := new(RunScriptConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SMTPConfig) DeepCopyInto(out *SMTPConfig) { *out = *in @@ -4358,6 +4986,213 @@ func (in *SlackConfig) DeepCopy() *SlackConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeConfig) DeepCopyInto(out *SourceCodeConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeConfig. +func (in *SourceCodeConfig) DeepCopy() *SourceCodeConfig { + if in == nil { + return nil + } + out := new(SourceCodeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeCredential) DeepCopyInto(out *SourceCodeCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeCredential. +func (in *SourceCodeCredential) DeepCopy() *SourceCodeCredential { + if in == nil { + return nil + } + out := new(SourceCodeCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SourceCodeCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeCredentialList) DeepCopyInto(out *SourceCodeCredentialList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SourceCodeCredential, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeCredentialList. +func (in *SourceCodeCredentialList) DeepCopy() *SourceCodeCredentialList { + if in == nil { + return nil + } + out := new(SourceCodeCredentialList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SourceCodeCredentialList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeCredentialSpec) DeepCopyInto(out *SourceCodeCredentialSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeCredentialSpec. +func (in *SourceCodeCredentialSpec) DeepCopy() *SourceCodeCredentialSpec { + if in == nil { + return nil + } + out := new(SourceCodeCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeCredentialStatus) DeepCopyInto(out *SourceCodeCredentialStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeCredentialStatus. +func (in *SourceCodeCredentialStatus) DeepCopy() *SourceCodeCredentialStatus { + if in == nil { + return nil + } + out := new(SourceCodeCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeRepository) DeepCopyInto(out *SourceCodeRepository) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeRepository. +func (in *SourceCodeRepository) DeepCopy() *SourceCodeRepository { + if in == nil { + return nil + } + out := new(SourceCodeRepository) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SourceCodeRepository) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeRepositoryList) DeepCopyInto(out *SourceCodeRepositoryList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SourceCodeRepository, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeRepositoryList. +func (in *SourceCodeRepositoryList) DeepCopy() *SourceCodeRepositoryList { + if in == nil { + return nil + } + out := new(SourceCodeRepositoryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SourceCodeRepositoryList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } else { + return nil + } +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeRepositorySpec) DeepCopyInto(out *SourceCodeRepositorySpec) { + *out = *in + out.Permissions = in.Permissions + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeRepositorySpec. +func (in *SourceCodeRepositorySpec) DeepCopy() *SourceCodeRepositorySpec { + if in == nil { + return nil + } + out := new(SourceCodeRepositorySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceCodeRepositoryStatus) DeepCopyInto(out *SourceCodeRepositoryStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceCodeRepositoryStatus. +func (in *SourceCodeRepositoryStatus) DeepCopy() *SourceCodeRepositoryStatus { + if in == nil { + return nil + } + out := new(SourceCodeRepositoryStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SplunkConfig) DeepCopyInto(out *SplunkConfig) { *out = *in @@ -4374,6 +5209,109 @@ func (in *SplunkConfig) DeepCopy() *SplunkConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Stage) DeepCopyInto(out *Stage) { + *out = *in + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stage. +func (in *Stage) DeepCopy() *Stage { + if in == nil { + return nil + } + out := new(Stage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StageStatus) DeepCopyInto(out *StageStatus) { + *out = *in + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]StepStatus, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StageStatus. +func (in *StageStatus) DeepCopy() *StageStatus { + if in == nil { + return nil + } + out := new(StageStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Step) DeepCopyInto(out *Step) { + *out = *in + if in.SourceCodeConfig != nil { + in, out := &in.SourceCodeConfig, &out.SourceCodeConfig + if *in == nil { + *out = nil + } else { + *out = new(SourceCodeConfig) + **out = **in + } + } + if in.RunScriptConfig != nil { + in, out := &in.RunScriptConfig, &out.RunScriptConfig + if *in == nil { + *out = nil + } else { + *out = new(RunScriptConfig) + (*in).DeepCopyInto(*out) + } + } + if in.PublishImageConfig != nil { + in, out := &in.PublishImageConfig, &out.PublishImageConfig + if *in == nil { + *out = nil + } else { + *out = new(PublishImageConfig) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step. +func (in *Step) DeepCopy() *Step { + if in == nil { + return nil + } + out := new(Step) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepStatus) DeepCopyInto(out *StepStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus. +func (in *StepStatus) DeepCopy() *StepStatus { + if in == nil { + return nil + } + out := new(StepStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SyslogConfig) DeepCopyInto(out *SyslogConfig) { *out = *in diff --git a/apis/management.cattle.io/v3/zz_generated_k8s_client.go b/apis/management.cattle.io/v3/zz_generated_k8s_client.go index 3aa33fc3..3470d9ff 100644 --- a/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -45,6 +45,12 @@ type Interface interface { NotifiersGetter ClusterAlertsGetter ProjectAlertsGetter + SourceCodeCredentialsGetter + ClusterPipelinesGetter + PipelinesGetter + PipelineExecutionsGetter + SourceCodeRepositoriesGetter + PipelineExecutionLogsGetter } type Client struct { @@ -83,6 +89,12 @@ type Client struct { notifierControllers map[string]NotifierController clusterAlertControllers map[string]ClusterAlertController projectAlertControllers map[string]ProjectAlertController + sourceCodeCredentialControllers map[string]SourceCodeCredentialController + clusterPipelineControllers map[string]ClusterPipelineController + pipelineControllers map[string]PipelineController + pipelineExecutionControllers map[string]PipelineExecutionController + sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController + pipelineExecutionLogControllers map[string]PipelineExecutionLogController } func NewForConfig(config rest.Config) (Interface, error) { @@ -130,6 +142,12 @@ func NewForConfig(config rest.Config) (Interface, error) { notifierControllers: map[string]NotifierController{}, clusterAlertControllers: map[string]ClusterAlertController{}, projectAlertControllers: map[string]ProjectAlertController{}, + sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{}, + clusterPipelineControllers: map[string]ClusterPipelineController{}, + pipelineControllers: map[string]PipelineController{}, + pipelineExecutionControllers: map[string]PipelineExecutionController{}, + sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{}, + pipelineExecutionLogControllers: map[string]PipelineExecutionLogController{}, }, nil } @@ -547,3 +565,81 @@ func (c *Client) ProjectAlerts(namespace string) ProjectAlertInterface { objectClient: objectClient, } } + +type SourceCodeCredentialsGetter interface { + SourceCodeCredentials(namespace string) SourceCodeCredentialInterface +} + +func (c *Client) SourceCodeCredentials(namespace string) SourceCodeCredentialInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{}) + return &sourceCodeCredentialClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type ClusterPipelinesGetter interface { + ClusterPipelines(namespace string) ClusterPipelineInterface +} + +func (c *Client) ClusterPipelines(namespace string) ClusterPipelineInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &ClusterPipelineResource, ClusterPipelineGroupVersionKind, clusterPipelineFactory{}) + return &clusterPipelineClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type PipelinesGetter interface { + Pipelines(namespace string) PipelineInterface +} + +func (c *Client) Pipelines(namespace string) PipelineInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &PipelineResource, PipelineGroupVersionKind, pipelineFactory{}) + return &pipelineClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type PipelineExecutionsGetter interface { + PipelineExecutions(namespace string) PipelineExecutionInterface +} + +func (c *Client) PipelineExecutions(namespace string) PipelineExecutionInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{}) + return &pipelineExecutionClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type SourceCodeRepositoriesGetter interface { + SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface +} + +func (c *Client) SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{}) + return &sourceCodeRepositoryClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type PipelineExecutionLogsGetter interface { + PipelineExecutionLogs(namespace string) PipelineExecutionLogInterface +} + +func (c *Client) PipelineExecutionLogs(namespace string) PipelineExecutionLogInterface { + objectClient := clientbase.NewObjectClient(namespace, c.restClient, &PipelineExecutionLogResource, PipelineExecutionLogGroupVersionKind, pipelineExecutionLogFactory{}) + return &pipelineExecutionLogClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_controller.go b/apis/management.cattle.io/v3/zz_generated_pipeline_controller.go new file mode 100644 index 00000000..dae252f6 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_controller.go @@ -0,0 +1,252 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + PipelineGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "Pipeline", + } + PipelineResource = metav1.APIResource{ + Name: "pipelines", + SingularName: "pipeline", + Namespaced: true, + + Kind: PipelineGroupVersionKind.Kind, + } +) + +type PipelineList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Pipeline +} + +type PipelineHandlerFunc func(key string, obj *Pipeline) error + +type PipelineLister interface { + List(namespace string, selector labels.Selector) (ret []*Pipeline, err error) + Get(namespace, name string) (*Pipeline, error) +} + +type PipelineController interface { + Informer() cache.SharedIndexInformer + Lister() PipelineLister + AddHandler(name string, handler PipelineHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler PipelineHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type PipelineInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*Pipeline) (*Pipeline, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*Pipeline, error) + Get(name string, opts metav1.GetOptions) (*Pipeline, error) + Update(*Pipeline) (*Pipeline, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*PipelineList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() PipelineController + AddHandler(name string, sync PipelineHandlerFunc) + AddLifecycle(name string, lifecycle PipelineLifecycle) + AddClusterScopedHandler(name, clusterName string, sync PipelineHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineLifecycle) +} + +type pipelineLister struct { + controller *pipelineController +} + +func (l *pipelineLister) List(namespace string, selector labels.Selector) (ret []*Pipeline, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*Pipeline)) + }) + return +} + +func (l *pipelineLister) Get(namespace, name string) (*Pipeline, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: PipelineGroupVersionKind.Group, + Resource: "pipeline", + }, name) + } + return obj.(*Pipeline), nil +} + +type pipelineController struct { + controller.GenericController +} + +func (c *pipelineController) Lister() PipelineLister { + return &pipelineLister{ + controller: c, + } +} + +func (c *pipelineController) AddHandler(name string, handler PipelineHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*Pipeline)) + }) +} + +func (c *pipelineController) AddClusterScopedHandler(name, cluster string, handler PipelineHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*Pipeline)) + }) +} + +type pipelineFactory struct { +} + +func (c pipelineFactory) Object() runtime.Object { + return &Pipeline{} +} + +func (c pipelineFactory) List() runtime.Object { + return &PipelineList{} +} + +func (s *pipelineClient) Controller() PipelineController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.pipelineControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(PipelineGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &pipelineController{ + GenericController: genericController, + } + + s.client.pipelineControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type pipelineClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller PipelineController +} + +func (s *pipelineClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *pipelineClient) Create(o *Pipeline) (*Pipeline, error) { + obj, err := s.objectClient.Create(o) + return obj.(*Pipeline), err +} + +func (s *pipelineClient) Get(name string, opts metav1.GetOptions) (*Pipeline, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*Pipeline), err +} + +func (s *pipelineClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*Pipeline, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*Pipeline), err +} + +func (s *pipelineClient) Update(o *Pipeline) (*Pipeline, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*Pipeline), err +} + +func (s *pipelineClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *pipelineClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *pipelineClient) List(opts metav1.ListOptions) (*PipelineList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*PipelineList), err +} + +func (s *pipelineClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *pipelineClient) Patch(o *Pipeline, data []byte, subresources ...string) (*Pipeline, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*Pipeline), err +} + +func (s *pipelineClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *pipelineClient) AddHandler(name string, sync PipelineHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *pipelineClient) AddLifecycle(name string, lifecycle PipelineLifecycle) { + sync := NewPipelineLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *pipelineClient) AddClusterScopedHandler(name, clusterName string, sync PipelineHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *pipelineClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineLifecycle) { + sync := NewPipelineLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_execution_controller.go b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_controller.go new file mode 100644 index 00000000..aa8f6509 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_controller.go @@ -0,0 +1,252 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + PipelineExecutionGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "PipelineExecution", + } + PipelineExecutionResource = metav1.APIResource{ + Name: "pipelineexecutions", + SingularName: "pipelineexecution", + Namespaced: true, + + Kind: PipelineExecutionGroupVersionKind.Kind, + } +) + +type PipelineExecutionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PipelineExecution +} + +type PipelineExecutionHandlerFunc func(key string, obj *PipelineExecution) error + +type PipelineExecutionLister interface { + List(namespace string, selector labels.Selector) (ret []*PipelineExecution, err error) + Get(namespace, name string) (*PipelineExecution, error) +} + +type PipelineExecutionController interface { + Informer() cache.SharedIndexInformer + Lister() PipelineExecutionLister + AddHandler(name string, handler PipelineExecutionHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler PipelineExecutionHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type PipelineExecutionInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*PipelineExecution) (*PipelineExecution, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error) + Get(name string, opts metav1.GetOptions) (*PipelineExecution, error) + Update(*PipelineExecution) (*PipelineExecution, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*PipelineExecutionList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() PipelineExecutionController + AddHandler(name string, sync PipelineExecutionHandlerFunc) + AddLifecycle(name string, lifecycle PipelineExecutionLifecycle) + AddClusterScopedHandler(name, clusterName string, sync PipelineExecutionHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineExecutionLifecycle) +} + +type pipelineExecutionLister struct { + controller *pipelineExecutionController +} + +func (l *pipelineExecutionLister) List(namespace string, selector labels.Selector) (ret []*PipelineExecution, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*PipelineExecution)) + }) + return +} + +func (l *pipelineExecutionLister) Get(namespace, name string) (*PipelineExecution, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: PipelineExecutionGroupVersionKind.Group, + Resource: "pipelineExecution", + }, name) + } + return obj.(*PipelineExecution), nil +} + +type pipelineExecutionController struct { + controller.GenericController +} + +func (c *pipelineExecutionController) Lister() PipelineExecutionLister { + return &pipelineExecutionLister{ + controller: c, + } +} + +func (c *pipelineExecutionController) AddHandler(name string, handler PipelineExecutionHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*PipelineExecution)) + }) +} + +func (c *pipelineExecutionController) AddClusterScopedHandler(name, cluster string, handler PipelineExecutionHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*PipelineExecution)) + }) +} + +type pipelineExecutionFactory struct { +} + +func (c pipelineExecutionFactory) Object() runtime.Object { + return &PipelineExecution{} +} + +func (c pipelineExecutionFactory) List() runtime.Object { + return &PipelineExecutionList{} +} + +func (s *pipelineExecutionClient) Controller() PipelineExecutionController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.pipelineExecutionControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(PipelineExecutionGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &pipelineExecutionController{ + GenericController: genericController, + } + + s.client.pipelineExecutionControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type pipelineExecutionClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller PipelineExecutionController +} + +func (s *pipelineExecutionClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *pipelineExecutionClient) Create(o *PipelineExecution) (*PipelineExecution, error) { + obj, err := s.objectClient.Create(o) + return obj.(*PipelineExecution), err +} + +func (s *pipelineExecutionClient) Get(name string, opts metav1.GetOptions) (*PipelineExecution, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*PipelineExecution), err +} + +func (s *pipelineExecutionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*PipelineExecution), err +} + +func (s *pipelineExecutionClient) Update(o *PipelineExecution) (*PipelineExecution, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*PipelineExecution), err +} + +func (s *pipelineExecutionClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *pipelineExecutionClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *pipelineExecutionClient) List(opts metav1.ListOptions) (*PipelineExecutionList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*PipelineExecutionList), err +} + +func (s *pipelineExecutionClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *pipelineExecutionClient) Patch(o *PipelineExecution, data []byte, subresources ...string) (*PipelineExecution, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*PipelineExecution), err +} + +func (s *pipelineExecutionClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *pipelineExecutionClient) AddHandler(name string, sync PipelineExecutionHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *pipelineExecutionClient) AddLifecycle(name string, lifecycle PipelineExecutionLifecycle) { + sync := NewPipelineExecutionLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *pipelineExecutionClient) AddClusterScopedHandler(name, clusterName string, sync PipelineExecutionHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *pipelineExecutionClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineExecutionLifecycle) { + sync := NewPipelineExecutionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go new file mode 100644 index 00000000..29ae1b8c --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type PipelineExecutionLifecycle interface { + Create(obj *PipelineExecution) (*PipelineExecution, error) + Remove(obj *PipelineExecution) (*PipelineExecution, error) + Updated(obj *PipelineExecution) (*PipelineExecution, error) +} + +type pipelineExecutionLifecycleAdapter struct { + lifecycle PipelineExecutionLifecycle +} + +func (w *pipelineExecutionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*PipelineExecution)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineExecutionLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*PipelineExecution)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineExecutionLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*PipelineExecution)) + if o == nil { + return nil, err + } + return o, err +} + +func NewPipelineExecutionLifecycleAdapter(name string, clusterScoped bool, client PipelineExecutionInterface, l PipelineExecutionLifecycle) PipelineExecutionHandlerFunc { + adapter := &pipelineExecutionLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *PipelineExecution) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_controller.go b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_controller.go new file mode 100644 index 00000000..38924596 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_controller.go @@ -0,0 +1,252 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + PipelineExecutionLogGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "PipelineExecutionLog", + } + PipelineExecutionLogResource = metav1.APIResource{ + Name: "pipelineexecutionlogs", + SingularName: "pipelineexecutionlog", + Namespaced: true, + + Kind: PipelineExecutionLogGroupVersionKind.Kind, + } +) + +type PipelineExecutionLogList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PipelineExecutionLog +} + +type PipelineExecutionLogHandlerFunc func(key string, obj *PipelineExecutionLog) error + +type PipelineExecutionLogLister interface { + List(namespace string, selector labels.Selector) (ret []*PipelineExecutionLog, err error) + Get(namespace, name string) (*PipelineExecutionLog, error) +} + +type PipelineExecutionLogController interface { + Informer() cache.SharedIndexInformer + Lister() PipelineExecutionLogLister + AddHandler(name string, handler PipelineExecutionLogHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler PipelineExecutionLogHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type PipelineExecutionLogInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*PipelineExecutionLog) (*PipelineExecutionLog, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecutionLog, error) + Get(name string, opts metav1.GetOptions) (*PipelineExecutionLog, error) + Update(*PipelineExecutionLog) (*PipelineExecutionLog, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*PipelineExecutionLogList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() PipelineExecutionLogController + AddHandler(name string, sync PipelineExecutionLogHandlerFunc) + AddLifecycle(name string, lifecycle PipelineExecutionLogLifecycle) + AddClusterScopedHandler(name, clusterName string, sync PipelineExecutionLogHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineExecutionLogLifecycle) +} + +type pipelineExecutionLogLister struct { + controller *pipelineExecutionLogController +} + +func (l *pipelineExecutionLogLister) List(namespace string, selector labels.Selector) (ret []*PipelineExecutionLog, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*PipelineExecutionLog)) + }) + return +} + +func (l *pipelineExecutionLogLister) Get(namespace, name string) (*PipelineExecutionLog, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: PipelineExecutionLogGroupVersionKind.Group, + Resource: "pipelineExecutionLog", + }, name) + } + return obj.(*PipelineExecutionLog), nil +} + +type pipelineExecutionLogController struct { + controller.GenericController +} + +func (c *pipelineExecutionLogController) Lister() PipelineExecutionLogLister { + return &pipelineExecutionLogLister{ + controller: c, + } +} + +func (c *pipelineExecutionLogController) AddHandler(name string, handler PipelineExecutionLogHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*PipelineExecutionLog)) + }) +} + +func (c *pipelineExecutionLogController) AddClusterScopedHandler(name, cluster string, handler PipelineExecutionLogHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*PipelineExecutionLog)) + }) +} + +type pipelineExecutionLogFactory struct { +} + +func (c pipelineExecutionLogFactory) Object() runtime.Object { + return &PipelineExecutionLog{} +} + +func (c pipelineExecutionLogFactory) List() runtime.Object { + return &PipelineExecutionLogList{} +} + +func (s *pipelineExecutionLogClient) Controller() PipelineExecutionLogController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.pipelineExecutionLogControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(PipelineExecutionLogGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &pipelineExecutionLogController{ + GenericController: genericController, + } + + s.client.pipelineExecutionLogControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type pipelineExecutionLogClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller PipelineExecutionLogController +} + +func (s *pipelineExecutionLogClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *pipelineExecutionLogClient) Create(o *PipelineExecutionLog) (*PipelineExecutionLog, error) { + obj, err := s.objectClient.Create(o) + return obj.(*PipelineExecutionLog), err +} + +func (s *pipelineExecutionLogClient) Get(name string, opts metav1.GetOptions) (*PipelineExecutionLog, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*PipelineExecutionLog), err +} + +func (s *pipelineExecutionLogClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecutionLog, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*PipelineExecutionLog), err +} + +func (s *pipelineExecutionLogClient) Update(o *PipelineExecutionLog) (*PipelineExecutionLog, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*PipelineExecutionLog), err +} + +func (s *pipelineExecutionLogClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *pipelineExecutionLogClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *pipelineExecutionLogClient) List(opts metav1.ListOptions) (*PipelineExecutionLogList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*PipelineExecutionLogList), err +} + +func (s *pipelineExecutionLogClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *pipelineExecutionLogClient) Patch(o *PipelineExecutionLog, data []byte, subresources ...string) (*PipelineExecutionLog, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*PipelineExecutionLog), err +} + +func (s *pipelineExecutionLogClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *pipelineExecutionLogClient) AddHandler(name string, sync PipelineExecutionLogHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *pipelineExecutionLogClient) AddLifecycle(name string, lifecycle PipelineExecutionLogLifecycle) { + sync := NewPipelineExecutionLogLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *pipelineExecutionLogClient) AddClusterScopedHandler(name, clusterName string, sync PipelineExecutionLogHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *pipelineExecutionLogClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineExecutionLogLifecycle) { + sync := NewPipelineExecutionLogLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_lifecycle_adapter.go new file mode 100644 index 00000000..5caaaf5c --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_execution_log_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type PipelineExecutionLogLifecycle interface { + Create(obj *PipelineExecutionLog) (*PipelineExecutionLog, error) + Remove(obj *PipelineExecutionLog) (*PipelineExecutionLog, error) + Updated(obj *PipelineExecutionLog) (*PipelineExecutionLog, error) +} + +type pipelineExecutionLogLifecycleAdapter struct { + lifecycle PipelineExecutionLogLifecycle +} + +func (w *pipelineExecutionLogLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*PipelineExecutionLog)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineExecutionLogLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*PipelineExecutionLog)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineExecutionLogLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*PipelineExecutionLog)) + if o == nil { + return nil, err + } + return o, err +} + +func NewPipelineExecutionLogLifecycleAdapter(name string, clusterScoped bool, client PipelineExecutionLogInterface, l PipelineExecutionLogLifecycle) PipelineExecutionLogHandlerFunc { + adapter := &pipelineExecutionLogLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *PipelineExecutionLog) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go new file mode 100644 index 00000000..e14eab49 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type PipelineLifecycle interface { + Create(obj *Pipeline) (*Pipeline, error) + Remove(obj *Pipeline) (*Pipeline, error) + Updated(obj *Pipeline) (*Pipeline, error) +} + +type pipelineLifecycleAdapter struct { + lifecycle PipelineLifecycle +} + +func (w *pipelineLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*Pipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*Pipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *pipelineLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*Pipeline)) + if o == nil { + return nil, err + } + return o, err +} + +func NewPipelineLifecycleAdapter(name string, clusterScoped bool, client PipelineInterface, l PipelineLifecycle) PipelineHandlerFunc { + adapter := &pipelineLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *Pipeline) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_scheme.go b/apis/management.cattle.io/v3/zz_generated_scheme.go index f43d9d3c..019f508d 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -95,6 +95,18 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterAlertList{}, &ProjectAlert{}, &ProjectAlertList{}, + &SourceCodeCredential{}, + &SourceCodeCredentialList{}, + &ClusterPipeline{}, + &ClusterPipelineList{}, + &Pipeline{}, + &PipelineList{}, + &PipelineExecution{}, + &PipelineExecutionList{}, + &SourceCodeRepository{}, + &SourceCodeRepositoryList{}, + &PipelineExecutionLog{}, + &PipelineExecutionLogList{}, ) return nil } diff --git a/apis/management.cattle.io/v3/zz_generated_source_code_credential_controller.go b/apis/management.cattle.io/v3/zz_generated_source_code_credential_controller.go new file mode 100644 index 00000000..d0fdc02c --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_source_code_credential_controller.go @@ -0,0 +1,251 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + SourceCodeCredentialGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "SourceCodeCredential", + } + SourceCodeCredentialResource = metav1.APIResource{ + Name: "sourcecodecredentials", + SingularName: "sourcecodecredential", + Namespaced: false, + Kind: SourceCodeCredentialGroupVersionKind.Kind, + } +) + +type SourceCodeCredentialList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SourceCodeCredential +} + +type SourceCodeCredentialHandlerFunc func(key string, obj *SourceCodeCredential) error + +type SourceCodeCredentialLister interface { + List(namespace string, selector labels.Selector) (ret []*SourceCodeCredential, err error) + Get(namespace, name string) (*SourceCodeCredential, error) +} + +type SourceCodeCredentialController interface { + Informer() cache.SharedIndexInformer + Lister() SourceCodeCredentialLister + AddHandler(name string, handler SourceCodeCredentialHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler SourceCodeCredentialHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type SourceCodeCredentialInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*SourceCodeCredential) (*SourceCodeCredential, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeCredential, error) + Get(name string, opts metav1.GetOptions) (*SourceCodeCredential, error) + Update(*SourceCodeCredential) (*SourceCodeCredential, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*SourceCodeCredentialList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() SourceCodeCredentialController + AddHandler(name string, sync SourceCodeCredentialHandlerFunc) + AddLifecycle(name string, lifecycle SourceCodeCredentialLifecycle) + AddClusterScopedHandler(name, clusterName string, sync SourceCodeCredentialHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeCredentialLifecycle) +} + +type sourceCodeCredentialLister struct { + controller *sourceCodeCredentialController +} + +func (l *sourceCodeCredentialLister) List(namespace string, selector labels.Selector) (ret []*SourceCodeCredential, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*SourceCodeCredential)) + }) + return +} + +func (l *sourceCodeCredentialLister) Get(namespace, name string) (*SourceCodeCredential, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: SourceCodeCredentialGroupVersionKind.Group, + Resource: "sourceCodeCredential", + }, name) + } + return obj.(*SourceCodeCredential), nil +} + +type sourceCodeCredentialController struct { + controller.GenericController +} + +func (c *sourceCodeCredentialController) Lister() SourceCodeCredentialLister { + return &sourceCodeCredentialLister{ + controller: c, + } +} + +func (c *sourceCodeCredentialController) AddHandler(name string, handler SourceCodeCredentialHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*SourceCodeCredential)) + }) +} + +func (c *sourceCodeCredentialController) AddClusterScopedHandler(name, cluster string, handler SourceCodeCredentialHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*SourceCodeCredential)) + }) +} + +type sourceCodeCredentialFactory struct { +} + +func (c sourceCodeCredentialFactory) Object() runtime.Object { + return &SourceCodeCredential{} +} + +func (c sourceCodeCredentialFactory) List() runtime.Object { + return &SourceCodeCredentialList{} +} + +func (s *sourceCodeCredentialClient) Controller() SourceCodeCredentialController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.sourceCodeCredentialControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(SourceCodeCredentialGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &sourceCodeCredentialController{ + GenericController: genericController, + } + + s.client.sourceCodeCredentialControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type sourceCodeCredentialClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller SourceCodeCredentialController +} + +func (s *sourceCodeCredentialClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *sourceCodeCredentialClient) Create(o *SourceCodeCredential) (*SourceCodeCredential, error) { + obj, err := s.objectClient.Create(o) + return obj.(*SourceCodeCredential), err +} + +func (s *sourceCodeCredentialClient) Get(name string, opts metav1.GetOptions) (*SourceCodeCredential, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*SourceCodeCredential), err +} + +func (s *sourceCodeCredentialClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeCredential, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*SourceCodeCredential), err +} + +func (s *sourceCodeCredentialClient) Update(o *SourceCodeCredential) (*SourceCodeCredential, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*SourceCodeCredential), err +} + +func (s *sourceCodeCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *sourceCodeCredentialClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *sourceCodeCredentialClient) List(opts metav1.ListOptions) (*SourceCodeCredentialList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*SourceCodeCredentialList), err +} + +func (s *sourceCodeCredentialClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *sourceCodeCredentialClient) Patch(o *SourceCodeCredential, data []byte, subresources ...string) (*SourceCodeCredential, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*SourceCodeCredential), err +} + +func (s *sourceCodeCredentialClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *sourceCodeCredentialClient) AddHandler(name string, sync SourceCodeCredentialHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *sourceCodeCredentialClient) AddLifecycle(name string, lifecycle SourceCodeCredentialLifecycle) { + sync := NewSourceCodeCredentialLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *sourceCodeCredentialClient) AddClusterScopedHandler(name, clusterName string, sync SourceCodeCredentialHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *sourceCodeCredentialClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeCredentialLifecycle) { + sync := NewSourceCodeCredentialLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go new file mode 100644 index 00000000..5b5217ee --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type SourceCodeCredentialLifecycle interface { + Create(obj *SourceCodeCredential) (*SourceCodeCredential, error) + Remove(obj *SourceCodeCredential) (*SourceCodeCredential, error) + Updated(obj *SourceCodeCredential) (*SourceCodeCredential, error) +} + +type sourceCodeCredentialLifecycleAdapter struct { + lifecycle SourceCodeCredentialLifecycle +} + +func (w *sourceCodeCredentialLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*SourceCodeCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *sourceCodeCredentialLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*SourceCodeCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *sourceCodeCredentialLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*SourceCodeCredential)) + if o == nil { + return nil, err + } + return o, err +} + +func NewSourceCodeCredentialLifecycleAdapter(name string, clusterScoped bool, client SourceCodeCredentialInterface, l SourceCodeCredentialLifecycle) SourceCodeCredentialHandlerFunc { + adapter := &sourceCodeCredentialLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *SourceCodeCredential) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_source_code_repository_controller.go b/apis/management.cattle.io/v3/zz_generated_source_code_repository_controller.go new file mode 100644 index 00000000..8a6d2873 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_source_code_repository_controller.go @@ -0,0 +1,251 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/clientbase" + "github.com/rancher/norman/controller" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + SourceCodeRepositoryGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "SourceCodeRepository", + } + SourceCodeRepositoryResource = metav1.APIResource{ + Name: "sourcecoderepositories", + SingularName: "sourcecoderepository", + Namespaced: false, + Kind: SourceCodeRepositoryGroupVersionKind.Kind, + } +) + +type SourceCodeRepositoryList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SourceCodeRepository +} + +type SourceCodeRepositoryHandlerFunc func(key string, obj *SourceCodeRepository) error + +type SourceCodeRepositoryLister interface { + List(namespace string, selector labels.Selector) (ret []*SourceCodeRepository, err error) + Get(namespace, name string) (*SourceCodeRepository, error) +} + +type SourceCodeRepositoryController interface { + Informer() cache.SharedIndexInformer + Lister() SourceCodeRepositoryLister + AddHandler(name string, handler SourceCodeRepositoryHandlerFunc) + AddClusterScopedHandler(name, clusterName string, handler SourceCodeRepositoryHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type SourceCodeRepositoryInterface interface { + ObjectClient() *clientbase.ObjectClient + Create(*SourceCodeRepository) (*SourceCodeRepository, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeRepository, error) + Get(name string, opts metav1.GetOptions) (*SourceCodeRepository, error) + Update(*SourceCodeRepository) (*SourceCodeRepository, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*SourceCodeRepositoryList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() SourceCodeRepositoryController + AddHandler(name string, sync SourceCodeRepositoryHandlerFunc) + AddLifecycle(name string, lifecycle SourceCodeRepositoryLifecycle) + AddClusterScopedHandler(name, clusterName string, sync SourceCodeRepositoryHandlerFunc) + AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeRepositoryLifecycle) +} + +type sourceCodeRepositoryLister struct { + controller *sourceCodeRepositoryController +} + +func (l *sourceCodeRepositoryLister) List(namespace string, selector labels.Selector) (ret []*SourceCodeRepository, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*SourceCodeRepository)) + }) + return +} + +func (l *sourceCodeRepositoryLister) Get(namespace, name string) (*SourceCodeRepository, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: SourceCodeRepositoryGroupVersionKind.Group, + Resource: "sourceCodeRepository", + }, name) + } + return obj.(*SourceCodeRepository), nil +} + +type sourceCodeRepositoryController struct { + controller.GenericController +} + +func (c *sourceCodeRepositoryController) Lister() SourceCodeRepositoryLister { + return &sourceCodeRepositoryLister{ + controller: c, + } +} + +func (c *sourceCodeRepositoryController) AddHandler(name string, handler SourceCodeRepositoryHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + return handler(key, obj.(*SourceCodeRepository)) + }) +} + +func (c *sourceCodeRepositoryController) AddClusterScopedHandler(name, cluster string, handler SourceCodeRepositoryHandlerFunc) { + c.GenericController.AddHandler(name, func(key string) error { + obj, exists, err := c.Informer().GetStore().GetByKey(key) + if err != nil { + return err + } + if !exists { + return handler(key, nil) + } + + if !controller.ObjectInCluster(cluster, obj) { + return nil + } + + return handler(key, obj.(*SourceCodeRepository)) + }) +} + +type sourceCodeRepositoryFactory struct { +} + +func (c sourceCodeRepositoryFactory) Object() runtime.Object { + return &SourceCodeRepository{} +} + +func (c sourceCodeRepositoryFactory) List() runtime.Object { + return &SourceCodeRepositoryList{} +} + +func (s *sourceCodeRepositoryClient) Controller() SourceCodeRepositoryController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.sourceCodeRepositoryControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(SourceCodeRepositoryGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &sourceCodeRepositoryController{ + GenericController: genericController, + } + + s.client.sourceCodeRepositoryControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type sourceCodeRepositoryClient struct { + client *Client + ns string + objectClient *clientbase.ObjectClient + controller SourceCodeRepositoryController +} + +func (s *sourceCodeRepositoryClient) ObjectClient() *clientbase.ObjectClient { + return s.objectClient +} + +func (s *sourceCodeRepositoryClient) Create(o *SourceCodeRepository) (*SourceCodeRepository, error) { + obj, err := s.objectClient.Create(o) + return obj.(*SourceCodeRepository), err +} + +func (s *sourceCodeRepositoryClient) Get(name string, opts metav1.GetOptions) (*SourceCodeRepository, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*SourceCodeRepository), err +} + +func (s *sourceCodeRepositoryClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeRepository, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*SourceCodeRepository), err +} + +func (s *sourceCodeRepositoryClient) Update(o *SourceCodeRepository) (*SourceCodeRepository, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*SourceCodeRepository), err +} + +func (s *sourceCodeRepositoryClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *sourceCodeRepositoryClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *sourceCodeRepositoryClient) List(opts metav1.ListOptions) (*SourceCodeRepositoryList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*SourceCodeRepositoryList), err +} + +func (s *sourceCodeRepositoryClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *sourceCodeRepositoryClient) Patch(o *SourceCodeRepository, data []byte, subresources ...string) (*SourceCodeRepository, error) { + obj, err := s.objectClient.Patch(o.Name, o, data, subresources...) + return obj.(*SourceCodeRepository), err +} + +func (s *sourceCodeRepositoryClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *sourceCodeRepositoryClient) AddHandler(name string, sync SourceCodeRepositoryHandlerFunc) { + s.Controller().AddHandler(name, sync) +} + +func (s *sourceCodeRepositoryClient) AddLifecycle(name string, lifecycle SourceCodeRepositoryLifecycle) { + sync := NewSourceCodeRepositoryLifecycleAdapter(name, false, s, lifecycle) + s.AddHandler(name, sync) +} + +func (s *sourceCodeRepositoryClient) AddClusterScopedHandler(name, clusterName string, sync SourceCodeRepositoryHandlerFunc) { + s.Controller().AddClusterScopedHandler(name, clusterName, sync) +} + +func (s *sourceCodeRepositoryClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeRepositoryLifecycle) { + sync := NewSourceCodeRepositoryLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.AddClusterScopedHandler(name, clusterName, sync) +} diff --git a/apis/management.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go new file mode 100644 index 00000000..e21cb1b7 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go @@ -0,0 +1,51 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type SourceCodeRepositoryLifecycle interface { + Create(obj *SourceCodeRepository) (*SourceCodeRepository, error) + Remove(obj *SourceCodeRepository) (*SourceCodeRepository, error) + Updated(obj *SourceCodeRepository) (*SourceCodeRepository, error) +} + +type sourceCodeRepositoryLifecycleAdapter struct { + lifecycle SourceCodeRepositoryLifecycle +} + +func (w *sourceCodeRepositoryLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*SourceCodeRepository)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *sourceCodeRepositoryLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*SourceCodeRepository)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *sourceCodeRepositoryLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*SourceCodeRepository)) + if o == nil { + return nil, err + } + return o, err +} + +func NewSourceCodeRepositoryLifecycleAdapter(name string, clusterScoped bool, client SourceCodeRepositoryInterface, l SourceCodeRepositoryLifecycle) SourceCodeRepositoryHandlerFunc { + adapter := &sourceCodeRepositoryLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *SourceCodeRepository) error { + if obj == nil { + return syncFn(key, nil) + } + return syncFn(key, obj) + } +} diff --git a/client/management/v3/zz_generated_auth_app_input.go b/client/management/v3/zz_generated_auth_app_input.go new file mode 100644 index 00000000..1067c225 --- /dev/null +++ b/client/management/v3/zz_generated_auth_app_input.go @@ -0,0 +1,22 @@ +package client + +const ( + AuthAppInputType = "authAppInput" + AuthAppInputFieldClientID = "clientId" + AuthAppInputFieldClientSecret = "clientSecret" + AuthAppInputFieldCode = "code" + AuthAppInputFieldHost = "host" + AuthAppInputFieldRedirectURL = "redirectUrl" + AuthAppInputFieldSourceCodeType = "sourceCodeType" + AuthAppInputFieldTLS = "tls" +) + +type AuthAppInput struct { + ClientID string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` + Code string `json:"code,omitempty"` + Host string `json:"host,omitempty"` + RedirectURL string `json:"redirectUrl,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` + TLS *bool `json:"tls,omitempty"` +} diff --git a/client/management/v3/zz_generated_auth_user_input.go b/client/management/v3/zz_generated_auth_user_input.go new file mode 100644 index 00000000..24bb2811 --- /dev/null +++ b/client/management/v3/zz_generated_auth_user_input.go @@ -0,0 +1,14 @@ +package client + +const ( + AuthUserInputType = "authUserInput" + AuthUserInputFieldCode = "code" + AuthUserInputFieldRedirectURL = "redirectUrl" + AuthUserInputFieldSourceCodeType = "sourceCodeType" +) + +type AuthUserInput struct { + Code string `json:"code,omitempty"` + RedirectURL string `json:"redirectUrl,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` +} diff --git a/client/management/v3/zz_generated_client.go b/client/management/v3/zz_generated_client.go index ee58ec7c..fd9b7d50 100644 --- a/client/management/v3/zz_generated_client.go +++ b/client/management/v3/zz_generated_client.go @@ -39,6 +39,12 @@ type Client struct { Notifier NotifierOperations ClusterAlert ClusterAlertOperations ProjectAlert ProjectAlertOperations + SourceCodeCredential SourceCodeCredentialOperations + ClusterPipeline ClusterPipelineOperations + Pipeline PipelineOperations + PipelineExecution PipelineExecutionOperations + SourceCodeRepository SourceCodeRepositoryOperations + PipelineExecutionLog PipelineExecutionLogOperations } func NewClient(opts *clientbase.ClientOpts) (*Client, error) { @@ -83,6 +89,12 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.Notifier = newNotifierClient(client) client.ClusterAlert = newClusterAlertClient(client) client.ProjectAlert = newProjectAlertClient(client) + client.SourceCodeCredential = newSourceCodeCredentialClient(client) + client.ClusterPipeline = newClusterPipelineClient(client) + client.Pipeline = newPipelineClient(client) + client.PipelineExecution = newPipelineExecutionClient(client) + client.SourceCodeRepository = newSourceCodeRepositoryClient(client) + client.PipelineExecutionLog = newPipelineExecutionLogClient(client) return client, nil } diff --git a/client/management/v3/zz_generated_cluster_pipeline.go b/client/management/v3/zz_generated_cluster_pipeline.go new file mode 100644 index 00000000..e45c5a98 --- /dev/null +++ b/client/management/v3/zz_generated_cluster_pipeline.go @@ -0,0 +1,118 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterPipelineType = "clusterPipeline" + ClusterPipelineFieldAnnotations = "annotations" + ClusterPipelineFieldClusterId = "clusterId" + ClusterPipelineFieldCreated = "created" + ClusterPipelineFieldCreatorID = "creatorId" + ClusterPipelineFieldDeploy = "deploy" + ClusterPipelineFieldGithubConfig = "githubConfig" + ClusterPipelineFieldLabels = "labels" + ClusterPipelineFieldName = "name" + ClusterPipelineFieldNamespaceId = "namespaceId" + ClusterPipelineFieldOwnerReferences = "ownerReferences" + ClusterPipelineFieldRemoved = "removed" + ClusterPipelineFieldState = "state" + ClusterPipelineFieldStatus = "status" + ClusterPipelineFieldTransitioning = "transitioning" + ClusterPipelineFieldTransitioningMessage = "transitioningMessage" + ClusterPipelineFieldUuid = "uuid" +) + +type ClusterPipeline struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty"` + ClusterId string `json:"clusterId,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + Deploy *bool `json:"deploy,omitempty"` + GithubConfig *GithubClusterConfig `json:"githubConfig,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty"` + State string `json:"state,omitempty"` + Status *ClusterPipelineStatus `json:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type ClusterPipelineCollection struct { + types.Collection + Data []ClusterPipeline `json:"data,omitempty"` + client *ClusterPipelineClient +} + +type ClusterPipelineClient struct { + apiClient *Client +} + +type ClusterPipelineOperations interface { + List(opts *types.ListOpts) (*ClusterPipelineCollection, error) + Create(opts *ClusterPipeline) (*ClusterPipeline, error) + Update(existing *ClusterPipeline, updates interface{}) (*ClusterPipeline, error) + ByID(id string) (*ClusterPipeline, error) + Delete(container *ClusterPipeline) error + + ActionAuthuser(*ClusterPipeline, *AuthUserInput) (*SourceCodeCredential, error) +} + +func newClusterPipelineClient(apiClient *Client) *ClusterPipelineClient { + return &ClusterPipelineClient{ + apiClient: apiClient, + } +} + +func (c *ClusterPipelineClient) Create(container *ClusterPipeline) (*ClusterPipeline, error) { + resp := &ClusterPipeline{} + err := c.apiClient.Ops.DoCreate(ClusterPipelineType, container, resp) + return resp, err +} + +func (c *ClusterPipelineClient) Update(existing *ClusterPipeline, updates interface{}) (*ClusterPipeline, error) { + resp := &ClusterPipeline{} + err := c.apiClient.Ops.DoUpdate(ClusterPipelineType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterPipelineClient) List(opts *types.ListOpts) (*ClusterPipelineCollection, error) { + resp := &ClusterPipelineCollection{} + err := c.apiClient.Ops.DoList(ClusterPipelineType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *ClusterPipelineCollection) Next() (*ClusterPipelineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterPipelineCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterPipelineClient) ByID(id string) (*ClusterPipeline, error) { + resp := &ClusterPipeline{} + err := c.apiClient.Ops.DoByID(ClusterPipelineType, id, resp) + return resp, err +} + +func (c *ClusterPipelineClient) Delete(container *ClusterPipeline) error { + return c.apiClient.Ops.DoResourceDelete(ClusterPipelineType, &container.Resource) +} + +func (c *ClusterPipelineClient) ActionAuthuser(resource *ClusterPipeline, input *AuthUserInput) (*SourceCodeCredential, error) { + + resp := &SourceCodeCredential{} + + err := c.apiClient.Ops.DoAction(ClusterPipelineType, "authuser", &resource.Resource, input, resp) + + return resp, err +} diff --git a/client/management/v3/zz_generated_cluster_pipeline_spec.go b/client/management/v3/zz_generated_cluster_pipeline_spec.go new file mode 100644 index 00000000..96e7ff3a --- /dev/null +++ b/client/management/v3/zz_generated_cluster_pipeline_spec.go @@ -0,0 +1,14 @@ +package client + +const ( + ClusterPipelineSpecType = "clusterPipelineSpec" + ClusterPipelineSpecFieldClusterId = "clusterId" + ClusterPipelineSpecFieldDeploy = "deploy" + ClusterPipelineSpecFieldGithubConfig = "githubConfig" +) + +type ClusterPipelineSpec struct { + ClusterId string `json:"clusterId,omitempty"` + Deploy *bool `json:"deploy,omitempty"` + GithubConfig *GithubClusterConfig `json:"githubConfig,omitempty"` +} diff --git a/client/management/v3/zz_generated_cluster_pipeline_status.go b/client/management/v3/zz_generated_cluster_pipeline_status.go new file mode 100644 index 00000000..f1027f68 --- /dev/null +++ b/client/management/v3/zz_generated_cluster_pipeline_status.go @@ -0,0 +1,8 @@ +package client + +const ( + ClusterPipelineStatusType = "clusterPipelineStatus" +) + +type ClusterPipelineStatus struct { +} diff --git a/client/management/v3/zz_generated_github_cluster_config.go b/client/management/v3/zz_generated_github_cluster_config.go new file mode 100644 index 00000000..284f178f --- /dev/null +++ b/client/management/v3/zz_generated_github_cluster_config.go @@ -0,0 +1,18 @@ +package client + +const ( + GithubClusterConfigType = "githubClusterConfig" + GithubClusterConfigFieldClientID = "clientId" + GithubClusterConfigFieldClientSecret = "clientSecret" + GithubClusterConfigFieldHost = "host" + GithubClusterConfigFieldRedirectURL = "redirectUrl" + GithubClusterConfigFieldTLS = "tls" +) + +type GithubClusterConfig struct { + ClientID string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` + Host string `json:"host,omitempty"` + RedirectURL string `json:"redirectUrl,omitempty"` + TLS *bool `json:"tls,omitempty"` +} diff --git a/client/management/v3/zz_generated_pipeline.go b/client/management/v3/zz_generated_pipeline.go new file mode 100644 index 00000000..025e3b6a --- /dev/null +++ b/client/management/v3/zz_generated_pipeline.go @@ -0,0 +1,113 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PipelineType = "pipeline" + PipelineFieldAnnotations = "annotations" + PipelineFieldCreated = "created" + PipelineFieldCreatorID = "creatorId" + PipelineFieldDisplayName = "displayName" + PipelineFieldLabels = "labels" + PipelineFieldName = "name" + PipelineFieldNamespaceId = "namespaceId" + PipelineFieldOwnerReferences = "ownerReferences" + PipelineFieldProjectId = "projectId" + PipelineFieldRemoved = "removed" + PipelineFieldStages = "stages" + PipelineFieldState = "state" + PipelineFieldStatus = "status" + PipelineFieldTransitioning = "transitioning" + PipelineFieldTransitioningMessage = "transitioningMessage" + PipelineFieldTriggerCronExpression = "triggerCronExpression" + PipelineFieldTriggerCronTimezone = "triggerCronTimezone" + PipelineFieldTriggerWebhook = "triggerWebhook" + PipelineFieldUuid = "uuid" +) + +type Pipeline struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + DisplayName string `json:"displayName,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Stages []Stage `json:"stages,omitempty"` + State string `json:"state,omitempty"` + Status *PipelineStatus `json:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + TriggerCronExpression string `json:"triggerCronExpression,omitempty"` + TriggerCronTimezone string `json:"triggerCronTimezone,omitempty"` + TriggerWebhook *bool `json:"triggerWebhook,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type PipelineCollection struct { + types.Collection + Data []Pipeline `json:"data,omitempty"` + client *PipelineClient +} + +type PipelineClient struct { + apiClient *Client +} + +type PipelineOperations interface { + List(opts *types.ListOpts) (*PipelineCollection, error) + Create(opts *Pipeline) (*Pipeline, error) + Update(existing *Pipeline, updates interface{}) (*Pipeline, error) + ByID(id string) (*Pipeline, error) + Delete(container *Pipeline) error +} + +func newPipelineClient(apiClient *Client) *PipelineClient { + return &PipelineClient{ + apiClient: apiClient, + } +} + +func (c *PipelineClient) Create(container *Pipeline) (*Pipeline, error) { + resp := &Pipeline{} + err := c.apiClient.Ops.DoCreate(PipelineType, container, resp) + return resp, err +} + +func (c *PipelineClient) Update(existing *Pipeline, updates interface{}) (*Pipeline, error) { + resp := &Pipeline{} + err := c.apiClient.Ops.DoUpdate(PipelineType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PipelineClient) List(opts *types.ListOpts) (*PipelineCollection, error) { + resp := &PipelineCollection{} + err := c.apiClient.Ops.DoList(PipelineType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *PipelineCollection) Next() (*PipelineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PipelineCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PipelineClient) ByID(id string) (*Pipeline, error) { + resp := &Pipeline{} + err := c.apiClient.Ops.DoByID(PipelineType, id, resp) + return resp, err +} + +func (c *PipelineClient) Delete(container *Pipeline) error { + return c.apiClient.Ops.DoResourceDelete(PipelineType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_pipeline_execution.go b/client/management/v3/zz_generated_pipeline_execution.go new file mode 100644 index 00000000..ec7165c4 --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_execution.go @@ -0,0 +1,113 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PipelineExecutionType = "pipelineExecution" + PipelineExecutionFieldAnnotations = "annotations" + PipelineExecutionFieldCreated = "created" + PipelineExecutionFieldCreatorID = "creatorId" + PipelineExecutionFieldLabels = "labels" + PipelineExecutionFieldName = "name" + PipelineExecutionFieldNamespaceId = "namespaceId" + PipelineExecutionFieldOwnerReferences = "ownerReferences" + PipelineExecutionFieldPipeline = "pipeline" + PipelineExecutionFieldPipelineId = "pipelineId" + PipelineExecutionFieldProjectId = "projectId" + PipelineExecutionFieldRemoved = "removed" + PipelineExecutionFieldRun = "run" + PipelineExecutionFieldState = "state" + PipelineExecutionFieldStatus = "status" + PipelineExecutionFieldTransitioning = "transitioning" + PipelineExecutionFieldTransitioningMessage = "transitioningMessage" + PipelineExecutionFieldTriggerUserId = "triggerUserId" + PipelineExecutionFieldTriggeredBy = "triggeredBy" + PipelineExecutionFieldUuid = "uuid" +) + +type PipelineExecution struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + Pipeline *Pipeline `json:"pipeline,omitempty"` + PipelineId string `json:"pipelineId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Run *int64 `json:"run,omitempty"` + State string `json:"state,omitempty"` + Status *PipelineExecutionStatus `json:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + TriggerUserId string `json:"triggerUserId,omitempty"` + TriggeredBy string `json:"triggeredBy,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type PipelineExecutionCollection struct { + types.Collection + Data []PipelineExecution `json:"data,omitempty"` + client *PipelineExecutionClient +} + +type PipelineExecutionClient struct { + apiClient *Client +} + +type PipelineExecutionOperations interface { + List(opts *types.ListOpts) (*PipelineExecutionCollection, error) + Create(opts *PipelineExecution) (*PipelineExecution, error) + Update(existing *PipelineExecution, updates interface{}) (*PipelineExecution, error) + ByID(id string) (*PipelineExecution, error) + Delete(container *PipelineExecution) error +} + +func newPipelineExecutionClient(apiClient *Client) *PipelineExecutionClient { + return &PipelineExecutionClient{ + apiClient: apiClient, + } +} + +func (c *PipelineExecutionClient) Create(container *PipelineExecution) (*PipelineExecution, error) { + resp := &PipelineExecution{} + err := c.apiClient.Ops.DoCreate(PipelineExecutionType, container, resp) + return resp, err +} + +func (c *PipelineExecutionClient) Update(existing *PipelineExecution, updates interface{}) (*PipelineExecution, error) { + resp := &PipelineExecution{} + err := c.apiClient.Ops.DoUpdate(PipelineExecutionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PipelineExecutionClient) List(opts *types.ListOpts) (*PipelineExecutionCollection, error) { + resp := &PipelineExecutionCollection{} + err := c.apiClient.Ops.DoList(PipelineExecutionType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *PipelineExecutionCollection) Next() (*PipelineExecutionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PipelineExecutionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PipelineExecutionClient) ByID(id string) (*PipelineExecution, error) { + resp := &PipelineExecution{} + err := c.apiClient.Ops.DoByID(PipelineExecutionType, id, resp) + return resp, err +} + +func (c *PipelineExecutionClient) Delete(container *PipelineExecution) error { + return c.apiClient.Ops.DoResourceDelete(PipelineExecutionType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_pipeline_execution_log.go b/client/management/v3/zz_generated_pipeline_execution_log.go new file mode 100644 index 00000000..8165f37b --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_execution_log.go @@ -0,0 +1,105 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PipelineExecutionLogType = "pipelineExecutionLog" + PipelineExecutionLogFieldAnnotations = "annotations" + PipelineExecutionLogFieldCreated = "created" + PipelineExecutionLogFieldCreatorID = "creatorId" + PipelineExecutionLogFieldLabels = "labels" + PipelineExecutionLogFieldLine = "line" + PipelineExecutionLogFieldMessage = "message" + PipelineExecutionLogFieldName = "name" + PipelineExecutionLogFieldNamespaceId = "namespaceId" + PipelineExecutionLogFieldOwnerReferences = "ownerReferences" + PipelineExecutionLogFieldPipelineExecutionId = "pipelineExecutionId" + PipelineExecutionLogFieldProjectId = "projectId" + PipelineExecutionLogFieldRemoved = "removed" + PipelineExecutionLogFieldStage = "stage" + PipelineExecutionLogFieldStep = "step" + PipelineExecutionLogFieldUuid = "uuid" +) + +type PipelineExecutionLog struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Line *int64 `json:"line,omitempty"` + Message string `json:"message,omitempty"` + Name string `json:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + PipelineExecutionId string `json:"pipelineExecutionId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Removed string `json:"removed,omitempty"` + Stage *int64 `json:"stage,omitempty"` + Step *int64 `json:"step,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type PipelineExecutionLogCollection struct { + types.Collection + Data []PipelineExecutionLog `json:"data,omitempty"` + client *PipelineExecutionLogClient +} + +type PipelineExecutionLogClient struct { + apiClient *Client +} + +type PipelineExecutionLogOperations interface { + List(opts *types.ListOpts) (*PipelineExecutionLogCollection, error) + Create(opts *PipelineExecutionLog) (*PipelineExecutionLog, error) + Update(existing *PipelineExecutionLog, updates interface{}) (*PipelineExecutionLog, error) + ByID(id string) (*PipelineExecutionLog, error) + Delete(container *PipelineExecutionLog) error +} + +func newPipelineExecutionLogClient(apiClient *Client) *PipelineExecutionLogClient { + return &PipelineExecutionLogClient{ + apiClient: apiClient, + } +} + +func (c *PipelineExecutionLogClient) Create(container *PipelineExecutionLog) (*PipelineExecutionLog, error) { + resp := &PipelineExecutionLog{} + err := c.apiClient.Ops.DoCreate(PipelineExecutionLogType, container, resp) + return resp, err +} + +func (c *PipelineExecutionLogClient) Update(existing *PipelineExecutionLog, updates interface{}) (*PipelineExecutionLog, error) { + resp := &PipelineExecutionLog{} + err := c.apiClient.Ops.DoUpdate(PipelineExecutionLogType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PipelineExecutionLogClient) List(opts *types.ListOpts) (*PipelineExecutionLogCollection, error) { + resp := &PipelineExecutionLogCollection{} + err := c.apiClient.Ops.DoList(PipelineExecutionLogType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *PipelineExecutionLogCollection) Next() (*PipelineExecutionLogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PipelineExecutionLogCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PipelineExecutionLogClient) ByID(id string) (*PipelineExecutionLog, error) { + resp := &PipelineExecutionLog{} + err := c.apiClient.Ops.DoByID(PipelineExecutionLogType, id, resp) + return resp, err +} + +func (c *PipelineExecutionLogClient) Delete(container *PipelineExecutionLog) error { + return c.apiClient.Ops.DoResourceDelete(PipelineExecutionLogType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_pipeline_execution_log_spec.go b/client/management/v3/zz_generated_pipeline_execution_log_spec.go new file mode 100644 index 00000000..2940578f --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_execution_log_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + PipelineExecutionLogSpecType = "pipelineExecutionLogSpec" + PipelineExecutionLogSpecFieldLine = "line" + PipelineExecutionLogSpecFieldMessage = "message" + PipelineExecutionLogSpecFieldPipelineExecutionId = "pipelineExecutionId" + PipelineExecutionLogSpecFieldProjectId = "projectId" + PipelineExecutionLogSpecFieldStage = "stage" + PipelineExecutionLogSpecFieldStep = "step" +) + +type PipelineExecutionLogSpec struct { + Line *int64 `json:"line,omitempty"` + Message string `json:"message,omitempty"` + PipelineExecutionId string `json:"pipelineExecutionId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Stage *int64 `json:"stage,omitempty"` + Step *int64 `json:"step,omitempty"` +} diff --git a/client/management/v3/zz_generated_pipeline_execution_spec.go b/client/management/v3/zz_generated_pipeline_execution_spec.go new file mode 100644 index 00000000..77de5d9d --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_execution_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + PipelineExecutionSpecType = "pipelineExecutionSpec" + PipelineExecutionSpecFieldPipeline = "pipeline" + PipelineExecutionSpecFieldPipelineId = "pipelineId" + PipelineExecutionSpecFieldProjectId = "projectId" + PipelineExecutionSpecFieldRun = "run" + PipelineExecutionSpecFieldTriggerUserId = "triggerUserId" + PipelineExecutionSpecFieldTriggeredBy = "triggeredBy" +) + +type PipelineExecutionSpec struct { + Pipeline *Pipeline `json:"pipeline,omitempty"` + PipelineId string `json:"pipelineId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Run *int64 `json:"run,omitempty"` + TriggerUserId string `json:"triggerUserId,omitempty"` + TriggeredBy string `json:"triggeredBy,omitempty"` +} diff --git a/client/management/v3/zz_generated_pipeline_execution_status.go b/client/management/v3/zz_generated_pipeline_execution_status.go new file mode 100644 index 00000000..c789e52b --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_execution_status.go @@ -0,0 +1,18 @@ +package client + +const ( + PipelineExecutionStatusType = "pipelineExecutionStatus" + PipelineExecutionStatusFieldCommit = "commit" + PipelineExecutionStatusFieldEnded = "ended" + PipelineExecutionStatusFieldStages = "stages" + PipelineExecutionStatusFieldStarted = "started" + PipelineExecutionStatusFieldState = "state" +) + +type PipelineExecutionStatus struct { + Commit string `json:"commit,omitempty"` + Ended string `json:"ended,omitempty"` + Stages []StageStatus `json:"stages,omitempty"` + Started string `json:"started,omitempty"` + State string `json:"state,omitempty"` +} diff --git a/client/management/v3/zz_generated_pipeline_spec.go b/client/management/v3/zz_generated_pipeline_spec.go new file mode 100644 index 00000000..c11bb0af --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + PipelineSpecType = "pipelineSpec" + PipelineSpecFieldDisplayName = "displayName" + PipelineSpecFieldProjectId = "projectId" + PipelineSpecFieldStages = "stages" + PipelineSpecFieldTriggerCronExpression = "triggerCronExpression" + PipelineSpecFieldTriggerCronTimezone = "triggerCronTimezone" + PipelineSpecFieldTriggerWebhook = "triggerWebhook" +) + +type PipelineSpec struct { + DisplayName string `json:"displayName,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Stages []Stage `json:"stages,omitempty"` + TriggerCronExpression string `json:"triggerCronExpression,omitempty"` + TriggerCronTimezone string `json:"triggerCronTimezone,omitempty"` + TriggerWebhook *bool `json:"triggerWebhook,omitempty"` +} diff --git a/client/management/v3/zz_generated_pipeline_status.go b/client/management/v3/zz_generated_pipeline_status.go new file mode 100644 index 00000000..95de082a --- /dev/null +++ b/client/management/v3/zz_generated_pipeline_status.go @@ -0,0 +1,24 @@ +package client + +const ( + PipelineStatusType = "pipelineStatus" + PipelineStatusFieldLastExecutionID = "lastExecutionId" + PipelineStatusFieldLastRunState = "lastRunState" + PipelineStatusFieldLastStarted = "lastStarted" + PipelineStatusFieldNextRun = "nextRun" + PipelineStatusFieldNextStart = "nextStart" + PipelineStatusFieldState = "state" + PipelineStatusFieldToken = "token" + PipelineStatusFieldWebHookID = "webhookId" +) + +type PipelineStatus struct { + LastExecutionID string `json:"lastExecutionId,omitempty"` + LastRunState string `json:"lastRunState,omitempty"` + LastStarted string `json:"lastStarted,omitempty"` + NextRun *int64 `json:"nextRun,omitempty"` + NextStart string `json:"nextStart,omitempty"` + State string `json:"state,omitempty"` + Token string `json:"token,omitempty"` + WebHookID string `json:"webhookId,omitempty"` +} diff --git a/client/management/v3/zz_generated_publish_image_config.go b/client/management/v3/zz_generated_publish_image_config.go new file mode 100644 index 00000000..34f06f9f --- /dev/null +++ b/client/management/v3/zz_generated_publish_image_config.go @@ -0,0 +1,14 @@ +package client + +const ( + PublishImageConfigType = "publishImageConfig" + PublishImageConfigFieldBuildContext = "buildContext" + PublishImageConfigFieldDockerfilePath = "dockerfilePath" + PublishImageConfigFieldTag = "tag" +) + +type PublishImageConfig struct { + BuildContext string `json:"buildContext,omitempty"` + DockerfilePath string `json:"dockerfilePath,omitempty"` + Tag string `json:"tag,omitempty"` +} diff --git a/client/management/v3/zz_generated_repo_perm.go b/client/management/v3/zz_generated_repo_perm.go new file mode 100644 index 00000000..b1121383 --- /dev/null +++ b/client/management/v3/zz_generated_repo_perm.go @@ -0,0 +1,14 @@ +package client + +const ( + RepoPermType = "repoPerm" + RepoPermFieldAdmin = "admin" + RepoPermFieldPull = "pull" + RepoPermFieldPush = "push" +) + +type RepoPerm struct { + Admin *bool `json:"admin,omitempty"` + Pull *bool `json:"pull,omitempty"` + Push *bool `json:"push,omitempty"` +} diff --git a/client/management/v3/zz_generated_run_script_config.go b/client/management/v3/zz_generated_run_script_config.go new file mode 100644 index 00000000..fff33716 --- /dev/null +++ b/client/management/v3/zz_generated_run_script_config.go @@ -0,0 +1,20 @@ +package client + +const ( + RunScriptConfigType = "runScriptConfig" + RunScriptConfigFieldCommand = "command" + RunScriptConfigFieldEntrypoint = "entrypoint" + RunScriptConfigFieldEnv = "env" + RunScriptConfigFieldImage = "image" + RunScriptConfigFieldIsShell = "isShell" + RunScriptConfigFieldShellScript = "shellScript" +) + +type RunScriptConfig struct { + Command string `json:"command,omitempty"` + Entrypoint string `json:"entrypoint,omitempty"` + Env []string `json:"env,omitempty"` + Image string `json:"image,omitempty"` + IsShell *bool `json:"isShell,omitempty"` + ShellScript string `json:"shellScript,omitempty"` +} diff --git a/client/management/v3/zz_generated_source_code_config.go b/client/management/v3/zz_generated_source_code_config.go new file mode 100644 index 00000000..4dcc8ed3 --- /dev/null +++ b/client/management/v3/zz_generated_source_code_config.go @@ -0,0 +1,16 @@ +package client + +const ( + SourceCodeConfigType = "sourceCodeConfig" + SourceCodeConfigFieldBranch = "branch" + SourceCodeConfigFieldBranchCondition = "branchCondition" + SourceCodeConfigFieldSourceCodeCredentialId = "sourceCodeCredentialId" + SourceCodeConfigFieldURL = "url" +) + +type SourceCodeConfig struct { + Branch string `json:"branch,omitempty"` + BranchCondition string `json:"branchCondition,omitempty"` + SourceCodeCredentialId string `json:"sourceCodeCredentialId,omitempty"` + URL string `json:"url,omitempty"` +} diff --git a/client/management/v3/zz_generated_source_code_credential.go b/client/management/v3/zz_generated_source_code_credential.go new file mode 100644 index 00000000..39e87509 --- /dev/null +++ b/client/management/v3/zz_generated_source_code_credential.go @@ -0,0 +1,115 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + SourceCodeCredentialType = "sourceCodeCredential" + SourceCodeCredentialFieldAccessToken = "accessToken" + SourceCodeCredentialFieldAnnotations = "annotations" + SourceCodeCredentialFieldAvatarURL = "avatarUrl" + SourceCodeCredentialFieldClusterId = "clusterId" + SourceCodeCredentialFieldCreated = "created" + SourceCodeCredentialFieldCreatorID = "creatorId" + SourceCodeCredentialFieldDisplayName = "displayName" + SourceCodeCredentialFieldHTMLURL = "htmlUrl" + SourceCodeCredentialFieldLabels = "labels" + SourceCodeCredentialFieldLoginName = "loginName" + SourceCodeCredentialFieldName = "name" + SourceCodeCredentialFieldOwnerReferences = "ownerReferences" + SourceCodeCredentialFieldRemoved = "removed" + SourceCodeCredentialFieldSourceCodeType = "sourceCodeType" + SourceCodeCredentialFieldState = "state" + SourceCodeCredentialFieldStatus = "status" + SourceCodeCredentialFieldTransitioning = "transitioning" + SourceCodeCredentialFieldTransitioningMessage = "transitioningMessage" + SourceCodeCredentialFieldUserId = "userId" + SourceCodeCredentialFieldUuid = "uuid" +) + +type SourceCodeCredential struct { + types.Resource + AccessToken string `json:"accessToken,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + AvatarURL string `json:"avatarUrl,omitempty"` + ClusterId string `json:"clusterId,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + DisplayName string `json:"displayName,omitempty"` + HTMLURL string `json:"htmlUrl,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + LoginName string `json:"loginName,omitempty"` + Name string `json:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` + State string `json:"state,omitempty"` + Status *SourceCodeCredentialStatus `json:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + UserId string `json:"userId,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type SourceCodeCredentialCollection struct { + types.Collection + Data []SourceCodeCredential `json:"data,omitempty"` + client *SourceCodeCredentialClient +} + +type SourceCodeCredentialClient struct { + apiClient *Client +} + +type SourceCodeCredentialOperations interface { + List(opts *types.ListOpts) (*SourceCodeCredentialCollection, error) + Create(opts *SourceCodeCredential) (*SourceCodeCredential, error) + Update(existing *SourceCodeCredential, updates interface{}) (*SourceCodeCredential, error) + ByID(id string) (*SourceCodeCredential, error) + Delete(container *SourceCodeCredential) error +} + +func newSourceCodeCredentialClient(apiClient *Client) *SourceCodeCredentialClient { + return &SourceCodeCredentialClient{ + apiClient: apiClient, + } +} + +func (c *SourceCodeCredentialClient) Create(container *SourceCodeCredential) (*SourceCodeCredential, error) { + resp := &SourceCodeCredential{} + err := c.apiClient.Ops.DoCreate(SourceCodeCredentialType, container, resp) + return resp, err +} + +func (c *SourceCodeCredentialClient) Update(existing *SourceCodeCredential, updates interface{}) (*SourceCodeCredential, error) { + resp := &SourceCodeCredential{} + err := c.apiClient.Ops.DoUpdate(SourceCodeCredentialType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SourceCodeCredentialClient) List(opts *types.ListOpts) (*SourceCodeCredentialCollection, error) { + resp := &SourceCodeCredentialCollection{} + err := c.apiClient.Ops.DoList(SourceCodeCredentialType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *SourceCodeCredentialCollection) Next() (*SourceCodeCredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SourceCodeCredentialCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *SourceCodeCredentialClient) ByID(id string) (*SourceCodeCredential, error) { + resp := &SourceCodeCredential{} + err := c.apiClient.Ops.DoByID(SourceCodeCredentialType, id, resp) + return resp, err +} + +func (c *SourceCodeCredentialClient) Delete(container *SourceCodeCredential) error { + return c.apiClient.Ops.DoResourceDelete(SourceCodeCredentialType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_source_code_credential_spec.go b/client/management/v3/zz_generated_source_code_credential_spec.go new file mode 100644 index 00000000..24ef428e --- /dev/null +++ b/client/management/v3/zz_generated_source_code_credential_spec.go @@ -0,0 +1,24 @@ +package client + +const ( + SourceCodeCredentialSpecType = "sourceCodeCredentialSpec" + SourceCodeCredentialSpecFieldAccessToken = "accessToken" + SourceCodeCredentialSpecFieldAvatarURL = "avatarUrl" + SourceCodeCredentialSpecFieldClusterId = "clusterId" + SourceCodeCredentialSpecFieldDisplayName = "displayName" + SourceCodeCredentialSpecFieldHTMLURL = "htmlUrl" + SourceCodeCredentialSpecFieldLoginName = "loginName" + SourceCodeCredentialSpecFieldSourceCodeType = "sourceCodeType" + SourceCodeCredentialSpecFieldUserId = "userId" +) + +type SourceCodeCredentialSpec struct { + AccessToken string `json:"accessToken,omitempty"` + AvatarURL string `json:"avatarUrl,omitempty"` + ClusterId string `json:"clusterId,omitempty"` + DisplayName string `json:"displayName,omitempty"` + HTMLURL string `json:"htmlUrl,omitempty"` + LoginName string `json:"loginName,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` + UserId string `json:"userId,omitempty"` +} diff --git a/client/management/v3/zz_generated_source_code_credential_status.go b/client/management/v3/zz_generated_source_code_credential_status.go new file mode 100644 index 00000000..cf73982b --- /dev/null +++ b/client/management/v3/zz_generated_source_code_credential_status.go @@ -0,0 +1,8 @@ +package client + +const ( + SourceCodeCredentialStatusType = "sourceCodeCredentialStatus" +) + +type SourceCodeCredentialStatus struct { +} diff --git a/client/management/v3/zz_generated_source_code_repository.go b/client/management/v3/zz_generated_source_code_repository.go new file mode 100644 index 00000000..e9f2d742 --- /dev/null +++ b/client/management/v3/zz_generated_source_code_repository.go @@ -0,0 +1,113 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + SourceCodeRepositoryType = "sourceCodeRepository" + SourceCodeRepositoryFieldAnnotations = "annotations" + SourceCodeRepositoryFieldClusterId = "clusterId" + SourceCodeRepositoryFieldCreated = "created" + SourceCodeRepositoryFieldCreatorID = "creatorId" + SourceCodeRepositoryFieldLabels = "labels" + SourceCodeRepositoryFieldLanguage = "language" + SourceCodeRepositoryFieldName = "name" + SourceCodeRepositoryFieldOwnerReferences = "ownerReferences" + SourceCodeRepositoryFieldPermissions = "permissions" + SourceCodeRepositoryFieldRemoved = "removed" + SourceCodeRepositoryFieldSourceCodeCredentialId = "sourceCodeCredentialId" + SourceCodeRepositoryFieldSourceCodeType = "sourceCodeType" + SourceCodeRepositoryFieldState = "state" + SourceCodeRepositoryFieldStatus = "status" + SourceCodeRepositoryFieldTransitioning = "transitioning" + SourceCodeRepositoryFieldTransitioningMessage = "transitioningMessage" + SourceCodeRepositoryFieldURL = "url" + SourceCodeRepositoryFieldUserId = "userId" + SourceCodeRepositoryFieldUuid = "uuid" +) + +type SourceCodeRepository struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty"` + ClusterId string `json:"clusterId,omitempty"` + Created string `json:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Language string `json:"language,omitempty"` + Name string `json:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + Permissions *RepoPerm `json:"permissions,omitempty"` + Removed string `json:"removed,omitempty"` + SourceCodeCredentialId string `json:"sourceCodeCredentialId,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` + State string `json:"state,omitempty"` + Status *SourceCodeRepositoryStatus `json:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty"` + URL string `json:"url,omitempty"` + UserId string `json:"userId,omitempty"` + Uuid string `json:"uuid,omitempty"` +} +type SourceCodeRepositoryCollection struct { + types.Collection + Data []SourceCodeRepository `json:"data,omitempty"` + client *SourceCodeRepositoryClient +} + +type SourceCodeRepositoryClient struct { + apiClient *Client +} + +type SourceCodeRepositoryOperations interface { + List(opts *types.ListOpts) (*SourceCodeRepositoryCollection, error) + Create(opts *SourceCodeRepository) (*SourceCodeRepository, error) + Update(existing *SourceCodeRepository, updates interface{}) (*SourceCodeRepository, error) + ByID(id string) (*SourceCodeRepository, error) + Delete(container *SourceCodeRepository) error +} + +func newSourceCodeRepositoryClient(apiClient *Client) *SourceCodeRepositoryClient { + return &SourceCodeRepositoryClient{ + apiClient: apiClient, + } +} + +func (c *SourceCodeRepositoryClient) Create(container *SourceCodeRepository) (*SourceCodeRepository, error) { + resp := &SourceCodeRepository{} + err := c.apiClient.Ops.DoCreate(SourceCodeRepositoryType, container, resp) + return resp, err +} + +func (c *SourceCodeRepositoryClient) Update(existing *SourceCodeRepository, updates interface{}) (*SourceCodeRepository, error) { + resp := &SourceCodeRepository{} + err := c.apiClient.Ops.DoUpdate(SourceCodeRepositoryType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SourceCodeRepositoryClient) List(opts *types.ListOpts) (*SourceCodeRepositoryCollection, error) { + resp := &SourceCodeRepositoryCollection{} + err := c.apiClient.Ops.DoList(SourceCodeRepositoryType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *SourceCodeRepositoryCollection) Next() (*SourceCodeRepositoryCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SourceCodeRepositoryCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *SourceCodeRepositoryClient) ByID(id string) (*SourceCodeRepository, error) { + resp := &SourceCodeRepository{} + err := c.apiClient.Ops.DoByID(SourceCodeRepositoryType, id, resp) + return resp, err +} + +func (c *SourceCodeRepositoryClient) Delete(container *SourceCodeRepository) error { + return c.apiClient.Ops.DoResourceDelete(SourceCodeRepositoryType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_source_code_repository_spec.go b/client/management/v3/zz_generated_source_code_repository_spec.go new file mode 100644 index 00000000..cd7a0874 --- /dev/null +++ b/client/management/v3/zz_generated_source_code_repository_spec.go @@ -0,0 +1,22 @@ +package client + +const ( + SourceCodeRepositorySpecType = "sourceCodeRepositorySpec" + SourceCodeRepositorySpecFieldClusterId = "clusterId" + SourceCodeRepositorySpecFieldLanguage = "language" + SourceCodeRepositorySpecFieldPermissions = "permissions" + SourceCodeRepositorySpecFieldSourceCodeCredentialId = "sourceCodeCredentialId" + SourceCodeRepositorySpecFieldSourceCodeType = "sourceCodeType" + SourceCodeRepositorySpecFieldURL = "url" + SourceCodeRepositorySpecFieldUserId = "userId" +) + +type SourceCodeRepositorySpec struct { + ClusterId string `json:"clusterId,omitempty"` + Language string `json:"language,omitempty"` + Permissions *RepoPerm `json:"permissions,omitempty"` + SourceCodeCredentialId string `json:"sourceCodeCredentialId,omitempty"` + SourceCodeType string `json:"sourceCodeType,omitempty"` + URL string `json:"url,omitempty"` + UserId string `json:"userId,omitempty"` +} diff --git a/client/management/v3/zz_generated_source_code_repository_status.go b/client/management/v3/zz_generated_source_code_repository_status.go new file mode 100644 index 00000000..f5f38fe0 --- /dev/null +++ b/client/management/v3/zz_generated_source_code_repository_status.go @@ -0,0 +1,8 @@ +package client + +const ( + SourceCodeRepositoryStatusType = "sourceCodeRepositoryStatus" +) + +type SourceCodeRepositoryStatus struct { +} diff --git a/client/management/v3/zz_generated_stage.go b/client/management/v3/zz_generated_stage.go new file mode 100644 index 00000000..cce7a1d3 --- /dev/null +++ b/client/management/v3/zz_generated_stage.go @@ -0,0 +1,12 @@ +package client + +const ( + StageType = "stage" + StageFieldName = "name" + StageFieldSteps = "steps" +) + +type Stage struct { + Name string `json:"name,omitempty"` + Steps []Step `json:"steps,omitempty"` +} diff --git a/client/management/v3/zz_generated_stage_status.go b/client/management/v3/zz_generated_stage_status.go new file mode 100644 index 00000000..1f54e5a7 --- /dev/null +++ b/client/management/v3/zz_generated_stage_status.go @@ -0,0 +1,16 @@ +package client + +const ( + StageStatusType = "stageStatus" + StageStatusFieldEnded = "ended" + StageStatusFieldStarted = "started" + StageStatusFieldState = "state" + StageStatusFieldSteps = "steps" +) + +type StageStatus struct { + Ended string `json:"ended,omitempty"` + Started string `json:"started,omitempty"` + State string `json:"state,omitempty"` + Steps []StepStatus `json:"steps,omitempty"` +} diff --git a/client/management/v3/zz_generated_step.go b/client/management/v3/zz_generated_step.go new file mode 100644 index 00000000..6b257e1b --- /dev/null +++ b/client/management/v3/zz_generated_step.go @@ -0,0 +1,16 @@ +package client + +const ( + StepType = "step" + StepFieldPublishImageConfig = "publishImageConfig" + StepFieldRunScriptConfig = "runScriptConfig" + StepFieldSourceCodeConfig = "sourceCodeConfig" + StepFieldTimeout = "timeout" +) + +type Step struct { + PublishImageConfig *PublishImageConfig `json:"publishImageConfig,omitempty"` + RunScriptConfig *RunScriptConfig `json:"runScriptConfig,omitempty"` + SourceCodeConfig *SourceCodeConfig `json:"sourceCodeConfig,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` +} diff --git a/client/management/v3/zz_generated_step_status.go b/client/management/v3/zz_generated_step_status.go new file mode 100644 index 00000000..0c31a35c --- /dev/null +++ b/client/management/v3/zz_generated_step_status.go @@ -0,0 +1,14 @@ +package client + +const ( + StepStatusType = "stepStatus" + StepStatusFieldEnded = "ended" + StepStatusFieldStarted = "started" + StepStatusFieldState = "state" +) + +type StepStatus struct { + Ended string `json:"ended,omitempty"` + Started string `json:"started,omitempty"` + State string `json:"state,omitempty"` +}