diff --git a/pkg/generated/applyconfiguration/provisioning/v0alpha1/repository.go b/pkg/generated/applyconfiguration/provisioning/v0alpha1/repository.go index c84cc6a99b9..19a4e828600 100644 --- a/pkg/generated/applyconfiguration/provisioning/v0alpha1/repository.go +++ b/pkg/generated/applyconfiguration/provisioning/v0alpha1/repository.go @@ -34,7 +34,7 @@ func Repository(name, namespace string) *RepositoryApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithKind(value string) *RepositoryApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -42,7 +42,7 @@ func (b *RepositoryApplyConfiguration) WithKind(value string) *RepositoryApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithAPIVersion(value string) *RepositoryApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -51,7 +51,7 @@ func (b *RepositoryApplyConfiguration) WithAPIVersion(value string) *RepositoryA // If called multiple times, the Name field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithName(value string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -60,7 +60,7 @@ func (b *RepositoryApplyConfiguration) WithName(value string) *RepositoryApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithGenerateName(value string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -69,7 +69,7 @@ func (b *RepositoryApplyConfiguration) WithGenerateName(value string) *Repositor // If called multiple times, the Namespace field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithNamespace(value string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -78,7 +78,7 @@ func (b *RepositoryApplyConfiguration) WithNamespace(value string) *RepositoryAp // If called multiple times, the UID field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithUID(value types.UID) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -87,7 +87,7 @@ func (b *RepositoryApplyConfiguration) WithUID(value types.UID) *RepositoryApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithResourceVersion(value string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -96,7 +96,7 @@ func (b *RepositoryApplyConfiguration) WithResourceVersion(value string) *Reposi // If called multiple times, the Generation field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithGeneration(value int64) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -105,7 +105,7 @@ func (b *RepositoryApplyConfiguration) WithGeneration(value int64) *RepositoryAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -114,7 +114,7 @@ func (b *RepositoryApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -123,7 +123,7 @@ func (b *RepositoryApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RepositoryApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -133,11 +133,11 @@ func (b *RepositoryApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *RepositoryApplyConfiguration) WithLabels(entries map[string]string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -148,11 +148,11 @@ func (b *RepositoryApplyConfiguration) WithLabels(entries map[string]string) *Re // overwriting an existing map entries in Annotations field with the same key. func (b *RepositoryApplyConfiguration) WithAnnotations(entries map[string]string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -166,7 +166,7 @@ func (b *RepositoryApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -177,7 +177,7 @@ func (b *RepositoryApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *RepositoryApplyConfiguration) WithFinalizers(values ...string) *RepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -207,5 +207,5 @@ func (b *RepositoryApplyConfiguration) WithStatus(value *RepositoryStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *RepositoryApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/generated/applyconfiguration/provisioning/v0alpha1/syncstatus.go b/pkg/generated/applyconfiguration/provisioning/v0alpha1/syncstatus.go index f9d9f91b9e0..76129b21998 100644 --- a/pkg/generated/applyconfiguration/provisioning/v0alpha1/syncstatus.go +++ b/pkg/generated/applyconfiguration/provisioning/v0alpha1/syncstatus.go @@ -5,19 +5,19 @@ package v0alpha1 import ( - v0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" + provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" ) // SyncStatusApplyConfiguration represents a declarative configuration of the SyncStatus type for use // with apply. type SyncStatusApplyConfiguration struct { - State *v0alpha1.JobState `json:"state,omitempty"` - JobID *string `json:"job,omitempty"` - Started *int64 `json:"started,omitempty"` - Finished *int64 `json:"finished,omitempty"` - Scheduled *int64 `json:"scheduled,omitempty"` - Message []string `json:"message,omitempty"` - Hash *string `json:"hash,omitempty"` + State *provisioningv0alpha1.JobState `json:"state,omitempty"` + JobID *string `json:"job,omitempty"` + Started *int64 `json:"started,omitempty"` + Finished *int64 `json:"finished,omitempty"` + Scheduled *int64 `json:"scheduled,omitempty"` + Message []string `json:"message,omitempty"` + Hash *string `json:"hash,omitempty"` } // SyncStatusApplyConfiguration constructs a declarative configuration of the SyncStatus type for use with @@ -29,7 +29,7 @@ func SyncStatus() *SyncStatusApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *SyncStatusApplyConfiguration) WithState(value v0alpha1.JobState) *SyncStatusApplyConfiguration { +func (b *SyncStatusApplyConfiguration) WithState(value provisioningv0alpha1.JobState) *SyncStatusApplyConfiguration { b.State = &value return b } diff --git a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_provisioning_client.go b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_provisioning_client.go index 026b4d8947d..eb97df6de39 100644 --- a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_provisioning_client.go +++ b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_provisioning_client.go @@ -15,7 +15,7 @@ type FakeProvisioningV0alpha1 struct { } func (c *FakeProvisioningV0alpha1) Repositories(namespace string) v0alpha1.RepositoryInterface { - return &FakeRepositories{c, namespace} + return newFakeRepositories(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_repository.go b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_repository.go index 006fa440a66..3991d3c4ea8 100644 --- a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_repository.go +++ b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/fake/fake_repository.go @@ -5,179 +5,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" provisioningv0alpha1 "github.com/grafana/grafana/pkg/generated/applyconfiguration/provisioning/v0alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedprovisioningv0alpha1 "github.com/grafana/grafana/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeRepositories implements RepositoryInterface -type FakeRepositories struct { +// fakeRepositories implements RepositoryInterface +type fakeRepositories struct { + *gentype.FakeClientWithListAndApply[*v0alpha1.Repository, *v0alpha1.RepositoryList, *provisioningv0alpha1.RepositoryApplyConfiguration] Fake *FakeProvisioningV0alpha1 - ns string } -var repositoriesResource = v0alpha1.SchemeGroupVersion.WithResource("repositories") - -var repositoriesKind = v0alpha1.SchemeGroupVersion.WithKind("Repository") - -// Get takes name of the repository, and returns the corresponding repository object, and an error if there is any. -func (c *FakeRepositories) Get(ctx context.Context, name string, options v1.GetOptions) (result *v0alpha1.Repository, err error) { - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(repositoriesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRepositories(fake *FakeProvisioningV0alpha1, namespace string) typedprovisioningv0alpha1.RepositoryInterface { + return &fakeRepositories{ + gentype.NewFakeClientWithListAndApply[*v0alpha1.Repository, *v0alpha1.RepositoryList, *provisioningv0alpha1.RepositoryApplyConfiguration]( + fake.Fake, + namespace, + v0alpha1.SchemeGroupVersion.WithResource("repositories"), + v0alpha1.SchemeGroupVersion.WithKind("Repository"), + func() *v0alpha1.Repository { return &v0alpha1.Repository{} }, + func() *v0alpha1.RepositoryList { return &v0alpha1.RepositoryList{} }, + func(dst, src *v0alpha1.RepositoryList) { dst.ListMeta = src.ListMeta }, + func(list *v0alpha1.RepositoryList) []*v0alpha1.Repository { return gentype.ToPointerSlice(list.Items) }, + func(list *v0alpha1.RepositoryList, items []*v0alpha1.Repository) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v0alpha1.Repository), err -} - -// List takes label and field selectors, and returns the list of Repositories that match those selectors. -func (c *FakeRepositories) List(ctx context.Context, opts v1.ListOptions) (result *v0alpha1.RepositoryList, err error) { - emptyResult := &v0alpha1.RepositoryList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(repositoriesResource, repositoriesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v0alpha1.RepositoryList{ListMeta: obj.(*v0alpha1.RepositoryList).ListMeta} - for _, item := range obj.(*v0alpha1.RepositoryList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested repositories. -func (c *FakeRepositories) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(repositoriesResource, c.ns, opts)) - -} - -// Create takes the representation of a repository and creates it. Returns the server's representation of the repository, and an error, if there is any. -func (c *FakeRepositories) Create(ctx context.Context, repository *v0alpha1.Repository, opts v1.CreateOptions) (result *v0alpha1.Repository, err error) { - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(repositoriesResource, c.ns, repository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err -} - -// Update takes the representation of a repository and updates it. Returns the server's representation of the repository, and an error, if there is any. -func (c *FakeRepositories) Update(ctx context.Context, repository *v0alpha1.Repository, opts v1.UpdateOptions) (result *v0alpha1.Repository, err error) { - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(repositoriesResource, c.ns, repository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeRepositories) UpdateStatus(ctx context.Context, repository *v0alpha1.Repository, opts v1.UpdateOptions) (result *v0alpha1.Repository, err error) { - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(repositoriesResource, "status", c.ns, repository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err -} - -// Delete takes name of the repository and deletes it. Returns an error if one occurs. -func (c *FakeRepositories) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(repositoriesResource, c.ns, name, opts), &v0alpha1.Repository{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRepositories) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(repositoriesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v0alpha1.RepositoryList{}) - return err -} - -// Patch applies the patch and returns the patched repository. -func (c *FakeRepositories) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v0alpha1.Repository, err error) { - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(repositoriesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied repository. -func (c *FakeRepositories) Apply(ctx context.Context, repository *provisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.Repository, err error) { - if repository == nil { - return nil, fmt.Errorf("repository provided to Apply must not be nil") - } - data, err := json.Marshal(repository) - if err != nil { - return nil, err - } - name := repository.Name - if name == nil { - return nil, fmt.Errorf("repository.Name must be provided to Apply") - } - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(repositoriesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeRepositories) ApplyStatus(ctx context.Context, repository *provisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.Repository, err error) { - if repository == nil { - return nil, fmt.Errorf("repository provided to Apply must not be nil") - } - data, err := json.Marshal(repository) - if err != nil { - return nil, err - } - name := repository.Name - if name == nil { - return nil, fmt.Errorf("repository.Name must be provided to Apply") - } - emptyResult := &v0alpha1.Repository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(repositoriesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v0alpha1.Repository), err } diff --git a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/provisioning_client.go b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/provisioning_client.go index ef932d139e1..f74abfaed38 100644 --- a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/provisioning_client.go +++ b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/provisioning_client.go @@ -5,10 +5,10 @@ package v0alpha1 import ( - "net/http" + http "net/http" - v0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" - "github.com/grafana/grafana/pkg/generated/clientset/versioned/scheme" + provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" + scheme "github.com/grafana/grafana/pkg/generated/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -71,10 +71,10 @@ func New(c rest.Interface) *ProvisioningV0alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v0alpha1.SchemeGroupVersion + gv := provisioningv0alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/repository.go b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/repository.go index 472f8072900..9425083857b 100644 --- a/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/repository.go +++ b/pkg/generated/clientset/versioned/typed/provisioning/v0alpha1/repository.go @@ -5,10 +5,10 @@ package v0alpha1 import ( - "context" + context "context" - v0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" - provisioningv0alpha1 "github.com/grafana/grafana/pkg/generated/applyconfiguration/provisioning/v0alpha1" + provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" + applyconfigurationprovisioningv0alpha1 "github.com/grafana/grafana/pkg/generated/applyconfiguration/provisioning/v0alpha1" scheme "github.com/grafana/grafana/pkg/generated/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,36 +24,37 @@ type RepositoriesGetter interface { // RepositoryInterface has methods to work with Repository resources. type RepositoryInterface interface { - Create(ctx context.Context, repository *v0alpha1.Repository, opts v1.CreateOptions) (*v0alpha1.Repository, error) - Update(ctx context.Context, repository *v0alpha1.Repository, opts v1.UpdateOptions) (*v0alpha1.Repository, error) + Create(ctx context.Context, repository *provisioningv0alpha1.Repository, opts v1.CreateOptions) (*provisioningv0alpha1.Repository, error) + Update(ctx context.Context, repository *provisioningv0alpha1.Repository, opts v1.UpdateOptions) (*provisioningv0alpha1.Repository, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, repository *v0alpha1.Repository, opts v1.UpdateOptions) (*v0alpha1.Repository, error) + UpdateStatus(ctx context.Context, repository *provisioningv0alpha1.Repository, opts v1.UpdateOptions) (*provisioningv0alpha1.Repository, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v0alpha1.Repository, error) - List(ctx context.Context, opts v1.ListOptions) (*v0alpha1.RepositoryList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*provisioningv0alpha1.Repository, error) + List(ctx context.Context, opts v1.ListOptions) (*provisioningv0alpha1.RepositoryList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v0alpha1.Repository, err error) - Apply(ctx context.Context, repository *provisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.Repository, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *provisioningv0alpha1.Repository, err error) + Apply(ctx context.Context, repository *applyconfigurationprovisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *provisioningv0alpha1.Repository, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, repository *provisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.Repository, err error) + ApplyStatus(ctx context.Context, repository *applyconfigurationprovisioningv0alpha1.RepositoryApplyConfiguration, opts v1.ApplyOptions) (result *provisioningv0alpha1.Repository, err error) RepositoryExpansion } // repositories implements RepositoryInterface type repositories struct { - *gentype.ClientWithListAndApply[*v0alpha1.Repository, *v0alpha1.RepositoryList, *provisioningv0alpha1.RepositoryApplyConfiguration] + *gentype.ClientWithListAndApply[*provisioningv0alpha1.Repository, *provisioningv0alpha1.RepositoryList, *applyconfigurationprovisioningv0alpha1.RepositoryApplyConfiguration] } // newRepositories returns a Repositories func newRepositories(c *ProvisioningV0alpha1Client, namespace string) *repositories { return &repositories{ - gentype.NewClientWithListAndApply[*v0alpha1.Repository, *v0alpha1.RepositoryList, *provisioningv0alpha1.RepositoryApplyConfiguration]( + gentype.NewClientWithListAndApply[*provisioningv0alpha1.Repository, *provisioningv0alpha1.RepositoryList, *applyconfigurationprovisioningv0alpha1.RepositoryApplyConfiguration]( "repositories", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v0alpha1.Repository { return &v0alpha1.Repository{} }, - func() *v0alpha1.RepositoryList { return &v0alpha1.RepositoryList{} }), + func() *provisioningv0alpha1.Repository { return &provisioningv0alpha1.Repository{} }, + func() *provisioningv0alpha1.RepositoryList { return &provisioningv0alpha1.RepositoryList{} }, + ), } } diff --git a/pkg/generated/informers/externalversions/provisioning/v0alpha1/repository.go b/pkg/generated/informers/externalversions/provisioning/v0alpha1/repository.go index 25be9d0a95a..33396626e33 100644 --- a/pkg/generated/informers/externalversions/provisioning/v0alpha1/repository.go +++ b/pkg/generated/informers/externalversions/provisioning/v0alpha1/repository.go @@ -5,13 +5,13 @@ package v0alpha1 import ( - "context" + context "context" time "time" - provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" + apisprovisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" versioned "github.com/grafana/grafana/pkg/generated/clientset/versioned" internalinterfaces "github.com/grafana/grafana/pkg/generated/informers/externalversions/internalinterfaces" - v0alpha1 "github.com/grafana/grafana/pkg/generated/listers/provisioning/v0alpha1" + provisioningv0alpha1 "github.com/grafana/grafana/pkg/generated/listers/provisioning/v0alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -22,7 +22,7 @@ import ( // Repositories. type RepositoryInformer interface { Informer() cache.SharedIndexInformer - Lister() v0alpha1.RepositoryLister + Lister() provisioningv0alpha1.RepositoryLister } type repositoryInformer struct { @@ -57,7 +57,7 @@ func NewFilteredRepositoryInformer(client versioned.Interface, namespace string, return client.ProvisioningV0alpha1().Repositories(namespace).Watch(context.TODO(), options) }, }, - &provisioningv0alpha1.Repository{}, + &apisprovisioningv0alpha1.Repository{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *repositoryInformer) defaultInformer(client versioned.Interface, resyncP } func (f *repositoryInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&provisioningv0alpha1.Repository{}, f.defaultInformer) + return f.factory.InformerFor(&apisprovisioningv0alpha1.Repository{}, f.defaultInformer) } -func (f *repositoryInformer) Lister() v0alpha1.RepositoryLister { - return v0alpha1.NewRepositoryLister(f.Informer().GetIndexer()) +func (f *repositoryInformer) Lister() provisioningv0alpha1.RepositoryLister { + return provisioningv0alpha1.NewRepositoryLister(f.Informer().GetIndexer()) } diff --git a/pkg/generated/listers/provisioning/v0alpha1/repository.go b/pkg/generated/listers/provisioning/v0alpha1/repository.go index 10395c928f6..969cb034e88 100644 --- a/pkg/generated/listers/provisioning/v0alpha1/repository.go +++ b/pkg/generated/listers/provisioning/v0alpha1/repository.go @@ -5,10 +5,10 @@ package v0alpha1 import ( - v0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RepositoryLister helps list Repositories. @@ -16,7 +16,7 @@ import ( type RepositoryLister interface { // List lists all Repositories in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v0alpha1.Repository, err error) + List(selector labels.Selector) (ret []*provisioningv0alpha1.Repository, err error) // Repositories returns an object that can list and get Repositories. Repositories(namespace string) RepositoryNamespaceLister RepositoryListerExpansion @@ -24,17 +24,17 @@ type RepositoryLister interface { // repositoryLister implements the RepositoryLister interface. type repositoryLister struct { - listers.ResourceIndexer[*v0alpha1.Repository] + listers.ResourceIndexer[*provisioningv0alpha1.Repository] } // NewRepositoryLister returns a new RepositoryLister. func NewRepositoryLister(indexer cache.Indexer) RepositoryLister { - return &repositoryLister{listers.New[*v0alpha1.Repository](indexer, v0alpha1.Resource("repository"))} + return &repositoryLister{listers.New[*provisioningv0alpha1.Repository](indexer, provisioningv0alpha1.Resource("repository"))} } // Repositories returns an object that can list and get Repositories. func (s *repositoryLister) Repositories(namespace string) RepositoryNamespaceLister { - return repositoryNamespaceLister{listers.NewNamespaced[*v0alpha1.Repository](s.ResourceIndexer, namespace)} + return repositoryNamespaceLister{listers.NewNamespaced[*provisioningv0alpha1.Repository](s.ResourceIndexer, namespace)} } // RepositoryNamespaceLister helps list and get Repositories. @@ -42,15 +42,15 @@ func (s *repositoryLister) Repositories(namespace string) RepositoryNamespaceLis type RepositoryNamespaceLister interface { // List lists all Repositories in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v0alpha1.Repository, err error) + List(selector labels.Selector) (ret []*provisioningv0alpha1.Repository, err error) // Get retrieves the Repository from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v0alpha1.Repository, error) + Get(name string) (*provisioningv0alpha1.Repository, error) RepositoryNamespaceListerExpansion } // repositoryNamespaceLister implements the RepositoryNamespaceLister // interface. type repositoryNamespaceLister struct { - listers.ResourceIndexer[*v0alpha1.Repository] + listers.ResourceIndexer[*provisioningv0alpha1.Repository] }