POC/Provisioning: Replace EditingOptions with a readOnly flag (#99859)
This commit is contained in:
1 parent
d52dd7d660
commit
f5ef63bcec
16 files changed
+64
-207
No files matched your search
@@ -1,43 +0,0 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// EditingOptionsApplyConfiguration represents a declarative configuration of the EditingOptions type for use
|
||||
// with apply.
|
||||
type EditingOptionsApplyConfiguration struct {
|
||||
Create *bool `json:"create,omitempty"`
|
||||
Update *bool `json:"update,omitempty"`
|
||||
Delete *bool `json:"delete,omitempty"`
|
||||
}
|
||||
|
||||
// EditingOptionsApplyConfiguration constructs a declarative configuration of the EditingOptions type for use with
|
||||
// apply.
|
||||
func EditingOptions() *EditingOptionsApplyConfiguration {
|
||||
return &EditingOptionsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCreate sets the Create 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 Create field is set to the value of the last call.
|
||||
func (b *EditingOptionsApplyConfiguration) WithCreate(value bool) *EditingOptionsApplyConfiguration {
|
||||
b.Create = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUpdate sets the Update 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 Update field is set to the value of the last call.
|
||||
func (b *EditingOptionsApplyConfiguration) WithUpdate(value bool) *EditingOptionsApplyConfiguration {
|
||||
b.Update = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDelete sets the Delete 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 Delete field is set to the value of the last call.
|
||||
func (b *EditingOptionsApplyConfiguration) WithDelete(value bool) *EditingOptionsApplyConfiguration {
|
||||
b.Delete = &value
|
||||
return b
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
type RepositorySpecApplyConfiguration struct {
|
||||
Title *string `json:"title,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Editing *EditingOptionsApplyConfiguration `json:"editing,omitempty"`
|
||||
ReadOnly *bool `json:"readOnly,omitempty"`
|
||||
Sync *SyncOptionsApplyConfiguration `json:"sync,omitempty"`
|
||||
Type *provisioningv0alpha1.RepositoryType `json:"type,omitempty"`
|
||||
Local *LocalRepositoryConfigApplyConfiguration `json:"local,omitempty"`
|
||||
@@ -43,11 +43,11 @@ func (b *RepositorySpecApplyConfiguration) WithDescription(value string) *Reposi
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEditing sets the Editing field in the declarative configuration to the given value
|
||||
// WithReadOnly sets the ReadOnly 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 Editing field is set to the value of the last call.
|
||||
func (b *RepositorySpecApplyConfiguration) WithEditing(value *EditingOptionsApplyConfiguration) *RepositorySpecApplyConfiguration {
|
||||
b.Editing = value
|
||||
// If called multiple times, the ReadOnly field is set to the value of the last call.
|
||||
func (b *RepositorySpecApplyConfiguration) WithReadOnly(value bool) *RepositorySpecApplyConfiguration {
|
||||
b.ReadOnly = &value
|
||||
return b
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import (
|
||||
func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
switch kind {
|
||||
// Group=provisioning.grafana.app, Version=v0alpha1
|
||||
case v0alpha1.SchemeGroupVersion.WithKind("EditingOptions"):
|
||||
return &provisioningv0alpha1.EditingOptionsApplyConfiguration{}
|
||||
case v0alpha1.SchemeGroupVersion.WithKind("GitHubRepositoryConfig"):
|
||||
return &provisioningv0alpha1.GitHubRepositoryConfigApplyConfiguration{}
|
||||
case v0alpha1.SchemeGroupVersion.WithKind("HealthStatus"):
|
||||
|
||||
Reference in new issue
Block a user