mirror of
https://github.com/rancher/types.git
synced 2025-05-08 23:26:19 +00:00
update generated
This commit is contained in:
parent
36f2de76ce
commit
3f9f0068c8
apis
management.cattle.io/v3
zz_generated_cluster_pipeline_controller.gozz_generated_cluster_pipeline_lifecycle_adapter.gozz_generated_deepcopy.gozz_generated_k8s_client.gozz_generated_pipeline_execution_log_controller.gozz_generated_pipeline_execution_log_lifecycle_adapter.gozz_generated_scheme.go
project.cattle.io/v3
zz_generated_deepcopy.gozz_generated_k8s_client.gozz_generated_pipeline_controller.gozz_generated_pipeline_execution_controller.gozz_generated_pipeline_execution_lifecycle_adapter.gozz_generated_pipeline_lifecycle_adapter.gozz_generated_pipeline_setting_controller.gozz_generated_pipeline_setting_lifecycle_adapter.gozz_generated_scheme.gozz_generated_source_code_credential_controller.gozz_generated_source_code_credential_lifecycle_adapter.gozz_generated_source_code_provider_config_controller.gozz_generated_source_code_provider_config_lifecycle_adapter.gozz_generated_source_code_provider_controller.gozz_generated_source_code_provider_lifecycle_adapter.gozz_generated_source_code_repository_controller.gozz_generated_source_code_repository_lifecycle_adapter.go
client
management/v3
zz_generated_client.gozz_generated_cluster_pipeline.gozz_generated_cluster_pipeline_spec.gozz_generated_cluster_pipeline_status.gozz_generated_github_cluster_config.gozz_generated_pipeline.gozz_generated_pipeline_execution_log.gozz_generated_pipeline_execution_log_spec.gozz_generated_pipeline_execution_spec.gozz_generated_pipeline_spec.gozz_generated_run_script_config.gozz_generated_source_code_config.gozz_generated_source_code_credential_status.gozz_generated_stage.gozz_generated_step.go
project/v3
zz_generated_apply_yaml_config.gozz_generated_auth_app_input.gozz_generated_auth_user_input.gozz_generated_client.gozz_generated_constraint.gozz_generated_constraints.gozz_generated_env_from.gozz_generated_github_login_input.gozz_generated_github_pipeline_config.gozz_generated_github_pipeline_config_apply_input.gozz_generated_github_provider.gozz_generated_gitlab_login_input.gozz_generated_gitlab_pipeline_config.gozz_generated_gitlab_pipeline_config_apply_input.gozz_generated_gitlab_provider.gozz_generated_pipeline.gozz_generated_pipeline_condition.gozz_generated_pipeline_config.gozz_generated_pipeline_execution.gozz_generated_pipeline_execution_spec.gozz_generated_pipeline_execution_status.gozz_generated_pipeline_setting.gozz_generated_pipeline_spec.gozz_generated_pipeline_status.gozz_generated_publish_image_config.gozz_generated_push_pipeline_config_input.gozz_generated_repo_perm.gozz_generated_run_pipeline_input.gozz_generated_run_script_config.gozz_generated_source_code_config.gozz_generated_source_code_credential.gozz_generated_source_code_credential_spec.gozz_generated_source_code_credential_status.gozz_generated_source_code_provider.gozz_generated_source_code_provider_config.gozz_generated_source_code_repository.gozz_generated_source_code_repository_spec.gozz_generated_source_code_repository_status.gozz_generated_stage.gozz_generated_stage_status.gozz_generated_step.gozz_generated_step_status.go
compose
@ -1,252 +0,0 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/norman/controller"
|
||||
"github.com/rancher/norman/objectclient"
|
||||
"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() *objectclient.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",
|
||||
}, key)
|
||||
}
|
||||
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 *objectclient.ObjectClient
|
||||
controller ClusterPipelineController
|
||||
}
|
||||
|
||||
func (s *clusterPipelineClient) ObjectClient() *objectclient.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)
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
@ -201,22 +201,6 @@ func (in *AmazonElasticContainerServiceConfig) DeepCopy() *AmazonElasticContaine
|
||||
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
|
||||
@ -281,22 +265,6 @@ func (in *AuthConfigList) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -1116,109 +1084,6 @@ func (in *ClusterLoggingStatus) DeepCopy() *ClusterLoggingStatus {
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
@ -2062,22 +1927,6 @@ func (in *GenerateKubeConfigOutput) DeepCopy() *GenerateKubeConfigOutput {
|
||||
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
|
||||
@ -4090,346 +3939,6 @@ func (in *PingConfig) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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)
|
||||
in.Status.DeepCopyInto(&out.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
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PipelineCondition) DeepCopyInto(out *PipelineCondition) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineCondition.
|
||||
func (in *PipelineCondition) DeepCopy() *PipelineCondition {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PipelineCondition)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]PipelineCondition, len(*in))
|
||||
copy(*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])
|
||||
}
|
||||
}
|
||||
if in.EnvVars != nil {
|
||||
in, out := &in.EnvVars, &out.EnvVars
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
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])
|
||||
}
|
||||
}
|
||||
if in.Templates != nil {
|
||||
in, out := &in.Templates, &out.Templates
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
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
|
||||
if in.SourceCodeCredential != nil {
|
||||
in, out := &in.SourceCodeCredential, &out.SourceCodeCredential
|
||||
if *in == nil {
|
||||
*out = nil
|
||||
} else {
|
||||
*out = new(SourceCodeCredential)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
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 *PipelineSystemImages) DeepCopyInto(out *PipelineSystemImages) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSystemImages.
|
||||
func (in *PipelineSystemImages) DeepCopy() *PipelineSystemImages {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PipelineSystemImages)
|
||||
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
|
||||
@ -5319,22 +4828,6 @@ func (in *PublicEndpoint) DeepCopy() *PublicEndpoint {
|
||||
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
|
||||
@ -5557,22 +5050,6 @@ 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 *ResourceQuotaTemplate) DeepCopyInto(out *ResourceQuotaTemplate) {
|
||||
*out = *in
|
||||
@ -5721,43 +5198,6 @@ func (in *RouteOpenstackOpts) DeepCopy() *RouteOpenstackOpts {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RunPipelineInput) DeepCopyInto(out *RunPipelineInput) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunPipelineInput.
|
||||
func (in *RunPipelineInput) DeepCopy() *RunPipelineInput {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RunPipelineInput)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -5973,211 +5413,6 @@ 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.Namespaced = in.Namespaced
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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.Namespaced = in.Namespaced
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
@ -6194,109 +5429,6 @@ 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 *SubQuestion) DeepCopyInto(out *SubQuestion) {
|
||||
*out = *in
|
||||
|
@ -52,12 +52,6 @@ type Interface interface {
|
||||
NotifiersGetter
|
||||
ClusterAlertsGetter
|
||||
ProjectAlertsGetter
|
||||
ClusterPipelinesGetter
|
||||
SourceCodeCredentialsGetter
|
||||
PipelinesGetter
|
||||
PipelineExecutionsGetter
|
||||
PipelineExecutionLogsGetter
|
||||
SourceCodeRepositoriesGetter
|
||||
ComposeConfigsGetter
|
||||
ResourceQuotaTemplatesGetter
|
||||
}
|
||||
@ -104,12 +98,6 @@ type Client struct {
|
||||
notifierControllers map[string]NotifierController
|
||||
clusterAlertControllers map[string]ClusterAlertController
|
||||
projectAlertControllers map[string]ProjectAlertController
|
||||
clusterPipelineControllers map[string]ClusterPipelineController
|
||||
sourceCodeCredentialControllers map[string]SourceCodeCredentialController
|
||||
pipelineControllers map[string]PipelineController
|
||||
pipelineExecutionControllers map[string]PipelineExecutionController
|
||||
pipelineExecutionLogControllers map[string]PipelineExecutionLogController
|
||||
sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController
|
||||
composeConfigControllers map[string]ComposeConfigController
|
||||
resourceQuotaTemplateControllers map[string]ResourceQuotaTemplateController
|
||||
}
|
||||
@ -165,12 +153,6 @@ func NewForConfig(config rest.Config) (Interface, error) {
|
||||
notifierControllers: map[string]NotifierController{},
|
||||
clusterAlertControllers: map[string]ClusterAlertController{},
|
||||
projectAlertControllers: map[string]ProjectAlertController{},
|
||||
clusterPipelineControllers: map[string]ClusterPipelineController{},
|
||||
sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{},
|
||||
pipelineControllers: map[string]PipelineController{},
|
||||
pipelineExecutionControllers: map[string]PipelineExecutionController{},
|
||||
pipelineExecutionLogControllers: map[string]PipelineExecutionLogController{},
|
||||
sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{},
|
||||
composeConfigControllers: map[string]ComposeConfigController{},
|
||||
resourceQuotaTemplateControllers: map[string]ResourceQuotaTemplateController{},
|
||||
}, nil
|
||||
@ -669,84 +651,6 @@ func (c *Client) ProjectAlerts(namespace string) ProjectAlertInterface {
|
||||
}
|
||||
}
|
||||
|
||||
type ClusterPipelinesGetter interface {
|
||||
ClusterPipelines(namespace string) ClusterPipelineInterface
|
||||
}
|
||||
|
||||
func (c *Client) ClusterPipelines(namespace string) ClusterPipelineInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterPipelineResource, ClusterPipelineGroupVersionKind, clusterPipelineFactory{})
|
||||
return &clusterPipelineClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeCredentialsGetter interface {
|
||||
SourceCodeCredentials(namespace string) SourceCodeCredentialInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeCredentials(namespace string) SourceCodeCredentialInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{})
|
||||
return &sourceCodeCredentialClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type PipelinesGetter interface {
|
||||
Pipelines(namespace string) PipelineInterface
|
||||
}
|
||||
|
||||
func (c *Client) Pipelines(namespace string) PipelineInterface {
|
||||
objectClient := objectclient.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 := objectclient.NewObjectClient(namespace, c.restClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{})
|
||||
return &pipelineExecutionClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type PipelineExecutionLogsGetter interface {
|
||||
PipelineExecutionLogs(namespace string) PipelineExecutionLogInterface
|
||||
}
|
||||
|
||||
func (c *Client) PipelineExecutionLogs(namespace string) PipelineExecutionLogInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineExecutionLogResource, PipelineExecutionLogGroupVersionKind, pipelineExecutionLogFactory{})
|
||||
return &pipelineExecutionLogClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeRepositoriesGetter interface {
|
||||
SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{})
|
||||
return &sourceCodeRepositoryClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type ComposeConfigsGetter interface {
|
||||
ComposeConfigs(namespace string) ComposeConfigInterface
|
||||
}
|
||||
|
@ -1,252 +0,0 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/norman/controller"
|
||||
"github.com/rancher/norman/objectclient"
|
||||
"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() *objectclient.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",
|
||||
}, key)
|
||||
}
|
||||
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 *objectclient.ObjectClient
|
||||
controller PipelineExecutionLogController
|
||||
}
|
||||
|
||||
func (s *pipelineExecutionLogClient) ObjectClient() *objectclient.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)
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
@ -106,18 +106,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&ClusterAlertList{},
|
||||
&ProjectAlert{},
|
||||
&ProjectAlertList{},
|
||||
&ClusterPipeline{},
|
||||
&ClusterPipelineList{},
|
||||
&SourceCodeCredential{},
|
||||
&SourceCodeCredentialList{},
|
||||
&Pipeline{},
|
||||
&PipelineList{},
|
||||
&PipelineExecution{},
|
||||
&PipelineExecutionList{},
|
||||
&PipelineExecutionLog{},
|
||||
&PipelineExecutionLogList{},
|
||||
&SourceCodeRepository{},
|
||||
&SourceCodeRepositoryList{},
|
||||
&ComposeConfig{},
|
||||
&ComposeConfigList{},
|
||||
&ResourceQuotaTemplate{},
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,13 @@ type Interface interface {
|
||||
WorkloadsGetter
|
||||
AppsGetter
|
||||
AppRevisionsGetter
|
||||
SourceCodeProvidersGetter
|
||||
SourceCodeProviderConfigsGetter
|
||||
SourceCodeCredentialsGetter
|
||||
PipelinesGetter
|
||||
PipelineExecutionsGetter
|
||||
PipelineSettingsGetter
|
||||
SourceCodeRepositoriesGetter
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
@ -48,6 +55,13 @@ type Client struct {
|
||||
workloadControllers map[string]WorkloadController
|
||||
appControllers map[string]AppController
|
||||
appRevisionControllers map[string]AppRevisionController
|
||||
sourceCodeProviderControllers map[string]SourceCodeProviderController
|
||||
sourceCodeProviderConfigControllers map[string]SourceCodeProviderConfigController
|
||||
sourceCodeCredentialControllers map[string]SourceCodeCredentialController
|
||||
pipelineControllers map[string]PipelineController
|
||||
pipelineExecutionControllers map[string]PipelineExecutionController
|
||||
pipelineSettingControllers map[string]PipelineSettingController
|
||||
sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController
|
||||
}
|
||||
|
||||
func NewForConfig(config rest.Config) (Interface, error) {
|
||||
@ -77,6 +91,13 @@ func NewForConfig(config rest.Config) (Interface, error) {
|
||||
workloadControllers: map[string]WorkloadController{},
|
||||
appControllers: map[string]AppController{},
|
||||
appRevisionControllers: map[string]AppRevisionController{},
|
||||
sourceCodeProviderControllers: map[string]SourceCodeProviderController{},
|
||||
sourceCodeProviderConfigControllers: map[string]SourceCodeProviderConfigController{},
|
||||
sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{},
|
||||
pipelineControllers: map[string]PipelineController{},
|
||||
pipelineExecutionControllers: map[string]PipelineExecutionController{},
|
||||
pipelineSettingControllers: map[string]PipelineSettingController{},
|
||||
sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -260,3 +281,94 @@ func (c *Client) AppRevisions(namespace string) AppRevisionInterface {
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeProvidersGetter interface {
|
||||
SourceCodeProviders(namespace string) SourceCodeProviderInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeProviders(namespace string) SourceCodeProviderInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderResource, SourceCodeProviderGroupVersionKind, sourceCodeProviderFactory{})
|
||||
return &sourceCodeProviderClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigsGetter interface {
|
||||
SourceCodeProviderConfigs(namespace string) SourceCodeProviderConfigInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeProviderConfigs(namespace string) SourceCodeProviderConfigInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderConfigResource, SourceCodeProviderConfigGroupVersionKind, sourceCodeProviderConfigFactory{})
|
||||
return &sourceCodeProviderConfigClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeCredentialsGetter interface {
|
||||
SourceCodeCredentials(namespace string) SourceCodeCredentialInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeCredentials(namespace string) SourceCodeCredentialInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{})
|
||||
return &sourceCodeCredentialClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type PipelinesGetter interface {
|
||||
Pipelines(namespace string) PipelineInterface
|
||||
}
|
||||
|
||||
func (c *Client) Pipelines(namespace string) PipelineInterface {
|
||||
objectClient := objectclient.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 := objectclient.NewObjectClient(namespace, c.restClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{})
|
||||
return &pipelineExecutionClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type PipelineSettingsGetter interface {
|
||||
PipelineSettings(namespace string) PipelineSettingInterface
|
||||
}
|
||||
|
||||
func (c *Client) PipelineSettings(namespace string) PipelineSettingInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineSettingResource, PipelineSettingGroupVersionKind, pipelineSettingFactory{})
|
||||
return &pipelineSettingClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
||||
type SourceCodeRepositoriesGetter interface {
|
||||
SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface
|
||||
}
|
||||
|
||||
func (c *Client) SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface {
|
||||
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{})
|
||||
return &sourceCodeRepositoryClient{
|
||||
ns: namespace,
|
||||
client: c,
|
||||
objectClient: objectClient,
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,252 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/norman/controller"
|
||||
"github.com/rancher/norman/objectclient"
|
||||
"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 (
|
||||
PipelineSettingGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: Version,
|
||||
Group: GroupName,
|
||||
Kind: "PipelineSetting",
|
||||
}
|
||||
PipelineSettingResource = metav1.APIResource{
|
||||
Name: "pipelinesettings",
|
||||
SingularName: "pipelinesetting",
|
||||
Namespaced: true,
|
||||
|
||||
Kind: PipelineSettingGroupVersionKind.Kind,
|
||||
}
|
||||
)
|
||||
|
||||
type PipelineSettingList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []PipelineSetting
|
||||
}
|
||||
|
||||
type PipelineSettingHandlerFunc func(key string, obj *PipelineSetting) error
|
||||
|
||||
type PipelineSettingLister interface {
|
||||
List(namespace string, selector labels.Selector) (ret []*PipelineSetting, err error)
|
||||
Get(namespace, name string) (*PipelineSetting, error)
|
||||
}
|
||||
|
||||
type PipelineSettingController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() PipelineSettingLister
|
||||
AddHandler(name string, handler PipelineSettingHandlerFunc)
|
||||
AddClusterScopedHandler(name, clusterName string, handler PipelineSettingHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
}
|
||||
|
||||
type PipelineSettingInterface interface {
|
||||
ObjectClient() *objectclient.ObjectClient
|
||||
Create(*PipelineSetting) (*PipelineSetting, error)
|
||||
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineSetting, error)
|
||||
Get(name string, opts metav1.GetOptions) (*PipelineSetting, error)
|
||||
Update(*PipelineSetting) (*PipelineSetting, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
|
||||
List(opts metav1.ListOptions) (*PipelineSettingList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() PipelineSettingController
|
||||
AddHandler(name string, sync PipelineSettingHandlerFunc)
|
||||
AddLifecycle(name string, lifecycle PipelineSettingLifecycle)
|
||||
AddClusterScopedHandler(name, clusterName string, sync PipelineSettingHandlerFunc)
|
||||
AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineSettingLifecycle)
|
||||
}
|
||||
|
||||
type pipelineSettingLister struct {
|
||||
controller *pipelineSettingController
|
||||
}
|
||||
|
||||
func (l *pipelineSettingLister) List(namespace string, selector labels.Selector) (ret []*PipelineSetting, err error) {
|
||||
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
|
||||
ret = append(ret, obj.(*PipelineSetting))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (l *pipelineSettingLister) Get(namespace, name string) (*PipelineSetting, 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: PipelineSettingGroupVersionKind.Group,
|
||||
Resource: "pipelineSetting",
|
||||
}, key)
|
||||
}
|
||||
return obj.(*PipelineSetting), nil
|
||||
}
|
||||
|
||||
type pipelineSettingController struct {
|
||||
controller.GenericController
|
||||
}
|
||||
|
||||
func (c *pipelineSettingController) Lister() PipelineSettingLister {
|
||||
return &pipelineSettingLister{
|
||||
controller: c,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *pipelineSettingController) AddHandler(name string, handler PipelineSettingHandlerFunc) {
|
||||
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.(*PipelineSetting))
|
||||
})
|
||||
}
|
||||
|
||||
func (c *pipelineSettingController) AddClusterScopedHandler(name, cluster string, handler PipelineSettingHandlerFunc) {
|
||||
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.(*PipelineSetting))
|
||||
})
|
||||
}
|
||||
|
||||
type pipelineSettingFactory struct {
|
||||
}
|
||||
|
||||
func (c pipelineSettingFactory) Object() runtime.Object {
|
||||
return &PipelineSetting{}
|
||||
}
|
||||
|
||||
func (c pipelineSettingFactory) List() runtime.Object {
|
||||
return &PipelineSettingList{}
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Controller() PipelineSettingController {
|
||||
s.client.Lock()
|
||||
defer s.client.Unlock()
|
||||
|
||||
c, ok := s.client.pipelineSettingControllers[s.ns]
|
||||
if ok {
|
||||
return c
|
||||
}
|
||||
|
||||
genericController := controller.NewGenericController(PipelineSettingGroupVersionKind.Kind+"Controller",
|
||||
s.objectClient)
|
||||
|
||||
c = &pipelineSettingController{
|
||||
GenericController: genericController,
|
||||
}
|
||||
|
||||
s.client.pipelineSettingControllers[s.ns] = c
|
||||
s.client.starters = append(s.client.starters, c)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
type pipelineSettingClient struct {
|
||||
client *Client
|
||||
ns string
|
||||
objectClient *objectclient.ObjectClient
|
||||
controller PipelineSettingController
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) ObjectClient() *objectclient.ObjectClient {
|
||||
return s.objectClient
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Create(o *PipelineSetting) (*PipelineSetting, error) {
|
||||
obj, err := s.objectClient.Create(o)
|
||||
return obj.(*PipelineSetting), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Get(name string, opts metav1.GetOptions) (*PipelineSetting, error) {
|
||||
obj, err := s.objectClient.Get(name, opts)
|
||||
return obj.(*PipelineSetting), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineSetting, error) {
|
||||
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
|
||||
return obj.(*PipelineSetting), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Update(o *PipelineSetting) (*PipelineSetting, error) {
|
||||
obj, err := s.objectClient.Update(o.Name, o)
|
||||
return obj.(*PipelineSetting), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.Delete(name, options)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.DeleteNamespaced(namespace, name, options)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) List(opts metav1.ListOptions) (*PipelineSettingList, error) {
|
||||
obj, err := s.objectClient.List(opts)
|
||||
return obj.(*PipelineSettingList), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return s.objectClient.Watch(opts)
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (s *pipelineSettingClient) Patch(o *PipelineSetting, data []byte, subresources ...string) (*PipelineSetting, error) {
|
||||
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
|
||||
return obj.(*PipelineSetting), err
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) AddHandler(name string, sync PipelineSettingHandlerFunc) {
|
||||
s.Controller().AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) AddLifecycle(name string, lifecycle PipelineSettingLifecycle) {
|
||||
sync := NewPipelineSettingLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) AddClusterScopedHandler(name, clusterName string, sync PipelineSettingHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *pipelineSettingClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle PipelineSettingLifecycle) {
|
||||
sync := NewPipelineSettingLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type PipelineSettingLifecycle interface {
|
||||
Create(obj *PipelineSetting) (*PipelineSetting, error)
|
||||
Remove(obj *PipelineSetting) (*PipelineSetting, error)
|
||||
Updated(obj *PipelineSetting) (*PipelineSetting, error)
|
||||
}
|
||||
|
||||
type pipelineSettingLifecycleAdapter struct {
|
||||
lifecycle PipelineSettingLifecycle
|
||||
}
|
||||
|
||||
func (w *pipelineSettingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Create(obj.(*PipelineSetting))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *pipelineSettingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Remove(obj.(*PipelineSetting))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *pipelineSettingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Updated(obj.(*PipelineSetting))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func NewPipelineSettingLifecycleAdapter(name string, clusterScoped bool, client PipelineSettingInterface, l PipelineSettingLifecycle) PipelineSettingHandlerFunc {
|
||||
adapter := &pipelineSettingLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
|
||||
return func(key string, obj *PipelineSetting) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@ -59,6 +59,20 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&AppList{},
|
||||
&AppRevision{},
|
||||
&AppRevisionList{},
|
||||
&SourceCodeProvider{},
|
||||
&SourceCodeProviderList{},
|
||||
&SourceCodeProviderConfig{},
|
||||
&SourceCodeProviderConfigList{},
|
||||
&SourceCodeCredential{},
|
||||
&SourceCodeCredentialList{},
|
||||
&Pipeline{},
|
||||
&PipelineList{},
|
||||
&PipelineExecution{},
|
||||
&PipelineExecutionList{},
|
||||
&PipelineSetting{},
|
||||
&PipelineSettingList{},
|
||||
&SourceCodeRepository{},
|
||||
&SourceCodeRepositoryList{},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
@ -0,0 +1,252 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/norman/controller"
|
||||
"github.com/rancher/norman/objectclient"
|
||||
"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 (
|
||||
SourceCodeProviderConfigGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: Version,
|
||||
Group: GroupName,
|
||||
Kind: "SourceCodeProviderConfig",
|
||||
}
|
||||
SourceCodeProviderConfigResource = metav1.APIResource{
|
||||
Name: "sourcecodeproviderconfigs",
|
||||
SingularName: "sourcecodeproviderconfig",
|
||||
Namespaced: true,
|
||||
|
||||
Kind: SourceCodeProviderConfigGroupVersionKind.Kind,
|
||||
}
|
||||
)
|
||||
|
||||
type SourceCodeProviderConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []SourceCodeProviderConfig
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigHandlerFunc func(key string, obj *SourceCodeProviderConfig) error
|
||||
|
||||
type SourceCodeProviderConfigLister interface {
|
||||
List(namespace string, selector labels.Selector) (ret []*SourceCodeProviderConfig, err error)
|
||||
Get(namespace, name string) (*SourceCodeProviderConfig, error)
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() SourceCodeProviderConfigLister
|
||||
AddHandler(name string, handler SourceCodeProviderConfigHandlerFunc)
|
||||
AddClusterScopedHandler(name, clusterName string, handler SourceCodeProviderConfigHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigInterface interface {
|
||||
ObjectClient() *objectclient.ObjectClient
|
||||
Create(*SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeProviderConfig, error)
|
||||
Get(name string, opts metav1.GetOptions) (*SourceCodeProviderConfig, error)
|
||||
Update(*SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
|
||||
List(opts metav1.ListOptions) (*SourceCodeProviderConfigList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() SourceCodeProviderConfigController
|
||||
AddHandler(name string, sync SourceCodeProviderConfigHandlerFunc)
|
||||
AddLifecycle(name string, lifecycle SourceCodeProviderConfigLifecycle)
|
||||
AddClusterScopedHandler(name, clusterName string, sync SourceCodeProviderConfigHandlerFunc)
|
||||
AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeProviderConfigLifecycle)
|
||||
}
|
||||
|
||||
type sourceCodeProviderConfigLister struct {
|
||||
controller *sourceCodeProviderConfigController
|
||||
}
|
||||
|
||||
func (l *sourceCodeProviderConfigLister) List(namespace string, selector labels.Selector) (ret []*SourceCodeProviderConfig, err error) {
|
||||
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
|
||||
ret = append(ret, obj.(*SourceCodeProviderConfig))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (l *sourceCodeProviderConfigLister) Get(namespace, name string) (*SourceCodeProviderConfig, 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: SourceCodeProviderConfigGroupVersionKind.Group,
|
||||
Resource: "sourceCodeProviderConfig",
|
||||
}, key)
|
||||
}
|
||||
return obj.(*SourceCodeProviderConfig), nil
|
||||
}
|
||||
|
||||
type sourceCodeProviderConfigController struct {
|
||||
controller.GenericController
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderConfigController) Lister() SourceCodeProviderConfigLister {
|
||||
return &sourceCodeProviderConfigLister{
|
||||
controller: c,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderConfigController) AddHandler(name string, handler SourceCodeProviderConfigHandlerFunc) {
|
||||
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.(*SourceCodeProviderConfig))
|
||||
})
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderConfigController) AddClusterScopedHandler(name, cluster string, handler SourceCodeProviderConfigHandlerFunc) {
|
||||
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.(*SourceCodeProviderConfig))
|
||||
})
|
||||
}
|
||||
|
||||
type sourceCodeProviderConfigFactory struct {
|
||||
}
|
||||
|
||||
func (c sourceCodeProviderConfigFactory) Object() runtime.Object {
|
||||
return &SourceCodeProviderConfig{}
|
||||
}
|
||||
|
||||
func (c sourceCodeProviderConfigFactory) List() runtime.Object {
|
||||
return &SourceCodeProviderConfigList{}
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Controller() SourceCodeProviderConfigController {
|
||||
s.client.Lock()
|
||||
defer s.client.Unlock()
|
||||
|
||||
c, ok := s.client.sourceCodeProviderConfigControllers[s.ns]
|
||||
if ok {
|
||||
return c
|
||||
}
|
||||
|
||||
genericController := controller.NewGenericController(SourceCodeProviderConfigGroupVersionKind.Kind+"Controller",
|
||||
s.objectClient)
|
||||
|
||||
c = &sourceCodeProviderConfigController{
|
||||
GenericController: genericController,
|
||||
}
|
||||
|
||||
s.client.sourceCodeProviderConfigControllers[s.ns] = c
|
||||
s.client.starters = append(s.client.starters, c)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
type sourceCodeProviderConfigClient struct {
|
||||
client *Client
|
||||
ns string
|
||||
objectClient *objectclient.ObjectClient
|
||||
controller SourceCodeProviderConfigController
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) ObjectClient() *objectclient.ObjectClient {
|
||||
return s.objectClient
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Create(o *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) {
|
||||
obj, err := s.objectClient.Create(o)
|
||||
return obj.(*SourceCodeProviderConfig), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Get(name string, opts metav1.GetOptions) (*SourceCodeProviderConfig, error) {
|
||||
obj, err := s.objectClient.Get(name, opts)
|
||||
return obj.(*SourceCodeProviderConfig), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeProviderConfig, error) {
|
||||
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
|
||||
return obj.(*SourceCodeProviderConfig), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Update(o *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) {
|
||||
obj, err := s.objectClient.Update(o.Name, o)
|
||||
return obj.(*SourceCodeProviderConfig), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.Delete(name, options)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.DeleteNamespaced(namespace, name, options)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) List(opts metav1.ListOptions) (*SourceCodeProviderConfigList, error) {
|
||||
obj, err := s.objectClient.List(opts)
|
||||
return obj.(*SourceCodeProviderConfigList), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return s.objectClient.Watch(opts)
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (s *sourceCodeProviderConfigClient) Patch(o *SourceCodeProviderConfig, data []byte, subresources ...string) (*SourceCodeProviderConfig, error) {
|
||||
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
|
||||
return obj.(*SourceCodeProviderConfig), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) AddHandler(name string, sync SourceCodeProviderConfigHandlerFunc) {
|
||||
s.Controller().AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) AddLifecycle(name string, lifecycle SourceCodeProviderConfigLifecycle) {
|
||||
sync := NewSourceCodeProviderConfigLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) AddClusterScopedHandler(name, clusterName string, sync SourceCodeProviderConfigHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderConfigClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeProviderConfigLifecycle) {
|
||||
sync := NewSourceCodeProviderConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type SourceCodeProviderConfigLifecycle interface {
|
||||
Create(obj *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
Remove(obj *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
Updated(obj *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
}
|
||||
|
||||
type sourceCodeProviderConfigLifecycleAdapter struct {
|
||||
lifecycle SourceCodeProviderConfigLifecycle
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Create(obj.(*SourceCodeProviderConfig))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderConfigLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Remove(obj.(*SourceCodeProviderConfig))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderConfigLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Updated(obj.(*SourceCodeProviderConfig))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func NewSourceCodeProviderConfigLifecycleAdapter(name string, clusterScoped bool, client SourceCodeProviderConfigInterface, l SourceCodeProviderConfigLifecycle) SourceCodeProviderConfigHandlerFunc {
|
||||
adapter := &sourceCodeProviderConfigLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
|
||||
return func(key string, obj *SourceCodeProviderConfig) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@ -0,0 +1,251 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/norman/controller"
|
||||
"github.com/rancher/norman/objectclient"
|
||||
"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 (
|
||||
SourceCodeProviderGroupVersionKind = schema.GroupVersionKind{
|
||||
Version: Version,
|
||||
Group: GroupName,
|
||||
Kind: "SourceCodeProvider",
|
||||
}
|
||||
SourceCodeProviderResource = metav1.APIResource{
|
||||
Name: "sourcecodeproviders",
|
||||
SingularName: "sourcecodeprovider",
|
||||
Namespaced: false,
|
||||
Kind: SourceCodeProviderGroupVersionKind.Kind,
|
||||
}
|
||||
)
|
||||
|
||||
type SourceCodeProviderList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []SourceCodeProvider
|
||||
}
|
||||
|
||||
type SourceCodeProviderHandlerFunc func(key string, obj *SourceCodeProvider) error
|
||||
|
||||
type SourceCodeProviderLister interface {
|
||||
List(namespace string, selector labels.Selector) (ret []*SourceCodeProvider, err error)
|
||||
Get(namespace, name string) (*SourceCodeProvider, error)
|
||||
}
|
||||
|
||||
type SourceCodeProviderController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() SourceCodeProviderLister
|
||||
AddHandler(name string, handler SourceCodeProviderHandlerFunc)
|
||||
AddClusterScopedHandler(name, clusterName string, handler SourceCodeProviderHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
}
|
||||
|
||||
type SourceCodeProviderInterface interface {
|
||||
ObjectClient() *objectclient.ObjectClient
|
||||
Create(*SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeProvider, error)
|
||||
Get(name string, opts metav1.GetOptions) (*SourceCodeProvider, error)
|
||||
Update(*SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
|
||||
List(opts metav1.ListOptions) (*SourceCodeProviderList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() SourceCodeProviderController
|
||||
AddHandler(name string, sync SourceCodeProviderHandlerFunc)
|
||||
AddLifecycle(name string, lifecycle SourceCodeProviderLifecycle)
|
||||
AddClusterScopedHandler(name, clusterName string, sync SourceCodeProviderHandlerFunc)
|
||||
AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeProviderLifecycle)
|
||||
}
|
||||
|
||||
type sourceCodeProviderLister struct {
|
||||
controller *sourceCodeProviderController
|
||||
}
|
||||
|
||||
func (l *sourceCodeProviderLister) List(namespace string, selector labels.Selector) (ret []*SourceCodeProvider, err error) {
|
||||
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
|
||||
ret = append(ret, obj.(*SourceCodeProvider))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (l *sourceCodeProviderLister) Get(namespace, name string) (*SourceCodeProvider, 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: SourceCodeProviderGroupVersionKind.Group,
|
||||
Resource: "sourceCodeProvider",
|
||||
}, key)
|
||||
}
|
||||
return obj.(*SourceCodeProvider), nil
|
||||
}
|
||||
|
||||
type sourceCodeProviderController struct {
|
||||
controller.GenericController
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderController) Lister() SourceCodeProviderLister {
|
||||
return &sourceCodeProviderLister{
|
||||
controller: c,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderController) AddHandler(name string, handler SourceCodeProviderHandlerFunc) {
|
||||
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.(*SourceCodeProvider))
|
||||
})
|
||||
}
|
||||
|
||||
func (c *sourceCodeProviderController) AddClusterScopedHandler(name, cluster string, handler SourceCodeProviderHandlerFunc) {
|
||||
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.(*SourceCodeProvider))
|
||||
})
|
||||
}
|
||||
|
||||
type sourceCodeProviderFactory struct {
|
||||
}
|
||||
|
||||
func (c sourceCodeProviderFactory) Object() runtime.Object {
|
||||
return &SourceCodeProvider{}
|
||||
}
|
||||
|
||||
func (c sourceCodeProviderFactory) List() runtime.Object {
|
||||
return &SourceCodeProviderList{}
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Controller() SourceCodeProviderController {
|
||||
s.client.Lock()
|
||||
defer s.client.Unlock()
|
||||
|
||||
c, ok := s.client.sourceCodeProviderControllers[s.ns]
|
||||
if ok {
|
||||
return c
|
||||
}
|
||||
|
||||
genericController := controller.NewGenericController(SourceCodeProviderGroupVersionKind.Kind+"Controller",
|
||||
s.objectClient)
|
||||
|
||||
c = &sourceCodeProviderController{
|
||||
GenericController: genericController,
|
||||
}
|
||||
|
||||
s.client.sourceCodeProviderControllers[s.ns] = c
|
||||
s.client.starters = append(s.client.starters, c)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
type sourceCodeProviderClient struct {
|
||||
client *Client
|
||||
ns string
|
||||
objectClient *objectclient.ObjectClient
|
||||
controller SourceCodeProviderController
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) ObjectClient() *objectclient.ObjectClient {
|
||||
return s.objectClient
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Create(o *SourceCodeProvider) (*SourceCodeProvider, error) {
|
||||
obj, err := s.objectClient.Create(o)
|
||||
return obj.(*SourceCodeProvider), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Get(name string, opts metav1.GetOptions) (*SourceCodeProvider, error) {
|
||||
obj, err := s.objectClient.Get(name, opts)
|
||||
return obj.(*SourceCodeProvider), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*SourceCodeProvider, error) {
|
||||
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
|
||||
return obj.(*SourceCodeProvider), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Update(o *SourceCodeProvider) (*SourceCodeProvider, error) {
|
||||
obj, err := s.objectClient.Update(o.Name, o)
|
||||
return obj.(*SourceCodeProvider), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.Delete(name, options)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
|
||||
return s.objectClient.DeleteNamespaced(namespace, name, options)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) List(opts metav1.ListOptions) (*SourceCodeProviderList, error) {
|
||||
obj, err := s.objectClient.List(opts)
|
||||
return obj.(*SourceCodeProviderList), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return s.objectClient.Watch(opts)
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (s *sourceCodeProviderClient) Patch(o *SourceCodeProvider, data []byte, subresources ...string) (*SourceCodeProvider, error) {
|
||||
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
|
||||
return obj.(*SourceCodeProvider), err
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) AddHandler(name string, sync SourceCodeProviderHandlerFunc) {
|
||||
s.Controller().AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) AddLifecycle(name string, lifecycle SourceCodeProviderLifecycle) {
|
||||
sync := NewSourceCodeProviderLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.AddHandler(name, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) AddClusterScopedHandler(name, clusterName string, sync SourceCodeProviderHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *sourceCodeProviderClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle SourceCodeProviderLifecycle) {
|
||||
sync := NewSourceCodeProviderLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.AddClusterScopedHandler(name, clusterName, sync)
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/lifecycle"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
type SourceCodeProviderLifecycle interface {
|
||||
Create(obj *SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
Remove(obj *SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
Updated(obj *SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
}
|
||||
|
||||
type sourceCodeProviderLifecycleAdapter struct {
|
||||
lifecycle SourceCodeProviderLifecycle
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Create(obj.(*SourceCodeProvider))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Remove(obj.(*SourceCodeProvider))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func (w *sourceCodeProviderLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
|
||||
o, err := w.lifecycle.Updated(obj.(*SourceCodeProvider))
|
||||
if o == nil {
|
||||
return nil, err
|
||||
}
|
||||
return o, err
|
||||
}
|
||||
|
||||
func NewSourceCodeProviderLifecycleAdapter(name string, clusterScoped bool, client SourceCodeProviderInterface, l SourceCodeProviderLifecycle) SourceCodeProviderHandlerFunc {
|
||||
adapter := &sourceCodeProviderLifecycleAdapter{lifecycle: l}
|
||||
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
|
||||
return func(key string, obj *SourceCodeProvider) error {
|
||||
if obj == nil {
|
||||
return syncFn(key, nil)
|
||||
}
|
||||
return syncFn(key, obj)
|
||||
}
|
||||
}
|
@ -43,12 +43,6 @@ type Client struct {
|
||||
Notifier NotifierOperations
|
||||
ClusterAlert ClusterAlertOperations
|
||||
ProjectAlert ProjectAlertOperations
|
||||
ClusterPipeline ClusterPipelineOperations
|
||||
SourceCodeCredential SourceCodeCredentialOperations
|
||||
Pipeline PipelineOperations
|
||||
PipelineExecution PipelineExecutionOperations
|
||||
PipelineExecutionLog PipelineExecutionLogOperations
|
||||
SourceCodeRepository SourceCodeRepositoryOperations
|
||||
ComposeConfig ComposeConfigOperations
|
||||
ResourceQuotaTemplate ResourceQuotaTemplateOperations
|
||||
}
|
||||
@ -99,12 +93,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.Notifier = newNotifierClient(client)
|
||||
client.ClusterAlert = newClusterAlertClient(client)
|
||||
client.ProjectAlert = newProjectAlertClient(client)
|
||||
client.ClusterPipeline = newClusterPipelineClient(client)
|
||||
client.SourceCodeCredential = newSourceCodeCredentialClient(client)
|
||||
client.Pipeline = newPipelineClient(client)
|
||||
client.PipelineExecution = newPipelineExecutionClient(client)
|
||||
client.PipelineExecutionLog = newPipelineExecutionLogClient(client)
|
||||
client.SourceCodeRepository = newSourceCodeRepositoryClient(client)
|
||||
client.ComposeConfig = newComposeConfigClient(client)
|
||||
client.ResourceQuotaTemplate = newResourceQuotaTemplateClient(client)
|
||||
|
||||
|
@ -1,152 +0,0 @@
|
||||
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" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Deploy bool `json:"deploy,omitempty" yaml:"deploy,omitempty"`
|
||||
GithubConfig *GithubClusterConfig `json:"githubConfig,omitempty" yaml:"githubConfig,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Status *ClusterPipelineStatus `json:"status,omitempty" yaml:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"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)
|
||||
Replace(existing *ClusterPipeline) (*ClusterPipeline, error)
|
||||
ByID(id string) (*ClusterPipeline, error)
|
||||
Delete(container *ClusterPipeline) error
|
||||
|
||||
ActionAuthapp(resource *ClusterPipeline, input *AuthAppInput) (*ClusterPipeline, error)
|
||||
|
||||
ActionAuthuser(resource *ClusterPipeline, input *AuthUserInput) (*SourceCodeCredential, error)
|
||||
|
||||
ActionDeploy(resource *ClusterPipeline) error
|
||||
|
||||
ActionDestroy(resource *ClusterPipeline) error
|
||||
|
||||
ActionRevokeapp(resource *ClusterPipeline) 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) Replace(obj *ClusterPipeline) (*ClusterPipeline, error) {
|
||||
resp := &ClusterPipeline{}
|
||||
err := c.apiClient.Ops.DoReplace(ClusterPipelineType, &obj.Resource, obj, 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) ActionAuthapp(resource *ClusterPipeline, input *AuthAppInput) (*ClusterPipeline, error) {
|
||||
resp := &ClusterPipeline{}
|
||||
err := c.apiClient.Ops.DoAction(ClusterPipelineType, "authapp", &resource.Resource, input, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
func (c *ClusterPipelineClient) ActionDeploy(resource *ClusterPipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(ClusterPipelineType, "deploy", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *ClusterPipelineClient) ActionDestroy(resource *ClusterPipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(ClusterPipelineType, "destroy", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *ClusterPipelineClient) ActionRevokeapp(resource *ClusterPipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(ClusterPipelineType, "revokeapp", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ClusterPipelineSpecType = "clusterPipelineSpec"
|
||||
ClusterPipelineSpecFieldClusterID = "clusterId"
|
||||
ClusterPipelineSpecFieldDeploy = "deploy"
|
||||
ClusterPipelineSpecFieldGithubConfig = "githubConfig"
|
||||
)
|
||||
|
||||
type ClusterPipelineSpec struct {
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Deploy bool `json:"deploy,omitempty" yaml:"deploy,omitempty"`
|
||||
GithubConfig *GithubClusterConfig `json:"githubConfig,omitempty" yaml:"githubConfig,omitempty"`
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ClusterPipelineStatusType = "clusterPipelineStatus"
|
||||
)
|
||||
|
||||
type ClusterPipelineStatus struct {
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubClusterConfigType = "githubClusterConfig"
|
||||
GithubClusterConfigFieldClientID = "clientId"
|
||||
GithubClusterConfigFieldClientSecret = "clientSecret"
|
||||
GithubClusterConfigFieldHost = "host"
|
||||
GithubClusterConfigFieldRedirectURL = "redirectUrl"
|
||||
GithubClusterConfigFieldTLS = "tls"
|
||||
)
|
||||
|
||||
type GithubClusterConfig struct {
|
||||
ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"`
|
||||
ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"`
|
||||
Host string `json:"host,omitempty" yaml:"host,omitempty"`
|
||||
RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"`
|
||||
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
}
|
@ -1,162 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
PipelineType = "pipeline"
|
||||
PipelineFieldAnnotations = "annotations"
|
||||
PipelineFieldCreated = "created"
|
||||
PipelineFieldCreatorID = "creatorId"
|
||||
PipelineFieldLabels = "labels"
|
||||
PipelineFieldLastExecutionID = "lastExecutionId"
|
||||
PipelineFieldLastRunState = "lastRunState"
|
||||
PipelineFieldLastStarted = "lastStarted"
|
||||
PipelineFieldName = "name"
|
||||
PipelineFieldNamespaceId = "namespaceId"
|
||||
PipelineFieldNextRun = "nextRun"
|
||||
PipelineFieldNextStart = "nextStart"
|
||||
PipelineFieldOwnerReferences = "ownerReferences"
|
||||
PipelineFieldPipelineState = "pipelineState"
|
||||
PipelineFieldProjectID = "projectId"
|
||||
PipelineFieldRemoved = "removed"
|
||||
PipelineFieldSourceCodeCredential = "sourceCodeCredential"
|
||||
PipelineFieldStages = "stages"
|
||||
PipelineFieldState = "state"
|
||||
PipelineFieldTemplates = "templates"
|
||||
PipelineFieldToken = "token"
|
||||
PipelineFieldTransitioning = "transitioning"
|
||||
PipelineFieldTransitioningMessage = "transitioningMessage"
|
||||
PipelineFieldTriggerCronExpression = "triggerCronExpression"
|
||||
PipelineFieldTriggerCronTimezone = "triggerCronTimezone"
|
||||
PipelineFieldTriggerWebhookPr = "triggerWebhookPr"
|
||||
PipelineFieldTriggerWebhookPush = "triggerWebhookPush"
|
||||
PipelineFieldTriggerWebhookTag = "triggerWebhookTag"
|
||||
PipelineFieldUUID = "uuid"
|
||||
PipelineFieldWebHookID = "webhookId"
|
||||
)
|
||||
|
||||
type Pipeline struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
LastExecutionID string `json:"lastExecutionId,omitempty" yaml:"lastExecutionId,omitempty"`
|
||||
LastRunState string `json:"lastRunState,omitempty" yaml:"lastRunState,omitempty"`
|
||||
LastStarted string `json:"lastStarted,omitempty" yaml:"lastStarted,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
NextRun int64 `json:"nextRun,omitempty" yaml:"nextRun,omitempty"`
|
||||
NextStart string `json:"nextStart,omitempty" yaml:"nextStart,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
PipelineState string `json:"pipelineState,omitempty" yaml:"pipelineState,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SourceCodeCredential *SourceCodeCredential `json:"sourceCodeCredential,omitempty" yaml:"sourceCodeCredential,omitempty"`
|
||||
Stages []Stage `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Templates map[string]string `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
TriggerCronExpression string `json:"triggerCronExpression,omitempty" yaml:"triggerCronExpression,omitempty"`
|
||||
TriggerCronTimezone string `json:"triggerCronTimezone,omitempty" yaml:"triggerCronTimezone,omitempty"`
|
||||
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
|
||||
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
|
||||
TriggerWebhookTag bool `json:"triggerWebhookTag,omitempty" yaml:"triggerWebhookTag,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
WebHookID string `json:"webhookId,omitempty" yaml:"webhookId,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)
|
||||
Replace(existing *Pipeline) (*Pipeline, error)
|
||||
ByID(id string) (*Pipeline, error)
|
||||
Delete(container *Pipeline) error
|
||||
|
||||
ActionActivate(resource *Pipeline) error
|
||||
|
||||
ActionDeactivate(resource *Pipeline) error
|
||||
|
||||
ActionRun(resource *Pipeline, input *RunPipelineInput) 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) Replace(obj *Pipeline) (*Pipeline, error) {
|
||||
resp := &Pipeline{}
|
||||
err := c.apiClient.Ops.DoReplace(PipelineType, &obj.Resource, obj, 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)
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionActivate(resource *Pipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "activate", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionDeactivate(resource *Pipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "deactivate", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionRun(resource *Pipeline, input *RunPipelineInput) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "run", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
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" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Line int64 `json:"line,omitempty" yaml:"line,omitempty"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
PipelineExecutionID string `json:"pipelineExecutionId,omitempty" yaml:"pipelineExecutionId,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
Stage int64 `json:"stage,omitempty" yaml:"stage,omitempty"`
|
||||
Step int64 `json:"step,omitempty" yaml:"step,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"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)
|
||||
Replace(existing *PipelineExecutionLog) (*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) Replace(obj *PipelineExecutionLog) (*PipelineExecutionLog, error) {
|
||||
resp := &PipelineExecutionLog{}
|
||||
err := c.apiClient.Ops.DoReplace(PipelineExecutionLogType, &obj.Resource, obj, 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)
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineExecutionLogSpecType = "pipelineExecutionLogSpec"
|
||||
PipelineExecutionLogSpecFieldLine = "line"
|
||||
PipelineExecutionLogSpecFieldMessage = "message"
|
||||
PipelineExecutionLogSpecFieldPipelineExecutionID = "pipelineExecutionId"
|
||||
PipelineExecutionLogSpecFieldStage = "stage"
|
||||
PipelineExecutionLogSpecFieldStep = "step"
|
||||
)
|
||||
|
||||
type PipelineExecutionLogSpec struct {
|
||||
Line int64 `json:"line,omitempty" yaml:"line,omitempty"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
PipelineExecutionID string `json:"pipelineExecutionId,omitempty" yaml:"pipelineExecutionId,omitempty"`
|
||||
Stage int64 `json:"stage,omitempty" yaml:"stage,omitempty"`
|
||||
Step int64 `json:"step,omitempty" yaml:"step,omitempty"`
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineExecutionSpecType = "pipelineExecutionSpec"
|
||||
PipelineExecutionSpecFieldPipeline = "pipeline"
|
||||
PipelineExecutionSpecFieldPipelineID = "pipelineId"
|
||||
PipelineExecutionSpecFieldRun = "run"
|
||||
PipelineExecutionSpecFieldTriggerUserID = "triggerUserId"
|
||||
PipelineExecutionSpecFieldTriggeredBy = "triggeredBy"
|
||||
)
|
||||
|
||||
type PipelineExecutionSpec struct {
|
||||
Pipeline *Pipeline `json:"pipeline,omitempty" yaml:"pipeline,omitempty"`
|
||||
PipelineID string `json:"pipelineId,omitempty" yaml:"pipelineId,omitempty"`
|
||||
Run int64 `json:"run,omitempty" yaml:"run,omitempty"`
|
||||
TriggerUserID string `json:"triggerUserId,omitempty" yaml:"triggerUserId,omitempty"`
|
||||
TriggeredBy string `json:"triggeredBy,omitempty" yaml:"triggeredBy,omitempty"`
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineSpecType = "pipelineSpec"
|
||||
PipelineSpecFieldDisplayName = "displayName"
|
||||
PipelineSpecFieldStages = "stages"
|
||||
PipelineSpecFieldTemplates = "templates"
|
||||
PipelineSpecFieldTriggerCronExpression = "triggerCronExpression"
|
||||
PipelineSpecFieldTriggerCronTimezone = "triggerCronTimezone"
|
||||
PipelineSpecFieldTriggerWebhookPr = "triggerWebhookPr"
|
||||
PipelineSpecFieldTriggerWebhookPush = "triggerWebhookPush"
|
||||
PipelineSpecFieldTriggerWebhookTag = "triggerWebhookTag"
|
||||
)
|
||||
|
||||
type PipelineSpec struct {
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
Stages []Stage `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
Templates map[string]string `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
TriggerCronExpression string `json:"triggerCronExpression,omitempty" yaml:"triggerCronExpression,omitempty"`
|
||||
TriggerCronTimezone string `json:"triggerCronTimezone,omitempty" yaml:"triggerCronTimezone,omitempty"`
|
||||
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
|
||||
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
|
||||
TriggerWebhookTag bool `json:"triggerWebhookTag,omitempty" yaml:"triggerWebhookTag,omitempty"`
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
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" yaml:"command,omitempty"`
|
||||
Entrypoint string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
|
||||
Env []string `json:"env,omitempty" yaml:"env,omitempty"`
|
||||
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||
IsShell bool `json:"isShell,omitempty" yaml:"isShell,omitempty"`
|
||||
ShellScript string `json:"shellScript,omitempty" yaml:"shellScript,omitempty"`
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
SourceCodeConfigType = "sourceCodeConfig"
|
||||
SourceCodeConfigFieldBranch = "branch"
|
||||
SourceCodeConfigFieldBranchCondition = "branchCondition"
|
||||
SourceCodeConfigFieldSourceCodeCredentialID = "sourceCodeCredentialId"
|
||||
SourceCodeConfigFieldURL = "url"
|
||||
)
|
||||
|
||||
type SourceCodeConfig struct {
|
||||
Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
|
||||
BranchCondition string `json:"branchCondition,omitempty" yaml:"branchCondition,omitempty"`
|
||||
SourceCodeCredentialID string `json:"sourceCodeCredentialId,omitempty" yaml:"sourceCodeCredentialId,omitempty"`
|
||||
URL string `json:"url,omitempty" yaml:"url,omitempty"`
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
SourceCodeCredentialStatusType = "sourceCodeCredentialStatus"
|
||||
)
|
||||
|
||||
type SourceCodeCredentialStatus struct {
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StageType = "stage"
|
||||
StageFieldName = "name"
|
||||
StageFieldSteps = "steps"
|
||||
)
|
||||
|
||||
type Stage struct {
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"`
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StepType = "step"
|
||||
StepFieldPublishImageConfig = "publishImageConfig"
|
||||
StepFieldRunScriptConfig = "runScriptConfig"
|
||||
StepFieldSourceCodeConfig = "sourceCodeConfig"
|
||||
StepFieldTimeout = "timeout"
|
||||
)
|
||||
|
||||
type Step struct {
|
||||
PublishImageConfig *PublishImageConfig `json:"publishImageConfig,omitempty" yaml:"publishImageConfig,omitempty"`
|
||||
RunScriptConfig *RunScriptConfig `json:"runScriptConfig,omitempty" yaml:"runScriptConfig,omitempty"`
|
||||
SourceCodeConfig *SourceCodeConfig `json:"sourceCodeConfig,omitempty" yaml:"sourceCodeConfig,omitempty"`
|
||||
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||
}
|
14
client/project/v3/zz_generated_apply_yaml_config.go
Normal file
14
client/project/v3/zz_generated_apply_yaml_config.go
Normal file
@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ApplyYamlConfigType = "applyYamlConfig"
|
||||
ApplyYamlConfigFieldContent = "content"
|
||||
ApplyYamlConfigFieldNamespace = "namespace"
|
||||
ApplyYamlConfigFieldPath = "path"
|
||||
)
|
||||
|
||||
type ApplyYamlConfig struct {
|
||||
Content string `json:"content,omitempty" yaml:"content,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
Path string `json:"path,omitempty" yaml:"path,omitempty"`
|
||||
}
|
@ -35,6 +35,13 @@ type Client struct {
|
||||
Workload WorkloadOperations
|
||||
App AppOperations
|
||||
AppRevision AppRevisionOperations
|
||||
SourceCodeProvider SourceCodeProviderOperations
|
||||
SourceCodeProviderConfig SourceCodeProviderConfigOperations
|
||||
SourceCodeCredential SourceCodeCredentialOperations
|
||||
Pipeline PipelineOperations
|
||||
PipelineExecution PipelineExecutionOperations
|
||||
PipelineSetting PipelineSettingOperations
|
||||
SourceCodeRepository SourceCodeRepositoryOperations
|
||||
}
|
||||
|
||||
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
@ -75,6 +82,13 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
client.Workload = newWorkloadClient(client)
|
||||
client.App = newAppClient(client)
|
||||
client.AppRevision = newAppRevisionClient(client)
|
||||
client.SourceCodeProvider = newSourceCodeProviderClient(client)
|
||||
client.SourceCodeProviderConfig = newSourceCodeProviderConfigClient(client)
|
||||
client.SourceCodeCredential = newSourceCodeCredentialClient(client)
|
||||
client.Pipeline = newPipelineClient(client)
|
||||
client.PipelineExecution = newPipelineExecutionClient(client)
|
||||
client.PipelineSetting = newPipelineSettingClient(client)
|
||||
client.SourceCodeRepository = newSourceCodeRepositoryClient(client)
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
12
client/project/v3/zz_generated_constraint.go
Normal file
12
client/project/v3/zz_generated_constraint.go
Normal file
@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ConstraintType = "constraint"
|
||||
ConstraintFieldExclude = "exclude"
|
||||
ConstraintFieldInclude = "include"
|
||||
)
|
||||
|
||||
type Constraint struct {
|
||||
Exclude []string `json:"exclude,omitempty" yaml:"exclude,omitempty"`
|
||||
Include []string `json:"include,omitempty" yaml:"include,omitempty"`
|
||||
}
|
12
client/project/v3/zz_generated_constraints.go
Normal file
12
client/project/v3/zz_generated_constraints.go
Normal file
@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ConstraintsType = "constraints"
|
||||
ConstraintsFieldBranch = "branch"
|
||||
ConstraintsFieldEvent = "event"
|
||||
)
|
||||
|
||||
type Constraints struct {
|
||||
Branch *Constraint `json:"branch,omitempty" yaml:"branch,omitempty"`
|
||||
Event *Constraint `json:"event,omitempty" yaml:"event,omitempty"`
|
||||
}
|
14
client/project/v3/zz_generated_env_from.go
Normal file
14
client/project/v3/zz_generated_env_from.go
Normal file
@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
EnvFromType = "envFrom"
|
||||
EnvFromFieldSourceKey = "sourceKey"
|
||||
EnvFromFieldSourceName = "sourceName"
|
||||
EnvFromFieldTargetKey = "targetKey"
|
||||
)
|
||||
|
||||
type EnvFrom struct {
|
||||
SourceKey string `json:"sourceKey,omitempty" yaml:"sourceKey,omitempty"`
|
||||
SourceName string `json:"sourceName,omitempty" yaml:"sourceName,omitempty"`
|
||||
TargetKey string `json:"targetKey,omitempty" yaml:"targetKey,omitempty"`
|
||||
}
|
10
client/project/v3/zz_generated_github_login_input.go
Normal file
10
client/project/v3/zz_generated_github_login_input.go
Normal file
@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubLoginInputType = "githubLoginInput"
|
||||
GithubLoginInputFieldCode = "code"
|
||||
)
|
||||
|
||||
type GithubLoginInput struct {
|
||||
Code string `json:"code,omitempty" yaml:"code,omitempty"`
|
||||
}
|
42
client/project/v3/zz_generated_github_pipeline_config.go
Normal file
42
client/project/v3/zz_generated_github_pipeline_config.go
Normal file
@ -0,0 +1,42 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubPipelineConfigType = "githubPipelineConfig"
|
||||
GithubPipelineConfigFieldAnnotations = "annotations"
|
||||
GithubPipelineConfigFieldClientID = "clientId"
|
||||
GithubPipelineConfigFieldClientSecret = "clientSecret"
|
||||
GithubPipelineConfigFieldCreated = "created"
|
||||
GithubPipelineConfigFieldCreatorID = "creatorId"
|
||||
GithubPipelineConfigFieldEnabled = "enabled"
|
||||
GithubPipelineConfigFieldHostname = "hostname"
|
||||
GithubPipelineConfigFieldInherit = "inherit"
|
||||
GithubPipelineConfigFieldLabels = "labels"
|
||||
GithubPipelineConfigFieldName = "name"
|
||||
GithubPipelineConfigFieldNamespaceId = "namespaceId"
|
||||
GithubPipelineConfigFieldOwnerReferences = "ownerReferences"
|
||||
GithubPipelineConfigFieldProjectID = "projectId"
|
||||
GithubPipelineConfigFieldRemoved = "removed"
|
||||
GithubPipelineConfigFieldTLS = "tls"
|
||||
GithubPipelineConfigFieldType = "type"
|
||||
GithubPipelineConfigFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type GithubPipelineConfig struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"`
|
||||
ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
Inherit bool `json:"inherit,omitempty" yaml:"inherit,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubPipelineConfigApplyInputType = "githubPipelineConfigApplyInput"
|
||||
GithubPipelineConfigApplyInputFieldCode = "code"
|
||||
GithubPipelineConfigApplyInputFieldGithubConfig = "githubConfig"
|
||||
GithubPipelineConfigApplyInputFieldInheritAuth = "inheritAuth"
|
||||
)
|
||||
|
||||
type GithubPipelineConfigApplyInput struct {
|
||||
Code string `json:"code,omitempty" yaml:"code,omitempty"`
|
||||
GithubConfig *GithubPipelineConfig `json:"githubConfig,omitempty" yaml:"githubConfig,omitempty"`
|
||||
InheritAuth bool `json:"inheritAuth,omitempty" yaml:"inheritAuth,omitempty"`
|
||||
}
|
30
client/project/v3/zz_generated_github_provider.go
Normal file
30
client/project/v3/zz_generated_github_provider.go
Normal file
@ -0,0 +1,30 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GithubProviderType = "githubProvider"
|
||||
GithubProviderFieldAnnotations = "annotations"
|
||||
GithubProviderFieldCreated = "created"
|
||||
GithubProviderFieldCreatorID = "creatorId"
|
||||
GithubProviderFieldLabels = "labels"
|
||||
GithubProviderFieldName = "name"
|
||||
GithubProviderFieldOwnerReferences = "ownerReferences"
|
||||
GithubProviderFieldProjectID = "projectId"
|
||||
GithubProviderFieldRedirectURL = "redirectUrl"
|
||||
GithubProviderFieldRemoved = "removed"
|
||||
GithubProviderFieldType = "type"
|
||||
GithubProviderFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type GithubProvider struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
10
client/project/v3/zz_generated_gitlab_login_input.go
Normal file
10
client/project/v3/zz_generated_gitlab_login_input.go
Normal file
@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GitlabLoginInputType = "gitlabLoginInput"
|
||||
GitlabLoginInputFieldCode = "code"
|
||||
)
|
||||
|
||||
type GitlabLoginInput struct {
|
||||
Code string `json:"code,omitempty" yaml:"code,omitempty"`
|
||||
}
|
42
client/project/v3/zz_generated_gitlab_pipeline_config.go
Normal file
42
client/project/v3/zz_generated_gitlab_pipeline_config.go
Normal file
@ -0,0 +1,42 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GitlabPipelineConfigType = "gitlabPipelineConfig"
|
||||
GitlabPipelineConfigFieldAnnotations = "annotations"
|
||||
GitlabPipelineConfigFieldClientID = "clientId"
|
||||
GitlabPipelineConfigFieldClientSecret = "clientSecret"
|
||||
GitlabPipelineConfigFieldCreated = "created"
|
||||
GitlabPipelineConfigFieldCreatorID = "creatorId"
|
||||
GitlabPipelineConfigFieldEnabled = "enabled"
|
||||
GitlabPipelineConfigFieldHostname = "hostname"
|
||||
GitlabPipelineConfigFieldLabels = "labels"
|
||||
GitlabPipelineConfigFieldName = "name"
|
||||
GitlabPipelineConfigFieldNamespaceId = "namespaceId"
|
||||
GitlabPipelineConfigFieldOwnerReferences = "ownerReferences"
|
||||
GitlabPipelineConfigFieldProjectID = "projectId"
|
||||
GitlabPipelineConfigFieldRedirectURL = "redirectUrl"
|
||||
GitlabPipelineConfigFieldRemoved = "removed"
|
||||
GitlabPipelineConfigFieldTLS = "tls"
|
||||
GitlabPipelineConfigFieldType = "type"
|
||||
GitlabPipelineConfigFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type GitlabPipelineConfig struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"`
|
||||
ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GitlabPipelineConfigApplyInputType = "gitlabPipelineConfigApplyInput"
|
||||
GitlabPipelineConfigApplyInputFieldCode = "code"
|
||||
GitlabPipelineConfigApplyInputFieldGitlabConfig = "gitlabConfig"
|
||||
)
|
||||
|
||||
type GitlabPipelineConfigApplyInput struct {
|
||||
Code string `json:"code,omitempty" yaml:"code,omitempty"`
|
||||
GitlabConfig *GitlabPipelineConfig `json:"gitlabConfig,omitempty" yaml:"gitlabConfig,omitempty"`
|
||||
}
|
30
client/project/v3/zz_generated_gitlab_provider.go
Normal file
30
client/project/v3/zz_generated_gitlab_provider.go
Normal file
@ -0,0 +1,30 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
GitlabProviderType = "gitlabProvider"
|
||||
GitlabProviderFieldAnnotations = "annotations"
|
||||
GitlabProviderFieldCreated = "created"
|
||||
GitlabProviderFieldCreatorID = "creatorId"
|
||||
GitlabProviderFieldLabels = "labels"
|
||||
GitlabProviderFieldName = "name"
|
||||
GitlabProviderFieldOwnerReferences = "ownerReferences"
|
||||
GitlabProviderFieldProjectID = "projectId"
|
||||
GitlabProviderFieldRedirectURL = "redirectUrl"
|
||||
GitlabProviderFieldRemoved = "removed"
|
||||
GitlabProviderFieldType = "type"
|
||||
GitlabProviderFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type GitlabProvider struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
165
client/project/v3/zz_generated_pipeline.go
Normal file
165
client/project/v3/zz_generated_pipeline.go
Normal file
@ -0,0 +1,165 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
PipelineType = "pipeline"
|
||||
PipelineFieldAnnotations = "annotations"
|
||||
PipelineFieldCreated = "created"
|
||||
PipelineFieldCreatorID = "creatorId"
|
||||
PipelineFieldLabels = "labels"
|
||||
PipelineFieldLastExecutionID = "lastExecutionId"
|
||||
PipelineFieldLastRunState = "lastRunState"
|
||||
PipelineFieldLastStarted = "lastStarted"
|
||||
PipelineFieldName = "name"
|
||||
PipelineFieldNamespaceId = "namespaceId"
|
||||
PipelineFieldNextRun = "nextRun"
|
||||
PipelineFieldNextStart = "nextStart"
|
||||
PipelineFieldOwnerReferences = "ownerReferences"
|
||||
PipelineFieldPipelineState = "pipelineState"
|
||||
PipelineFieldProjectID = "projectId"
|
||||
PipelineFieldRemoved = "removed"
|
||||
PipelineFieldRepositoryURL = "repositoryUrl"
|
||||
PipelineFieldSourceCodeCredential = "sourceCodeCredential"
|
||||
PipelineFieldSourceCodeCredentialID = "sourceCodeCredentialId"
|
||||
PipelineFieldState = "state"
|
||||
PipelineFieldToken = "token"
|
||||
PipelineFieldTransitioning = "transitioning"
|
||||
PipelineFieldTransitioningMessage = "transitioningMessage"
|
||||
PipelineFieldTriggerWebhookPr = "triggerWebhookPr"
|
||||
PipelineFieldTriggerWebhookPush = "triggerWebhookPush"
|
||||
PipelineFieldTriggerWebhookTag = "triggerWebhookTag"
|
||||
PipelineFieldUUID = "uuid"
|
||||
PipelineFieldWebHookID = "webhookId"
|
||||
)
|
||||
|
||||
type Pipeline struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
LastExecutionID string `json:"lastExecutionId,omitempty" yaml:"lastExecutionId,omitempty"`
|
||||
LastRunState string `json:"lastRunState,omitempty" yaml:"lastRunState,omitempty"`
|
||||
LastStarted string `json:"lastStarted,omitempty" yaml:"lastStarted,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
NextRun int64 `json:"nextRun,omitempty" yaml:"nextRun,omitempty"`
|
||||
NextStart string `json:"nextStart,omitempty" yaml:"nextStart,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
PipelineState string `json:"pipelineState,omitempty" yaml:"pipelineState,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
RepositoryURL string `json:"repositoryUrl,omitempty" yaml:"repositoryUrl,omitempty"`
|
||||
SourceCodeCredential *SourceCodeCredential `json:"sourceCodeCredential,omitempty" yaml:"sourceCodeCredential,omitempty"`
|
||||
SourceCodeCredentialID string `json:"sourceCodeCredentialId,omitempty" yaml:"sourceCodeCredentialId,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Token string `json:"token,omitempty" yaml:"token,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
|
||||
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
|
||||
TriggerWebhookTag bool `json:"triggerWebhookTag,omitempty" yaml:"triggerWebhookTag,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
WebHookID string `json:"webhookId,omitempty" yaml:"webhookId,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)
|
||||
Replace(existing *Pipeline) (*Pipeline, error)
|
||||
ByID(id string) (*Pipeline, error)
|
||||
Delete(container *Pipeline) error
|
||||
|
||||
ActionActivate(resource *Pipeline) error
|
||||
|
||||
ActionDeactivate(resource *Pipeline) error
|
||||
|
||||
ActionPushconfig(resource *Pipeline, input *PushPipelineConfigInput) error
|
||||
|
||||
ActionRun(resource *Pipeline, input *RunPipelineInput) 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) Replace(obj *Pipeline) (*Pipeline, error) {
|
||||
resp := &Pipeline{}
|
||||
err := c.apiClient.Ops.DoReplace(PipelineType, &obj.Resource, obj, 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)
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionActivate(resource *Pipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "activate", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionDeactivate(resource *Pipeline) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "deactivate", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionPushconfig(resource *Pipeline, input *PushPipelineConfigInput) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "pushconfig", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PipelineClient) ActionRun(resource *Pipeline, input *RunPipelineInput) error {
|
||||
err := c.apiClient.Ops.DoAction(PipelineType, "run", &resource.Resource, input, nil)
|
||||
return err
|
||||
}
|
14
client/project/v3/zz_generated_pipeline_config.go
Normal file
14
client/project/v3/zz_generated_pipeline_config.go
Normal file
@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineConfigType = "pipelineConfig"
|
||||
PipelineConfigFieldBranch = "branch"
|
||||
PipelineConfigFieldStages = "stages"
|
||||
PipelineConfigFieldTimeout = "timeout"
|
||||
)
|
||||
|
||||
type PipelineConfig struct {
|
||||
Branch *Constraint `json:"branch,omitempty" yaml:"branch,omitempty"`
|
||||
Stages []Stage `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||
}
|
@ -7,25 +7,34 @@ import (
|
||||
const (
|
||||
PipelineExecutionType = "pipelineExecution"
|
||||
PipelineExecutionFieldAnnotations = "annotations"
|
||||
PipelineExecutionFieldAuthor = "author"
|
||||
PipelineExecutionFieldAvatarURL = "avatarUrl"
|
||||
PipelineExecutionFieldBranch = "branch"
|
||||
PipelineExecutionFieldCommit = "commit"
|
||||
PipelineExecutionFieldConditions = "conditions"
|
||||
PipelineExecutionFieldCreated = "created"
|
||||
PipelineExecutionFieldCreatorID = "creatorId"
|
||||
PipelineExecutionFieldEmail = "email"
|
||||
PipelineExecutionFieldEnded = "ended"
|
||||
PipelineExecutionFieldEnvVars = "envVars"
|
||||
PipelineExecutionFieldEvent = "event"
|
||||
PipelineExecutionFieldExecutionState = "executionState"
|
||||
PipelineExecutionFieldHTMLLink = "htmlLink"
|
||||
PipelineExecutionFieldLabels = "labels"
|
||||
PipelineExecutionFieldMessage = "message"
|
||||
PipelineExecutionFieldName = "name"
|
||||
PipelineExecutionFieldNamespaceId = "namespaceId"
|
||||
PipelineExecutionFieldOwnerReferences = "ownerReferences"
|
||||
PipelineExecutionFieldPipeline = "pipeline"
|
||||
PipelineExecutionFieldPipelineConfig = "pipelineConfig"
|
||||
PipelineExecutionFieldPipelineID = "pipelineId"
|
||||
PipelineExecutionFieldProjectID = "projectId"
|
||||
PipelineExecutionFieldRef = "ref"
|
||||
PipelineExecutionFieldRemoved = "removed"
|
||||
PipelineExecutionFieldRepositoryURL = "repositoryUrl"
|
||||
PipelineExecutionFieldRun = "run"
|
||||
PipelineExecutionFieldStages = "stages"
|
||||
PipelineExecutionFieldStarted = "started"
|
||||
PipelineExecutionFieldState = "state"
|
||||
PipelineExecutionFieldTitle = "title"
|
||||
PipelineExecutionFieldTransitioning = "transitioning"
|
||||
PipelineExecutionFieldTransitioningMessage = "transitioningMessage"
|
||||
PipelineExecutionFieldTriggerUserID = "triggerUserId"
|
||||
@ -36,25 +45,34 @@ const (
|
||||
type PipelineExecution struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Author string `json:"author,omitempty" yaml:"author,omitempty"`
|
||||
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
|
||||
Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
|
||||
Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
|
||||
Conditions []PipelineCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Email string `json:"email,omitempty" yaml:"email,omitempty"`
|
||||
Ended string `json:"ended,omitempty" yaml:"ended,omitempty"`
|
||||
EnvVars map[string]string `json:"envVars,omitempty" yaml:"envVars,omitempty"`
|
||||
Event string `json:"event,omitempty" yaml:"event,omitempty"`
|
||||
ExecutionState string `json:"executionState,omitempty" yaml:"executionState,omitempty"`
|
||||
HTMLLink string `json:"htmlLink,omitempty" yaml:"htmlLink,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Pipeline *Pipeline `json:"pipeline,omitempty" yaml:"pipeline,omitempty"`
|
||||
PipelineConfig *PipelineConfig `json:"pipelineConfig,omitempty" yaml:"pipelineConfig,omitempty"`
|
||||
PipelineID string `json:"pipelineId,omitempty" yaml:"pipelineId,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Ref string `json:"ref,omitempty" yaml:"ref,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
RepositoryURL string `json:"repositoryUrl,omitempty" yaml:"repositoryUrl,omitempty"`
|
||||
Run int64 `json:"run,omitempty" yaml:"run,omitempty"`
|
||||
Stages []StageStatus `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
Started string `json:"started,omitempty" yaml:"started,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Title string `json:"title,omitempty" yaml:"title,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
TriggerUserID string `json:"triggerUserId,omitempty" yaml:"triggerUserId,omitempty"`
|
42
client/project/v3/zz_generated_pipeline_execution_spec.go
Normal file
42
client/project/v3/zz_generated_pipeline_execution_spec.go
Normal file
@ -0,0 +1,42 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineExecutionSpecType = "pipelineExecutionSpec"
|
||||
PipelineExecutionSpecFieldAuthor = "author"
|
||||
PipelineExecutionSpecFieldAvatarURL = "avatarUrl"
|
||||
PipelineExecutionSpecFieldBranch = "branch"
|
||||
PipelineExecutionSpecFieldCommit = "commit"
|
||||
PipelineExecutionSpecFieldEmail = "email"
|
||||
PipelineExecutionSpecFieldEvent = "event"
|
||||
PipelineExecutionSpecFieldHTMLLink = "htmlLink"
|
||||
PipelineExecutionSpecFieldMessage = "message"
|
||||
PipelineExecutionSpecFieldPipelineConfig = "pipelineConfig"
|
||||
PipelineExecutionSpecFieldPipelineID = "pipelineId"
|
||||
PipelineExecutionSpecFieldProjectID = "projectId"
|
||||
PipelineExecutionSpecFieldRef = "ref"
|
||||
PipelineExecutionSpecFieldRepositoryURL = "repositoryUrl"
|
||||
PipelineExecutionSpecFieldRun = "run"
|
||||
PipelineExecutionSpecFieldTitle = "title"
|
||||
PipelineExecutionSpecFieldTriggerUserID = "triggerUserId"
|
||||
PipelineExecutionSpecFieldTriggeredBy = "triggeredBy"
|
||||
)
|
||||
|
||||
type PipelineExecutionSpec struct {
|
||||
Author string `json:"author,omitempty" yaml:"author,omitempty"`
|
||||
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
|
||||
Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
|
||||
Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
|
||||
Email string `json:"email,omitempty" yaml:"email,omitempty"`
|
||||
Event string `json:"event,omitempty" yaml:"event,omitempty"`
|
||||
HTMLLink string `json:"htmlLink,omitempty" yaml:"htmlLink,omitempty"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
PipelineConfig *PipelineConfig `json:"pipelineConfig,omitempty" yaml:"pipelineConfig,omitempty"`
|
||||
PipelineID string `json:"pipelineId,omitempty" yaml:"pipelineId,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Ref string `json:"ref,omitempty" yaml:"ref,omitempty"`
|
||||
RepositoryURL string `json:"repositoryUrl,omitempty" yaml:"repositoryUrl,omitempty"`
|
||||
Run int64 `json:"run,omitempty" yaml:"run,omitempty"`
|
||||
Title string `json:"title,omitempty" yaml:"title,omitempty"`
|
||||
TriggerUserID string `json:"triggerUserId,omitempty" yaml:"triggerUserId,omitempty"`
|
||||
TriggeredBy string `json:"triggeredBy,omitempty" yaml:"triggeredBy,omitempty"`
|
||||
}
|
@ -2,20 +2,16 @@ package client
|
||||
|
||||
const (
|
||||
PipelineExecutionStatusType = "pipelineExecutionStatus"
|
||||
PipelineExecutionStatusFieldCommit = "commit"
|
||||
PipelineExecutionStatusFieldConditions = "conditions"
|
||||
PipelineExecutionStatusFieldEnded = "ended"
|
||||
PipelineExecutionStatusFieldEnvVars = "envVars"
|
||||
PipelineExecutionStatusFieldExecutionState = "executionState"
|
||||
PipelineExecutionStatusFieldStages = "stages"
|
||||
PipelineExecutionStatusFieldStarted = "started"
|
||||
)
|
||||
|
||||
type PipelineExecutionStatus struct {
|
||||
Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
|
||||
Conditions []PipelineCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
|
||||
Ended string `json:"ended,omitempty" yaml:"ended,omitempty"`
|
||||
EnvVars map[string]string `json:"envVars,omitempty" yaml:"envVars,omitempty"`
|
||||
ExecutionState string `json:"executionState,omitempty" yaml:"executionState,omitempty"`
|
||||
Stages []StageStatus `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
Started string `json:"started,omitempty" yaml:"started,omitempty"`
|
109
client/project/v3/zz_generated_pipeline_setting.go
Normal file
109
client/project/v3/zz_generated_pipeline_setting.go
Normal file
@ -0,0 +1,109 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
PipelineSettingType = "pipelineSetting"
|
||||
PipelineSettingFieldAnnotations = "annotations"
|
||||
PipelineSettingFieldCreated = "created"
|
||||
PipelineSettingFieldCreatorID = "creatorId"
|
||||
PipelineSettingFieldCustomized = "customized"
|
||||
PipelineSettingFieldDefault = "default"
|
||||
PipelineSettingFieldLabels = "labels"
|
||||
PipelineSettingFieldName = "name"
|
||||
PipelineSettingFieldNamespaceId = "namespaceId"
|
||||
PipelineSettingFieldOwnerReferences = "ownerReferences"
|
||||
PipelineSettingFieldProjectID = "projectId"
|
||||
PipelineSettingFieldRemoved = "removed"
|
||||
PipelineSettingFieldUUID = "uuid"
|
||||
PipelineSettingFieldValue = "value"
|
||||
)
|
||||
|
||||
type PipelineSetting struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Customized bool `json:"customized,omitempty" yaml:"customized,omitempty"`
|
||||
Default string `json:"default,omitempty" yaml:"default,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
Value string `json:"value,omitempty" yaml:"value,omitempty"`
|
||||
}
|
||||
|
||||
type PipelineSettingCollection struct {
|
||||
types.Collection
|
||||
Data []PipelineSetting `json:"data,omitempty"`
|
||||
client *PipelineSettingClient
|
||||
}
|
||||
|
||||
type PipelineSettingClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type PipelineSettingOperations interface {
|
||||
List(opts *types.ListOpts) (*PipelineSettingCollection, error)
|
||||
Create(opts *PipelineSetting) (*PipelineSetting, error)
|
||||
Update(existing *PipelineSetting, updates interface{}) (*PipelineSetting, error)
|
||||
Replace(existing *PipelineSetting) (*PipelineSetting, error)
|
||||
ByID(id string) (*PipelineSetting, error)
|
||||
Delete(container *PipelineSetting) error
|
||||
}
|
||||
|
||||
func newPipelineSettingClient(apiClient *Client) *PipelineSettingClient {
|
||||
return &PipelineSettingClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) Create(container *PipelineSetting) (*PipelineSetting, error) {
|
||||
resp := &PipelineSetting{}
|
||||
err := c.apiClient.Ops.DoCreate(PipelineSettingType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) Update(existing *PipelineSetting, updates interface{}) (*PipelineSetting, error) {
|
||||
resp := &PipelineSetting{}
|
||||
err := c.apiClient.Ops.DoUpdate(PipelineSettingType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) Replace(obj *PipelineSetting) (*PipelineSetting, error) {
|
||||
resp := &PipelineSetting{}
|
||||
err := c.apiClient.Ops.DoReplace(PipelineSettingType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) List(opts *types.ListOpts) (*PipelineSettingCollection, error) {
|
||||
resp := &PipelineSettingCollection{}
|
||||
err := c.apiClient.Ops.DoList(PipelineSettingType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *PipelineSettingCollection) Next() (*PipelineSettingCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &PipelineSettingCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) ByID(id string) (*PipelineSetting, error) {
|
||||
resp := &PipelineSetting{}
|
||||
err := c.apiClient.Ops.DoByID(PipelineSettingType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *PipelineSettingClient) Delete(container *PipelineSetting) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(PipelineSettingType, &container.Resource)
|
||||
}
|
22
client/project/v3/zz_generated_pipeline_spec.go
Normal file
22
client/project/v3/zz_generated_pipeline_spec.go
Normal file
@ -0,0 +1,22 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PipelineSpecType = "pipelineSpec"
|
||||
PipelineSpecFieldDisplayName = "displayName"
|
||||
PipelineSpecFieldProjectID = "projectId"
|
||||
PipelineSpecFieldRepositoryURL = "repositoryUrl"
|
||||
PipelineSpecFieldSourceCodeCredentialID = "sourceCodeCredentialId"
|
||||
PipelineSpecFieldTriggerWebhookPr = "triggerWebhookPr"
|
||||
PipelineSpecFieldTriggerWebhookPush = "triggerWebhookPush"
|
||||
PipelineSpecFieldTriggerWebhookTag = "triggerWebhookTag"
|
||||
)
|
||||
|
||||
type PipelineSpec struct {
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
RepositoryURL string `json:"repositoryUrl,omitempty" yaml:"repositoryUrl,omitempty"`
|
||||
SourceCodeCredentialID string `json:"sourceCodeCredentialId,omitempty" yaml:"sourceCodeCredentialId,omitempty"`
|
||||
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
|
||||
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
|
||||
TriggerWebhookTag bool `json:"triggerWebhookTag,omitempty" yaml:"triggerWebhookTag,omitempty"`
|
||||
}
|
@ -4,11 +4,15 @@ const (
|
||||
PublishImageConfigType = "publishImageConfig"
|
||||
PublishImageConfigFieldBuildContext = "buildContext"
|
||||
PublishImageConfigFieldDockerfilePath = "dockerfilePath"
|
||||
PublishImageConfigFieldPushRemote = "pushRemote"
|
||||
PublishImageConfigFieldRegistry = "registry"
|
||||
PublishImageConfigFieldTag = "tag"
|
||||
)
|
||||
|
||||
type PublishImageConfig struct {
|
||||
BuildContext string `json:"buildContext,omitempty" yaml:"buildContext,omitempty"`
|
||||
DockerfilePath string `json:"dockerfilePath,omitempty" yaml:"dockerfilePath,omitempty"`
|
||||
PushRemote bool `json:"pushRemote,omitempty" yaml:"pushRemote,omitempty"`
|
||||
Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
|
||||
Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
|
||||
}
|
10
client/project/v3/zz_generated_push_pipeline_config_input.go
Normal file
10
client/project/v3/zz_generated_push_pipeline_config_input.go
Normal file
@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
PushPipelineConfigInputType = "pushPipelineConfigInput"
|
||||
PushPipelineConfigInputFieldConfigs = "configs"
|
||||
)
|
||||
|
||||
type PushPipelineConfigInput struct {
|
||||
Configs map[string]PipelineConfig `json:"configs,omitempty" yaml:"configs,omitempty"`
|
||||
}
|
12
client/project/v3/zz_generated_run_script_config.go
Normal file
12
client/project/v3/zz_generated_run_script_config.go
Normal file
@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
RunScriptConfigType = "runScriptConfig"
|
||||
RunScriptConfigFieldImage = "image"
|
||||
RunScriptConfigFieldShellScript = "shellScript"
|
||||
)
|
||||
|
||||
type RunScriptConfig struct {
|
||||
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||
ShellScript string `json:"shellScript,omitempty" yaml:"shellScript,omitempty"`
|
||||
}
|
8
client/project/v3/zz_generated_source_code_config.go
Normal file
8
client/project/v3/zz_generated_source_code_config.go
Normal file
@ -0,0 +1,8 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
SourceCodeConfigType = "sourceCodeConfig"
|
||||
)
|
||||
|
||||
type SourceCodeConfig struct {
|
||||
}
|
@ -9,19 +9,20 @@ const (
|
||||
SourceCodeCredentialFieldAccessToken = "accessToken"
|
||||
SourceCodeCredentialFieldAnnotations = "annotations"
|
||||
SourceCodeCredentialFieldAvatarURL = "avatarUrl"
|
||||
SourceCodeCredentialFieldClusterID = "clusterId"
|
||||
SourceCodeCredentialFieldCreated = "created"
|
||||
SourceCodeCredentialFieldCreatorID = "creatorId"
|
||||
SourceCodeCredentialFieldDisplayName = "displayName"
|
||||
SourceCodeCredentialFieldGitLoginName = "gitLoginName"
|
||||
SourceCodeCredentialFieldHTMLURL = "htmlUrl"
|
||||
SourceCodeCredentialFieldLabels = "labels"
|
||||
SourceCodeCredentialFieldLoginName = "loginName"
|
||||
SourceCodeCredentialFieldLogout = "logout"
|
||||
SourceCodeCredentialFieldName = "name"
|
||||
SourceCodeCredentialFieldOwnerReferences = "ownerReferences"
|
||||
SourceCodeCredentialFieldProjectID = "projectId"
|
||||
SourceCodeCredentialFieldRemoved = "removed"
|
||||
SourceCodeCredentialFieldSourceCodeType = "sourceCodeType"
|
||||
SourceCodeCredentialFieldState = "state"
|
||||
SourceCodeCredentialFieldStatus = "status"
|
||||
SourceCodeCredentialFieldTransitioning = "transitioning"
|
||||
SourceCodeCredentialFieldTransitioningMessage = "transitioningMessage"
|
||||
SourceCodeCredentialFieldUUID = "uuid"
|
||||
@ -30,26 +31,27 @@ const (
|
||||
|
||||
type SourceCodeCredential struct {
|
||||
types.Resource
|
||||
AccessToken string `json:"accessToken,omitempty" yaml:"accessToken,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
HTMLURL string `json:"htmlUrl,omitempty" yaml:"htmlUrl,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
LoginName string `json:"loginName,omitempty" yaml:"loginName,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SourceCodeType string `json:"sourceCodeType,omitempty" yaml:"sourceCodeType,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Status *SourceCodeCredentialStatus `json:"status,omitempty" yaml:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
UserID string `json:"userId,omitempty" yaml:"userId,omitempty"`
|
||||
AccessToken string `json:"accessToken,omitempty" yaml:"accessToken,omitempty"`
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
GitLoginName string `json:"gitLoginName,omitempty" yaml:"gitLoginName,omitempty"`
|
||||
HTMLURL string `json:"htmlUrl,omitempty" yaml:"htmlUrl,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
LoginName string `json:"loginName,omitempty" yaml:"loginName,omitempty"`
|
||||
Logout bool `json:"logout,omitempty" yaml:"logout,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SourceCodeType string `json:"sourceCodeType,omitempty" yaml:"sourceCodeType,omitempty"`
|
||||
State string `json:"state,omitempty" yaml:"state,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
UserID string `json:"userId,omitempty" yaml:"userId,omitempty"`
|
||||
}
|
||||
|
||||
type SourceCodeCredentialCollection struct {
|
||||
@ -70,6 +72,8 @@ type SourceCodeCredentialOperations interface {
|
||||
ByID(id string) (*SourceCodeCredential, error)
|
||||
Delete(container *SourceCodeCredential) error
|
||||
|
||||
ActionLogout(resource *SourceCodeCredential) error
|
||||
|
||||
ActionRefreshrepos(resource *SourceCodeCredential) error
|
||||
}
|
||||
|
||||
@ -124,6 +128,11 @@ func (c *SourceCodeCredentialClient) Delete(container *SourceCodeCredential) err
|
||||
return c.apiClient.Ops.DoResourceDelete(SourceCodeCredentialType, &container.Resource)
|
||||
}
|
||||
|
||||
func (c *SourceCodeCredentialClient) ActionLogout(resource *SourceCodeCredential) error {
|
||||
err := c.apiClient.Ops.DoAction(SourceCodeCredentialType, "logout", &resource.Resource, nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *SourceCodeCredentialClient) ActionRefreshrepos(resource *SourceCodeCredential) error {
|
||||
err := c.apiClient.Ops.DoAction(SourceCodeCredentialType, "refreshrepos", &resource.Resource, nil, nil)
|
||||
return err
|
@ -4,10 +4,11 @@ const (
|
||||
SourceCodeCredentialSpecType = "sourceCodeCredentialSpec"
|
||||
SourceCodeCredentialSpecFieldAccessToken = "accessToken"
|
||||
SourceCodeCredentialSpecFieldAvatarURL = "avatarUrl"
|
||||
SourceCodeCredentialSpecFieldClusterID = "clusterId"
|
||||
SourceCodeCredentialSpecFieldDisplayName = "displayName"
|
||||
SourceCodeCredentialSpecFieldGitLoginName = "gitLoginName"
|
||||
SourceCodeCredentialSpecFieldHTMLURL = "htmlUrl"
|
||||
SourceCodeCredentialSpecFieldLoginName = "loginName"
|
||||
SourceCodeCredentialSpecFieldProjectID = "projectId"
|
||||
SourceCodeCredentialSpecFieldSourceCodeType = "sourceCodeType"
|
||||
SourceCodeCredentialSpecFieldUserID = "userId"
|
||||
)
|
||||
@ -15,10 +16,11 @@ const (
|
||||
type SourceCodeCredentialSpec struct {
|
||||
AccessToken string `json:"accessToken,omitempty" yaml:"accessToken,omitempty"`
|
||||
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
GitLoginName string `json:"gitLoginName,omitempty" yaml:"gitLoginName,omitempty"`
|
||||
HTMLURL string `json:"htmlUrl,omitempty" yaml:"htmlUrl,omitempty"`
|
||||
LoginName string `json:"loginName,omitempty" yaml:"loginName,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
SourceCodeType string `json:"sourceCodeType,omitempty" yaml:"sourceCodeType,omitempty"`
|
||||
UserID string `json:"userId,omitempty" yaml:"userId,omitempty"`
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
SourceCodeCredentialStatusType = "sourceCodeCredentialStatus"
|
||||
SourceCodeCredentialStatusFieldLogout = "logout"
|
||||
)
|
||||
|
||||
type SourceCodeCredentialStatus struct {
|
||||
Logout bool `json:"logout,omitempty" yaml:"logout,omitempty"`
|
||||
}
|
103
client/project/v3/zz_generated_source_code_provider.go
Normal file
103
client/project/v3/zz_generated_source_code_provider.go
Normal file
@ -0,0 +1,103 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
SourceCodeProviderType = "sourceCodeProvider"
|
||||
SourceCodeProviderFieldAnnotations = "annotations"
|
||||
SourceCodeProviderFieldCreated = "created"
|
||||
SourceCodeProviderFieldCreatorID = "creatorId"
|
||||
SourceCodeProviderFieldLabels = "labels"
|
||||
SourceCodeProviderFieldName = "name"
|
||||
SourceCodeProviderFieldOwnerReferences = "ownerReferences"
|
||||
SourceCodeProviderFieldProjectID = "projectId"
|
||||
SourceCodeProviderFieldRemoved = "removed"
|
||||
SourceCodeProviderFieldType = "type"
|
||||
SourceCodeProviderFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type SourceCodeProvider struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type SourceCodeProviderCollection struct {
|
||||
types.Collection
|
||||
Data []SourceCodeProvider `json:"data,omitempty"`
|
||||
client *SourceCodeProviderClient
|
||||
}
|
||||
|
||||
type SourceCodeProviderClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type SourceCodeProviderOperations interface {
|
||||
List(opts *types.ListOpts) (*SourceCodeProviderCollection, error)
|
||||
Create(opts *SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
Update(existing *SourceCodeProvider, updates interface{}) (*SourceCodeProvider, error)
|
||||
Replace(existing *SourceCodeProvider) (*SourceCodeProvider, error)
|
||||
ByID(id string) (*SourceCodeProvider, error)
|
||||
Delete(container *SourceCodeProvider) error
|
||||
}
|
||||
|
||||
func newSourceCodeProviderClient(apiClient *Client) *SourceCodeProviderClient {
|
||||
return &SourceCodeProviderClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) Create(container *SourceCodeProvider) (*SourceCodeProvider, error) {
|
||||
resp := &SourceCodeProvider{}
|
||||
err := c.apiClient.Ops.DoCreate(SourceCodeProviderType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) Update(existing *SourceCodeProvider, updates interface{}) (*SourceCodeProvider, error) {
|
||||
resp := &SourceCodeProvider{}
|
||||
err := c.apiClient.Ops.DoUpdate(SourceCodeProviderType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) Replace(obj *SourceCodeProvider) (*SourceCodeProvider, error) {
|
||||
resp := &SourceCodeProvider{}
|
||||
err := c.apiClient.Ops.DoReplace(SourceCodeProviderType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) List(opts *types.ListOpts) (*SourceCodeProviderCollection, error) {
|
||||
resp := &SourceCodeProviderCollection{}
|
||||
err := c.apiClient.Ops.DoList(SourceCodeProviderType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *SourceCodeProviderCollection) Next() (*SourceCodeProviderCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &SourceCodeProviderCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) ByID(id string) (*SourceCodeProvider, error) {
|
||||
resp := &SourceCodeProvider{}
|
||||
err := c.apiClient.Ops.DoByID(SourceCodeProviderType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderClient) Delete(container *SourceCodeProvider) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(SourceCodeProviderType, &container.Resource)
|
||||
}
|
107
client/project/v3/zz_generated_source_code_provider_config.go
Normal file
107
client/project/v3/zz_generated_source_code_provider_config.go
Normal file
@ -0,0 +1,107 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
SourceCodeProviderConfigType = "sourceCodeProviderConfig"
|
||||
SourceCodeProviderConfigFieldAnnotations = "annotations"
|
||||
SourceCodeProviderConfigFieldCreated = "created"
|
||||
SourceCodeProviderConfigFieldCreatorID = "creatorId"
|
||||
SourceCodeProviderConfigFieldEnabled = "enabled"
|
||||
SourceCodeProviderConfigFieldLabels = "labels"
|
||||
SourceCodeProviderConfigFieldName = "name"
|
||||
SourceCodeProviderConfigFieldNamespaceId = "namespaceId"
|
||||
SourceCodeProviderConfigFieldOwnerReferences = "ownerReferences"
|
||||
SourceCodeProviderConfigFieldProjectID = "projectId"
|
||||
SourceCodeProviderConfigFieldRemoved = "removed"
|
||||
SourceCodeProviderConfigFieldType = "type"
|
||||
SourceCodeProviderConfigFieldUUID = "uuid"
|
||||
)
|
||||
|
||||
type SourceCodeProviderConfig struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
Type string `json:"type,omitempty" yaml:"type,omitempty"`
|
||||
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigCollection struct {
|
||||
types.Collection
|
||||
Data []SourceCodeProviderConfig `json:"data,omitempty"`
|
||||
client *SourceCodeProviderConfigClient
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type SourceCodeProviderConfigOperations interface {
|
||||
List(opts *types.ListOpts) (*SourceCodeProviderConfigCollection, error)
|
||||
Create(opts *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
Update(existing *SourceCodeProviderConfig, updates interface{}) (*SourceCodeProviderConfig, error)
|
||||
Replace(existing *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error)
|
||||
ByID(id string) (*SourceCodeProviderConfig, error)
|
||||
Delete(container *SourceCodeProviderConfig) error
|
||||
}
|
||||
|
||||
func newSourceCodeProviderConfigClient(apiClient *Client) *SourceCodeProviderConfigClient {
|
||||
return &SourceCodeProviderConfigClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) Create(container *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) {
|
||||
resp := &SourceCodeProviderConfig{}
|
||||
err := c.apiClient.Ops.DoCreate(SourceCodeProviderConfigType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) Update(existing *SourceCodeProviderConfig, updates interface{}) (*SourceCodeProviderConfig, error) {
|
||||
resp := &SourceCodeProviderConfig{}
|
||||
err := c.apiClient.Ops.DoUpdate(SourceCodeProviderConfigType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) Replace(obj *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) {
|
||||
resp := &SourceCodeProviderConfig{}
|
||||
err := c.apiClient.Ops.DoReplace(SourceCodeProviderConfigType, &obj.Resource, obj, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) List(opts *types.ListOpts) (*SourceCodeProviderConfigCollection, error) {
|
||||
resp := &SourceCodeProviderConfigCollection{}
|
||||
err := c.apiClient.Ops.DoList(SourceCodeProviderConfigType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *SourceCodeProviderConfigCollection) Next() (*SourceCodeProviderConfigCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &SourceCodeProviderConfigCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) ByID(id string) (*SourceCodeProviderConfig, error) {
|
||||
resp := &SourceCodeProviderConfig{}
|
||||
err := c.apiClient.Ops.DoByID(SourceCodeProviderConfigType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *SourceCodeProviderConfigClient) Delete(container *SourceCodeProviderConfig) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(SourceCodeProviderConfigType, &container.Resource)
|
||||
}
|
@ -7,7 +7,6 @@ import (
|
||||
const (
|
||||
SourceCodeRepositoryType = "sourceCodeRepository"
|
||||
SourceCodeRepositoryFieldAnnotations = "annotations"
|
||||
SourceCodeRepositoryFieldClusterID = "clusterId"
|
||||
SourceCodeRepositoryFieldCreated = "created"
|
||||
SourceCodeRepositoryFieldCreatorID = "creatorId"
|
||||
SourceCodeRepositoryFieldDefaultBranch = "defaultBranch"
|
||||
@ -16,6 +15,7 @@ const (
|
||||
SourceCodeRepositoryFieldName = "name"
|
||||
SourceCodeRepositoryFieldOwnerReferences = "ownerReferences"
|
||||
SourceCodeRepositoryFieldPermissions = "permissions"
|
||||
SourceCodeRepositoryFieldProjectID = "projectId"
|
||||
SourceCodeRepositoryFieldRemoved = "removed"
|
||||
SourceCodeRepositoryFieldSourceCodeCredentialID = "sourceCodeCredentialId"
|
||||
SourceCodeRepositoryFieldSourceCodeType = "sourceCodeType"
|
||||
@ -31,7 +31,6 @@ const (
|
||||
type SourceCodeRepository struct {
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
Created string `json:"created,omitempty" yaml:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
|
||||
DefaultBranch string `json:"defaultBranch,omitempty" yaml:"defaultBranch,omitempty"`
|
||||
@ -40,6 +39,7 @@ type SourceCodeRepository struct {
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
|
||||
Permissions *RepoPerm `json:"permissions,omitempty" yaml:"permissions,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
|
||||
SourceCodeCredentialID string `json:"sourceCodeCredentialId,omitempty" yaml:"sourceCodeCredentialId,omitempty"`
|
||||
SourceCodeType string `json:"sourceCodeType,omitempty" yaml:"sourceCodeType,omitempty"`
|
@ -2,10 +2,10 @@ package client
|
||||
|
||||
const (
|
||||
SourceCodeRepositorySpecType = "sourceCodeRepositorySpec"
|
||||
SourceCodeRepositorySpecFieldClusterID = "clusterId"
|
||||
SourceCodeRepositorySpecFieldDefaultBranch = "defaultBranch"
|
||||
SourceCodeRepositorySpecFieldLanguage = "language"
|
||||
SourceCodeRepositorySpecFieldPermissions = "permissions"
|
||||
SourceCodeRepositorySpecFieldProjectID = "projectId"
|
||||
SourceCodeRepositorySpecFieldSourceCodeCredentialID = "sourceCodeCredentialId"
|
||||
SourceCodeRepositorySpecFieldSourceCodeType = "sourceCodeType"
|
||||
SourceCodeRepositorySpecFieldURL = "url"
|
||||
@ -13,10 +13,10 @@ const (
|
||||
)
|
||||
|
||||
type SourceCodeRepositorySpec struct {
|
||||
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
|
||||
DefaultBranch string `json:"defaultBranch,omitempty" yaml:"defaultBranch,omitempty"`
|
||||
Language string `json:"language,omitempty" yaml:"language,omitempty"`
|
||||
Permissions *RepoPerm `json:"permissions,omitempty" yaml:"permissions,omitempty"`
|
||||
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
|
||||
SourceCodeCredentialID string `json:"sourceCodeCredentialId,omitempty" yaml:"sourceCodeCredentialId,omitempty"`
|
||||
SourceCodeType string `json:"sourceCodeType,omitempty" yaml:"sourceCodeType,omitempty"`
|
||||
URL string `json:"url,omitempty" yaml:"url,omitempty"`
|
14
client/project/v3/zz_generated_stage.go
Normal file
14
client/project/v3/zz_generated_stage.go
Normal file
@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StageType = "stage"
|
||||
StageFieldName = "name"
|
||||
StageFieldSteps = "steps"
|
||||
StageFieldWhen = "when"
|
||||
)
|
||||
|
||||
type Stage struct {
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"`
|
||||
When *Constraints `json:"when,omitempty" yaml:"when,omitempty"`
|
||||
}
|
24
client/project/v3/zz_generated_step.go
Normal file
24
client/project/v3/zz_generated_step.go
Normal file
@ -0,0 +1,24 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
StepType = "step"
|
||||
StepFieldApplyYamlConfig = "applyYamlConfig"
|
||||
StepFieldEnv = "env"
|
||||
StepFieldEnvFrom = "envFrom"
|
||||
StepFieldPrivileged = "privileged"
|
||||
StepFieldPublishImageConfig = "publishImageConfig"
|
||||
StepFieldRunScriptConfig = "runScriptConfig"
|
||||
StepFieldSourceCodeConfig = "sourceCodeConfig"
|
||||
StepFieldWhen = "when"
|
||||
)
|
||||
|
||||
type Step struct {
|
||||
ApplyYamlConfig *ApplyYamlConfig `json:"applyYamlConfig,omitempty" yaml:"applyYamlConfig,omitempty"`
|
||||
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
|
||||
EnvFrom []EnvFrom `json:"envFrom,omitempty" yaml:"envFrom,omitempty"`
|
||||
Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
|
||||
PublishImageConfig *PublishImageConfig `json:"publishImageConfig,omitempty" yaml:"publishImageConfig,omitempty"`
|
||||
RunScriptConfig *RunScriptConfig `json:"runScriptConfig,omitempty" yaml:"runScriptConfig,omitempty"`
|
||||
SourceCodeConfig *SourceCodeConfig `json:"sourceCodeConfig,omitempty" yaml:"sourceCodeConfig,omitempty"`
|
||||
When *Constraints `json:"when,omitempty" yaml:"when,omitempty"`
|
||||
}
|
@ -42,12 +42,6 @@ type Config struct {
|
||||
Notifiers map[string]managementClient.Notifier `json:"notifiers,omitempty" yaml:"notifiers,omitempty"`
|
||||
ClusterAlerts map[string]managementClient.ClusterAlert `json:"clusterAlerts,omitempty" yaml:"clusterAlerts,omitempty"`
|
||||
ProjectAlerts map[string]managementClient.ProjectAlert `json:"projectAlerts,omitempty" yaml:"projectAlerts,omitempty"`
|
||||
ClusterPipelines map[string]managementClient.ClusterPipeline `json:"clusterPipelines,omitempty" yaml:"clusterPipelines,omitempty"`
|
||||
SourceCodeCredentials map[string]managementClient.SourceCodeCredential `json:"sourceCodeCredentials,omitempty" yaml:"sourceCodeCredentials,omitempty"`
|
||||
Pipelines map[string]managementClient.Pipeline `json:"pipelines,omitempty" yaml:"pipelines,omitempty"`
|
||||
PipelineExecutions map[string]managementClient.PipelineExecution `json:"pipelineExecutions,omitempty" yaml:"pipelineExecutions,omitempty"`
|
||||
PipelineExecutionLogs map[string]managementClient.PipelineExecutionLog `json:"pipelineExecutionLogs,omitempty" yaml:"pipelineExecutionLogs,omitempty"`
|
||||
SourceCodeRepositorys map[string]managementClient.SourceCodeRepository `json:"sourceCodeRepositories,omitempty" yaml:"sourceCodeRepositories,omitempty"`
|
||||
ComposeConfigs map[string]managementClient.ComposeConfig `json:"composeConfigs,omitempty" yaml:"composeConfigs,omitempty"`
|
||||
ResourceQuotaTemplates map[string]managementClient.ResourceQuotaTemplate `json:"resourceQuotaTemplates,omitempty" yaml:"resourceQuotaTemplates,omitempty"`
|
||||
|
||||
@ -85,4 +79,11 @@ type Config struct {
|
||||
Workloads map[string]projectClient.Workload `json:"workloads,omitempty" yaml:"workloads,omitempty"`
|
||||
Apps map[string]projectClient.App `json:"apps,omitempty" yaml:"apps,omitempty"`
|
||||
AppRevisions map[string]projectClient.AppRevision `json:"appRevisions,omitempty" yaml:"appRevisions,omitempty"`
|
||||
SourceCodeProviders map[string]projectClient.SourceCodeProvider `json:"sourceCodeProviders,omitempty" yaml:"sourceCodeProviders,omitempty"`
|
||||
SourceCodeProviderConfigs map[string]projectClient.SourceCodeProviderConfig `json:"sourceCodeProviderConfigs,omitempty" yaml:"sourceCodeProviderConfigs,omitempty"`
|
||||
SourceCodeCredentials map[string]projectClient.SourceCodeCredential `json:"sourceCodeCredentials,omitempty" yaml:"sourceCodeCredentials,omitempty"`
|
||||
Pipelines map[string]projectClient.Pipeline `json:"pipelines,omitempty" yaml:"pipelines,omitempty"`
|
||||
PipelineExecutions map[string]projectClient.PipelineExecution `json:"pipelineExecutions,omitempty" yaml:"pipelineExecutions,omitempty"`
|
||||
PipelineSettings map[string]projectClient.PipelineSetting `json:"pipelineSettings,omitempty" yaml:"pipelineSettings,omitempty"`
|
||||
SourceCodeRepositorys map[string]projectClient.SourceCodeRepository `json:"sourceCodeRepositories,omitempty" yaml:"sourceCodeRepositories,omitempty"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user