Dashboards: Add apiVersion to dashboard table (#100845)
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +groupName=dashboard.grafana.app
|
||||
|
||||
package dashboard // import "github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
@@ -0,0 +1,125 @@
|
||||
package conversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/conversion"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/migration"
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/migration/schemaversion"
|
||||
dashboardV0 "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1"
|
||||
dashboardV1 "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1"
|
||||
dashboardV2 "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1"
|
||||
)
|
||||
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddConversionFunc((*dashboardV0.Dashboard)(nil), (*dashboardV1.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V0_to_V1(a.(*dashboardV0.Dashboard), b.(*dashboardV1.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboardV0.Dashboard)(nil), (*dashboardV2.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V0_to_V2(a.(*dashboardV0.Dashboard), b.(*dashboardV2.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboardV1.Dashboard)(nil), (*dashboardV0.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V1_to_V0(a.(*dashboardV1.Dashboard), b.(*dashboardV0.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboardV1.Dashboard)(nil), (*dashboardV2.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V1_to_V2(a.(*dashboardV1.Dashboard), b.(*dashboardV2.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboardV2.Dashboard)(nil), (*dashboardV0.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V2_to_V0(a.(*dashboardV2.Dashboard), b.(*dashboardV0.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboardV2.Dashboard)(nil), (*dashboardV1.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_V2_to_V1(a.(*dashboardV2.Dashboard), b.(*dashboardV1.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V0_to_V1(in *dashboardV0.Dashboard, out *dashboardV1.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV1.DashboardStatus{
|
||||
ConversionStatus: &dashboardV1.ConversionStatus{
|
||||
StoredVersion: dashboardV0.VERSION,
|
||||
},
|
||||
}
|
||||
err := migration.Migrate(out.Spec.Object, schemaversion.LATEST_VERSION)
|
||||
if err != nil {
|
||||
out.Status.ConversionStatus.Failed = true
|
||||
out.Status.ConversionStatus.Error = err.Error()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V0_to_V2(in *dashboardV0.Dashboard, out *dashboardV2.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV2.DashboardStatus{
|
||||
ConversionStatus: &dashboardV2.ConversionStatus{
|
||||
StoredVersion: dashboardV0.VERSION,
|
||||
Failed: true,
|
||||
Error: "backend conversion not yet implemented",
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V1_to_V0(in *dashboardV1.Dashboard, out *dashboardV0.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV0.DashboardStatus{
|
||||
ConversionStatus: &dashboardV0.ConversionStatus{
|
||||
StoredVersion: dashboardV1.VERSION,
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V1_to_V2(in *dashboardV1.Dashboard, out *dashboardV2.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV2.DashboardStatus{
|
||||
ConversionStatus: &dashboardV2.ConversionStatus{
|
||||
StoredVersion: dashboardV1.VERSION,
|
||||
Failed: true,
|
||||
Error: "backend conversion not yet implemented",
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V2_to_V0(in *dashboardV2.Dashboard, out *dashboardV0.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV0.DashboardStatus{
|
||||
ConversionStatus: &dashboardV0.ConversionStatus{
|
||||
StoredVersion: dashboardV2.VERSION,
|
||||
Failed: true,
|
||||
Error: "backend conversion not yet implemented",
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_V2_to_V1(in *dashboardV2.Dashboard, out *dashboardV1.Dashboard, scope conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Spec = in.Spec
|
||||
out.Status = &dashboardV1.DashboardStatus{
|
||||
ConversionStatus: &dashboardV1.ConversionStatus{
|
||||
StoredVersion: dashboardV2.VERSION,
|
||||
Failed: true,
|
||||
Error: "backend conversion not yet implemented",
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package conversion
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
dashboardV0 "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1"
|
||||
dashboardV1 "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1"
|
||||
dashboardV2 "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1"
|
||||
)
|
||||
|
||||
func TestConversionMatrixExist(t *testing.T) {
|
||||
versions := []v1.Object{
|
||||
&dashboardV0.Dashboard{},
|
||||
&dashboardV1.Dashboard{},
|
||||
&dashboardV2.Dashboard{},
|
||||
}
|
||||
|
||||
scheme := runtime.NewScheme()
|
||||
err := RegisterConversions(scheme)
|
||||
require.NoError(t, err)
|
||||
|
||||
for idx, in := range versions {
|
||||
kind := fmt.Sprintf("%T", in)[1:]
|
||||
t.Run(kind, func(t *testing.T) {
|
||||
for i, out := range versions {
|
||||
if i == idx {
|
||||
continue // skip the same version
|
||||
}
|
||||
err = scheme.Convert(in, out, nil)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
GROUP = "dashboard.grafana.app"
|
||||
VERSION = runtime.APIVersionInternal
|
||||
APIVERSION = GROUP + "/" + VERSION
|
||||
|
||||
// Resource constants
|
||||
DASHBOARD_RESOURCE = "dashboards"
|
||||
LIBRARY_PANEL_RESOURCE = "librarypanels"
|
||||
)
|
||||
|
||||
var DashboardResourceInfo = utils.NewResourceInfo(GROUP, VERSION,
|
||||
DASHBOARD_RESOURCE, "dashboard", "Dashboard",
|
||||
func() runtime.Object { return &Dashboard{} },
|
||||
func() runtime.Object { return &DashboardList{} },
|
||||
utils.TableColumns{
|
||||
Definition: []metav1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name"},
|
||||
{Name: "Title", Type: "string", Format: "string", Description: "The dashboard name"},
|
||||
{Name: "Created At", Type: "date"},
|
||||
},
|
||||
Reader: func(obj any) ([]interface{}, error) {
|
||||
dash, ok := obj.(*Dashboard)
|
||||
if ok {
|
||||
if dash != nil {
|
||||
return []interface{}{
|
||||
dash.Name,
|
||||
dash.Spec.GetNestedString("title"),
|
||||
dash.CreationTimestamp.UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("expected dashboard")
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
var LibraryPanelResourceInfo = utils.NewResourceInfo(GROUP, VERSION,
|
||||
LIBRARY_PANEL_RESOURCE, "librarypanel", "LibraryPanel",
|
||||
func() runtime.Object { return &LibraryPanel{} },
|
||||
func() runtime.Object { return &LibraryPanelList{} },
|
||||
utils.TableColumns{
|
||||
Definition: []metav1.TableColumnDefinition{
|
||||
{Name: "Name", Type: "string", Format: "name"},
|
||||
{Name: "Title", Type: "string", Description: "The dashboard name"},
|
||||
{Name: "Type", Type: "string", Description: "the panel type"},
|
||||
{Name: "Created At", Type: "date"},
|
||||
},
|
||||
Reader: func(obj any) ([]interface{}, error) {
|
||||
dash, ok := obj.(*LibraryPanel)
|
||||
if ok {
|
||||
if dash != nil {
|
||||
return []interface{}{
|
||||
dash.Name,
|
||||
dash.Spec.Title,
|
||||
dash.Spec.Type,
|
||||
dash.CreationTimestamp.UTC().Format(time.RFC3339),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("expected library panel")
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
schemaGroupVersion = schema.GroupVersion{Group: GROUP, Version: VERSION}
|
||||
)
|
||||
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(schemaGroupVersion,
|
||||
&Dashboard{},
|
||||
&DashboardList{},
|
||||
&DashboardWithAccessInfo{},
|
||||
&DashboardVersionList{},
|
||||
&VersionsQueryOptions{},
|
||||
&LibraryPanel{},
|
||||
&LibraryPanelList{},
|
||||
&metav1.PartialObjectMetadata{},
|
||||
&metav1.PartialObjectMetadataList{},
|
||||
)
|
||||
return nil
|
||||
}
|
||||
@@ -1,144 +1,5 @@
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
data "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
||||
common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Dashboard struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The dashboard body (unstructured for now)
|
||||
Spec DashboardSpec `json:"spec"`
|
||||
}
|
||||
|
||||
type DashboardSpec struct {
|
||||
Title string `json:"title"`
|
||||
common.Unstructured `json:",inline"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type DashboardList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []Dashboard `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type DashboardVersionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []DashboardVersionInfo `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
type DashboardVersionInfo struct {
|
||||
// The internal ID for this version (will be replaced with resourceVersion)
|
||||
Version int `json:"version"`
|
||||
|
||||
// If the dashboard came from a previous version, it is set here
|
||||
ParentVersion int `json:"parentVersion,omitempty"`
|
||||
|
||||
// The creation timestamp for this version
|
||||
Created int64 `json:"created"`
|
||||
|
||||
// The user who created this version
|
||||
CreatedBy string `json:"createdBy,omitempty"`
|
||||
|
||||
// Message passed while saving the version
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:conversion-gen:explicit-from=net/url.Values
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type VersionsQueryOptions struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Path is the URL path
|
||||
// +optional
|
||||
Path string `json:"path,omitempty"`
|
||||
|
||||
// +optional
|
||||
Version int64 `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type LibraryPanel struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Panel properties
|
||||
Spec LibraryPanelSpec `json:"spec"`
|
||||
|
||||
// Status will show errors
|
||||
Status *LibraryPanelStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type LibraryPanelList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []LibraryPanel `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
type LibraryPanelSpec struct {
|
||||
// The panel type
|
||||
Type string `json:"type"`
|
||||
|
||||
// The panel type
|
||||
PluginVersion string `json:"pluginVersion,omitempty"`
|
||||
|
||||
// The panel title
|
||||
Title string `json:"title,omitempty"`
|
||||
|
||||
// Library panel description
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// The options schema depends on the panel type
|
||||
Options common.Unstructured `json:"options"`
|
||||
|
||||
// The fieldConfig schema depends on the panel type
|
||||
FieldConfig common.Unstructured `json:"fieldConfig"`
|
||||
|
||||
// The default datasource type
|
||||
Datasource *data.DataSourceRef `json:"datasource,omitempty"`
|
||||
|
||||
// The datasource queries
|
||||
// +listType=set
|
||||
Targets []data.DataQuery `json:"targets,omitempty"`
|
||||
}
|
||||
|
||||
type LibraryPanelStatus struct {
|
||||
// Translation warnings (mostly things that were in SQL columns but not found in the saved body)
|
||||
Warnings []string `json:"warnings,omitempty"`
|
||||
|
||||
// The properties previously stored in SQL that are not included in this model
|
||||
Missing common.Unstructured `json:"missing,omitempty"`
|
||||
}
|
||||
|
||||
// This is like the legacy DTO where access and metadata are all returned in a single call
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type DashboardWithAccessInfo struct {
|
||||
Dashboard `json:",inline"`
|
||||
|
||||
Access DashboardAccess `json:"access"`
|
||||
}
|
||||
|
||||
// Information about how the requesting user can use a given dashboard
|
||||
type DashboardAccess struct {
|
||||
// Metadata fields
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
klog "k8s.io/klog/v2"
|
||||
|
||||
common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
dashboard "github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/migration"
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/migration/schemaversion"
|
||||
)
|
||||
|
||||
func Convert_dashboard_DashboardSpec_To_v0alpha1_Unstructured(in *dashboard.DashboardSpec, out *common.Unstructured, s conversion.Scope) error {
|
||||
*out = in.Unstructured
|
||||
if in.Title != "" {
|
||||
out.Object["title"] = in.Title
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v0alpha1_Unstructured_To_dashboard_DashboardSpec(in *common.Unstructured, out *dashboard.DashboardSpec, s conversion.Scope) error {
|
||||
out.Unstructured = *in
|
||||
err := migration.Migrate(out.Unstructured.Object, schemaversion.LATEST_VERSION)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t, ok := out.Object["title"].(string)
|
||||
if !ok {
|
||||
klog.V(5).Infof("unstructured dashboard title field is not a string %v", t)
|
||||
return nil // skip setting the title if it's not a string in the unstructured object
|
||||
}
|
||||
out.Title = t
|
||||
return nil
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
)
|
||||
|
||||
func TestConvertDashboardVersions(t *testing.T) {
|
||||
dashboardV0Spec := []byte(`{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations \u0026 Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": true,
|
||||
"description": "",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 11711,
|
||||
"links": [],
|
||||
"panels": [],
|
||||
"preload": false,
|
||||
"schemaVersion": 39,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "utc",
|
||||
"title": "New",
|
||||
"uid": "be3ymutzclgqod",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}`)
|
||||
object := common.Unstructured{}
|
||||
err := json.Unmarshal(dashboardV0Spec, &object.Object)
|
||||
require.NoError(t, err)
|
||||
in := dashboard.DashboardSpec{Title: "New dashboard", Unstructured: object}
|
||||
result := common.Unstructured{}
|
||||
err = Convert_dashboard_DashboardSpec_To_v0alpha1_Unstructured(&in, &result, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
// now convert back & ensure it is the same
|
||||
object2 := *(result.DeepCopy())
|
||||
result2 := dashboard.DashboardSpec{}
|
||||
err = Convert_v0alpha1_Unstructured_To_dashboard_DashboardSpec(&object2, &result2, nil)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, result2.Title, "New dashboard")
|
||||
require.Equal(t, result2.Unstructured.Object["schemaVersion"], 41, "schemaVersion migration not applied.")
|
||||
require.Equal(t, result2.Unstructured.Object["refresh"], "", "schemaVersion migration not applied. refresh should be an empty string")
|
||||
}
|
||||
@@ -14,8 +14,11 @@ import (
|
||||
const (
|
||||
GROUP = "dashboard.grafana.app"
|
||||
VERSION = "v0alpha1"
|
||||
RESOURCE = "dashboards"
|
||||
APIVERSION = GROUP + "/" + VERSION
|
||||
|
||||
// Resource constants
|
||||
DASHBOARD_RESOURCE = "dashboards"
|
||||
LIBRARY_PANEL_RESOURCE = "librarypanels"
|
||||
)
|
||||
|
||||
var DashboardResourceInfo = utils.NewResourceInfo(GROUP, VERSION,
|
||||
|
||||
@@ -17,6 +17,19 @@ type Dashboard struct {
|
||||
|
||||
// The dashboard body (unstructured for now)
|
||||
Spec common.Unstructured `json:"spec"`
|
||||
|
||||
// Optional dashboard status
|
||||
Status *DashboardStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type DashboardStatus struct {
|
||||
ConversionStatus *ConversionStatus `json:"conversion,omitempty"`
|
||||
}
|
||||
|
||||
type ConversionStatus struct {
|
||||
Failed bool `json:"failed,omitempty"`
|
||||
StoredVersion string `json:"storedVersion,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
@@ -11,8 +11,6 @@ import (
|
||||
url "net/url"
|
||||
unsafe "unsafe"
|
||||
|
||||
datav0alpha1 "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
||||
commonv0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
dashboard "github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -45,16 +43,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*Dashboard)(nil), (*dashboard.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_Dashboard_To_dashboard_Dashboard(a.(*Dashboard), b.(*dashboard.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.Dashboard)(nil), (*Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_Dashboard_To_v0alpha1_Dashboard(a.(*dashboard.Dashboard), b.(*Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardAccess)(nil), (*dashboard.DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_DashboardAccess_To_dashboard_DashboardAccess(a.(*DashboardAccess), b.(*dashboard.DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
@@ -65,111 +53,11 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardList)(nil), (*dashboard.DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_DashboardList_To_dashboard_DashboardList(a.(*DashboardList), b.(*dashboard.DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardList)(nil), (*DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardList_To_v0alpha1_DashboardList(a.(*dashboard.DashboardList), b.(*DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionInfo)(nil), (*dashboard.DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(a.(*DashboardVersionInfo), b.(*dashboard.DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionInfo)(nil), (*DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionInfo_To_v0alpha1_DashboardVersionInfo(a.(*dashboard.DashboardVersionInfo), b.(*DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionList)(nil), (*dashboard.DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(a.(*DashboardVersionList), b.(*dashboard.DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionList)(nil), (*DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionList_To_v0alpha1_DashboardVersionList(a.(*dashboard.DashboardVersionList), b.(*DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardWithAccessInfo)(nil), (*dashboard.DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(a.(*DashboardWithAccessInfo), b.(*dashboard.DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardWithAccessInfo)(nil), (*DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardWithAccessInfo_To_v0alpha1_DashboardWithAccessInfo(a.(*dashboard.DashboardWithAccessInfo), b.(*DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanel)(nil), (*dashboard.LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_LibraryPanel_To_dashboard_LibraryPanel(a.(*LibraryPanel), b.(*dashboard.LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanel)(nil), (*LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanel_To_v0alpha1_LibraryPanel(a.(*dashboard.LibraryPanel), b.(*LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelList)(nil), (*dashboard.LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(a.(*LibraryPanelList), b.(*dashboard.LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelList)(nil), (*LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelList_To_v0alpha1_LibraryPanelList(a.(*dashboard.LibraryPanelList), b.(*LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelSpec)(nil), (*dashboard.LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(a.(*LibraryPanelSpec), b.(*dashboard.LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelSpec)(nil), (*LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec(a.(*dashboard.LibraryPanelSpec), b.(*LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelStatus)(nil), (*dashboard.LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(a.(*LibraryPanelStatus), b.(*dashboard.LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelStatus)(nil), (*LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelStatus_To_v0alpha1_LibraryPanelStatus(a.(*dashboard.LibraryPanelStatus), b.(*LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*VersionsQueryOptions)(nil), (*dashboard.VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(a.(*VersionsQueryOptions), b.(*dashboard.VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.VersionsQueryOptions)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_VersionsQueryOptions_To_v0alpha1_VersionsQueryOptions(a.(*dashboard.VersionsQueryOptions), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_url_Values_To_v0alpha1_VersionsQueryOptions(a.(*url.Values), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*dashboard.DashboardSpec)(nil), (*commonv0alpha1.Unstructured)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardSpec_To_v0alpha1_Unstructured(a.(*dashboard.DashboardSpec), b.(*commonv0alpha1.Unstructured), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddConversionFunc((*commonv0alpha1.Unstructured)(nil), (*dashboard.DashboardSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v0alpha1_Unstructured_To_dashboard_DashboardSpec(a.(*commonv0alpha1.Unstructured), b.(*dashboard.DashboardSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -227,32 +115,6 @@ func Convert_dashboard_AnnotationPermission_To_v0alpha1_AnnotationPermission(in
|
||||
return autoConvert_dashboard_AnnotationPermission_To_v0alpha1_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v0alpha1_Unstructured_To_dashboard_DashboardSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_Dashboard_To_dashboard_Dashboard is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_Dashboard_To_dashboard_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_Dashboard_To_v0alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_DashboardSpec_To_v0alpha1_Unstructured(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_Dashboard_To_v0alpha1_Dashboard is an autogenerated conversion function.
|
||||
func Convert_dashboard_Dashboard_To_v0alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_Dashboard_To_v0alpha1_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
@@ -287,256 +149,6 @@ func Convert_dashboard_DashboardAccess_To_v0alpha1_DashboardAccess(in *dashboard
|
||||
return autoConvert_dashboard_DashboardAccess_To_v0alpha1_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]dashboard.Dashboard, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_v0alpha1_Dashboard_To_dashboard_Dashboard(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_DashboardList_To_dashboard_DashboardList is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_DashboardList_To_dashboard_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardList_To_v0alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Dashboard, len(*in))
|
||||
for i := range *in {
|
||||
if err := Convert_dashboard_Dashboard_To_v0alpha1_Dashboard(&(*in)[i], &(*out)[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardList_To_v0alpha1_DashboardList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardList_To_v0alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardList_To_v0alpha1_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionInfo_To_v0alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionInfo_To_v0alpha1_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionInfo_To_v0alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionInfo_To_v0alpha1_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_DashboardVersionList_To_dashboard_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionList_To_v0alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionList_To_v0alpha1_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionList_To_v0alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionList_To_v0alpha1_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_v0alpha1_Dashboard_To_dashboard_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v0alpha1_DashboardAccess_To_dashboard_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardWithAccessInfo_To_v0alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_dashboard_Dashboard_To_v0alpha1_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_dashboard_DashboardAccess_To_v0alpha1_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardWithAccessInfo_To_v0alpha1_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardWithAccessInfo_To_v0alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardWithAccessInfo_To_v0alpha1_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*dashboard.LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_LibraryPanel_To_dashboard_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_LibraryPanel_To_dashboard_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanel_To_v0alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanel_To_v0alpha1_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanel_To_v0alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanel_To_v0alpha1_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_LibraryPanelList_To_dashboard_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelList_To_v0alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelList_To_v0alpha1_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelList_To_v0alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelList_To_v0alpha1_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*datav0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]datav0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*datav0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]datav0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelSpec_To_v0alpha1_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelStatus_To_v0alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelStatus_To_v0alpha1_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelStatus_To_v0alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelStatus_To_v0alpha1_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v0alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v0alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_v0alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_v0alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_VersionsQueryOptions_To_v0alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_VersionsQueryOptions_To_v0alpha1_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_dashboard_VersionsQueryOptions_To_v0alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_VersionsQueryOptions_To_v0alpha1_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_url_Values_To_v0alpha1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
// WARNING: Field TypeMeta does not have json tag, skipping.
|
||||
|
||||
|
||||
@@ -46,12 +46,33 @@ func (in *AnnotationPermission) DeepCopy() *AnnotationPermission {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConversionStatus) DeepCopyInto(out *ConversionStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionStatus.
|
||||
func (in *ConversionStatus) DeepCopy() *ConversionStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConversionStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Dashboard) DeepCopyInto(out *Dashboard) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(DashboardStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -156,6 +177,27 @@ func (in *DashboardList) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardStatus) DeepCopyInto(out *DashboardStatus) {
|
||||
*out = *in
|
||||
if in.ConversionStatus != nil {
|
||||
in, out := &in.ConversionStatus, &out.ConversionStatus
|
||||
*out = new(ConversionStatus)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardStatus.
|
||||
func (in *DashboardStatus) DeepCopy() *DashboardStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardVersionInfo) DeepCopyInto(out *DashboardVersionInfo) {
|
||||
*out = *in
|
||||
|
||||
@@ -16,10 +16,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
return map[string]common.OpenAPIDefinition{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.AnnotationActions": schema_pkg_apis_dashboard_v0alpha1_AnnotationActions(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.AnnotationPermission": schema_pkg_apis_dashboard_v0alpha1_AnnotationPermission(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.ConversionStatus": schema_pkg_apis_dashboard_v0alpha1_ConversionStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.Dashboard": schema_pkg_apis_dashboard_v0alpha1_Dashboard(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardAccess": schema_pkg_apis_dashboard_v0alpha1_DashboardAccess(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardHit": schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardList": schema_pkg_apis_dashboard_v0alpha1_DashboardList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardStatus": schema_pkg_apis_dashboard_v0alpha1_DashboardStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardVersionInfo": schema_pkg_apis_dashboard_v0alpha1_DashboardVersionInfo(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardVersionList": schema_pkg_apis_dashboard_v0alpha1_DashboardVersionList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardWithAccessInfo": schema_pkg_apis_dashboard_v0alpha1_DashboardWithAccessInfo(ref),
|
||||
@@ -98,6 +100,36 @@ func schema_pkg_apis_dashboard_v0alpha1_AnnotationPermission(ref common.Referenc
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v0alpha1_ConversionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"failed": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"storedVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"error": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v0alpha1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -131,12 +163,18 @@ func schema_pkg_apis_dashboard_v0alpha1_Dashboard(ref common.ReferenceCallback)
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"spec"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,6 +375,25 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardList(ref common.ReferenceCallba
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v0alpha1_DashboardStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"conversion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.ConversionStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.ConversionStatus"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v0alpha1_DashboardVersionInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -468,6 +525,12 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
"access": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
@@ -479,7 +542,7 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardAccess", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardAccess", "github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,5 +3,6 @@ API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashbo
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,LibraryPanelStatus,Warnings
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,SearchResults,Hits
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,SortableFields,Fields
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,DashboardStatus,ConversionStatus
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,SortBy,Descending
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/dashboard/v0alpha1,SortableField,Field
|
||||
|
||||
@@ -4,16 +4,21 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/utils"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
GROUP = "dashboard.grafana.app"
|
||||
VERSION = "v1alpha1"
|
||||
APIVERSION = GROUP + "/" + VERSION
|
||||
|
||||
// Resource constants
|
||||
DASHBOARD_RESOURCE = "dashboards"
|
||||
LIBRARY_PANEL_RESOURCE = "librarypanels"
|
||||
)
|
||||
|
||||
var DashboardResourceInfo = utils.NewResourceInfo(GROUP, VERSION,
|
||||
|
||||
@@ -16,12 +16,20 @@ type Dashboard struct {
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The dashboard body (unstructured for now)
|
||||
Spec DashboardSpec `json:"spec"`
|
||||
Spec common.Unstructured `json:"spec"`
|
||||
|
||||
// Optional dashboard status
|
||||
Status *DashboardStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type DashboardSpec struct {
|
||||
Title string `json:"title"`
|
||||
common.Unstructured `json:",inline"`
|
||||
type DashboardStatus struct {
|
||||
ConversionStatus *ConversionStatus `json:"conversion,omitempty"`
|
||||
}
|
||||
|
||||
type ConversionStatus struct {
|
||||
Failed bool `json:"failed,omitempty"`
|
||||
StoredVersion string `json:"storedVersion,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
url "net/url"
|
||||
unsafe "unsafe"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
||||
dashboard "github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -44,16 +43,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*Dashboard)(nil), (*dashboard.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_Dashboard_To_dashboard_Dashboard(a.(*Dashboard), b.(*dashboard.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.Dashboard)(nil), (*Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_Dashboard_To_v1alpha1_Dashboard(a.(*dashboard.Dashboard), b.(*Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardAccess)(nil), (*dashboard.DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(a.(*DashboardAccess), b.(*dashboard.DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
@@ -64,106 +53,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardList)(nil), (*dashboard.DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardList_To_dashboard_DashboardList(a.(*DashboardList), b.(*dashboard.DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardList)(nil), (*DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardList_To_v1alpha1_DashboardList(a.(*dashboard.DashboardList), b.(*DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardSpec)(nil), (*dashboard.DashboardSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec(a.(*DashboardSpec), b.(*dashboard.DashboardSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardSpec)(nil), (*DashboardSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec(a.(*dashboard.DashboardSpec), b.(*DashboardSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionInfo)(nil), (*dashboard.DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(a.(*DashboardVersionInfo), b.(*dashboard.DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionInfo)(nil), (*DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionInfo_To_v1alpha1_DashboardVersionInfo(a.(*dashboard.DashboardVersionInfo), b.(*DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionList)(nil), (*dashboard.DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(a.(*DashboardVersionList), b.(*dashboard.DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionList)(nil), (*DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionList_To_v1alpha1_DashboardVersionList(a.(*dashboard.DashboardVersionList), b.(*DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardWithAccessInfo)(nil), (*dashboard.DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(a.(*DashboardWithAccessInfo), b.(*dashboard.DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardWithAccessInfo)(nil), (*DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardWithAccessInfo_To_v1alpha1_DashboardWithAccessInfo(a.(*dashboard.DashboardWithAccessInfo), b.(*DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanel)(nil), (*dashboard.LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_LibraryPanel_To_dashboard_LibraryPanel(a.(*LibraryPanel), b.(*dashboard.LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanel)(nil), (*LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanel_To_v1alpha1_LibraryPanel(a.(*dashboard.LibraryPanel), b.(*LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelList)(nil), (*dashboard.LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(a.(*LibraryPanelList), b.(*dashboard.LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelList)(nil), (*LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelList_To_v1alpha1_LibraryPanelList(a.(*dashboard.LibraryPanelList), b.(*LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelSpec)(nil), (*dashboard.LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(a.(*LibraryPanelSpec), b.(*dashboard.LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelSpec)(nil), (*LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec(a.(*dashboard.LibraryPanelSpec), b.(*LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelStatus)(nil), (*dashboard.LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(a.(*LibraryPanelStatus), b.(*dashboard.LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelStatus)(nil), (*LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelStatus_To_v1alpha1_LibraryPanelStatus(a.(*dashboard.LibraryPanelStatus), b.(*LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*VersionsQueryOptions)(nil), (*dashboard.VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(a.(*VersionsQueryOptions), b.(*dashboard.VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.VersionsQueryOptions)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_VersionsQueryOptions_To_v1alpha1_VersionsQueryOptions(a.(*dashboard.VersionsQueryOptions), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_url_Values_To_v1alpha1_VersionsQueryOptions(a.(*url.Values), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
@@ -226,32 +115,6 @@ func Convert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(in
|
||||
return autoConvert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_Dashboard_To_dashboard_Dashboard is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_Dashboard_To_dashboard_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_Dashboard_To_v1alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_Dashboard_To_v1alpha1_Dashboard is an autogenerated conversion function.
|
||||
func Convert_dashboard_Dashboard_To_v1alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_Dashboard_To_v1alpha1_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
@@ -286,258 +149,6 @@ func Convert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(in *dashboard
|
||||
return autoConvert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.Dashboard)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardList_To_dashboard_DashboardList is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardList_To_dashboard_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardList_To_v1alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]Dashboard)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardList_To_v1alpha1_DashboardList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardList_To_v1alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardList_To_v1alpha1_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec(in *DashboardSpec, out *dashboard.DashboardSpec, s conversion.Scope) error {
|
||||
out.Title = in.Title
|
||||
out.Unstructured = in.Unstructured
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec(in *DashboardSpec, out *dashboard.DashboardSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardSpec_To_dashboard_DashboardSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec(in *dashboard.DashboardSpec, out *DashboardSpec, s conversion.Scope) error {
|
||||
out.Title = in.Title
|
||||
out.Unstructured = in.Unstructured
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec(in *dashboard.DashboardSpec, out *DashboardSpec, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardSpec_To_v1alpha1_DashboardSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionInfo_To_v1alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionInfo_To_v1alpha1_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionInfo_To_v1alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionInfo_To_v1alpha1_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardVersionList_To_dashboard_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionList_To_v1alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionList_To_v1alpha1_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionList_To_v1alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionList_To_v1alpha1_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_v1alpha1_Dashboard_To_dashboard_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardWithAccessInfo_To_v1alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_dashboard_Dashboard_To_v1alpha1_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardWithAccessInfo_To_v1alpha1_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardWithAccessInfo_To_v1alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardWithAccessInfo_To_v1alpha1_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*dashboard.LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_LibraryPanel_To_dashboard_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_LibraryPanel_To_dashboard_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanel_To_v1alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanel_To_v1alpha1_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanel_To_v1alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanel_To_v1alpha1_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_LibraryPanelList_To_dashboard_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelList_To_v1alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelList_To_v1alpha1_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelList_To_v1alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelList_To_v1alpha1_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*v0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]v0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*v0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]v0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelSpec_To_v1alpha1_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelStatus_To_v1alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelStatus_To_v1alpha1_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelStatus_To_v1alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelStatus_To_v1alpha1_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_VersionsQueryOptions_To_v1alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_VersionsQueryOptions_To_v1alpha1_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_dashboard_VersionsQueryOptions_To_v1alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_VersionsQueryOptions_To_v1alpha1_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_url_Values_To_v1alpha1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
// WARNING: Field TypeMeta does not have json tag, skipping.
|
||||
|
||||
|
||||
@@ -46,12 +46,33 @@ func (in *AnnotationPermission) DeepCopy() *AnnotationPermission {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConversionStatus) DeepCopyInto(out *ConversionStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionStatus.
|
||||
func (in *ConversionStatus) DeepCopy() *ConversionStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConversionStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Dashboard) DeepCopyInto(out *Dashboard) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(DashboardStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -128,18 +149,22 @@ func (in *DashboardList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardSpec) DeepCopyInto(out *DashboardSpec) {
|
||||
func (in *DashboardStatus) DeepCopyInto(out *DashboardStatus) {
|
||||
*out = *in
|
||||
in.Unstructured.DeepCopyInto(&out.Unstructured)
|
||||
if in.ConversionStatus != nil {
|
||||
in, out := &in.ConversionStatus, &out.ConversionStatus
|
||||
*out = new(ConversionStatus)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardSpec.
|
||||
func (in *DashboardSpec) DeepCopy() *DashboardSpec {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardStatus.
|
||||
func (in *DashboardStatus) DeepCopy() *DashboardStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardSpec)
|
||||
out := new(DashboardStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -16,10 +16,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
return map[string]common.OpenAPIDefinition{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.AnnotationActions": schema_pkg_apis_dashboard_v1alpha1_AnnotationActions(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.AnnotationPermission": schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.ConversionStatus": schema_pkg_apis_dashboard_v1alpha1_ConversionStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.Dashboard": schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardAccess": schema_pkg_apis_dashboard_v1alpha1_DashboardAccess(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardList": schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardSpec": schema_pkg_apis_dashboard_v1alpha1_DashboardSpec(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardStatus": schema_pkg_apis_dashboard_v1alpha1_DashboardStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardVersionInfo": schema_pkg_apis_dashboard_v1alpha1_DashboardVersionInfo(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardVersionList": schema_pkg_apis_dashboard_v1alpha1_DashboardVersionList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardWithAccessInfo": schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref),
|
||||
@@ -92,6 +93,36 @@ func schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref common.Referenc
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_ConversionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"failed": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"storedVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"error": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -122,8 +153,13 @@ func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback)
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The dashboard body (unstructured for now)",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardSpec"),
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -131,7 +167,7 @@ func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback)
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,38 +288,22 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref common.ReferenceCallba
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"title": {
|
||||
"conversion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"Object": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Object is a JSON compatible map with string, float, int, bool, []interface{}, or map[string]interface{} children.",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.ConversionStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"title", "Object"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.ConversionStatus"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,8 +435,13 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The dashboard body (unstructured for now)",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardSpec"),
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
"access": {
|
||||
@@ -430,7 +455,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardAccess", "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardAccess", "github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1,LibraryPanelStatus,Warnings
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/dashboard/v1alpha1,DashboardStatus,ConversionStatus
|
||||
|
||||
@@ -16,12 +16,20 @@ type Dashboard struct {
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The dashboard body (unstructured for now)
|
||||
Spec DashboardSpec `json:"spec"`
|
||||
Spec common.Unstructured `json:"spec"`
|
||||
|
||||
// Optional dashboard status
|
||||
Status *DashboardStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type DashboardSpec struct {
|
||||
Title string `json:"title"`
|
||||
common.Unstructured `json:",inline"`
|
||||
type DashboardStatus struct {
|
||||
ConversionStatus *ConversionStatus `json:"conversion,omitempty"`
|
||||
}
|
||||
|
||||
type ConversionStatus struct {
|
||||
Failed bool `json:"failed,omitempty"`
|
||||
StoredVersion string `json:"storedVersion,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
url "net/url"
|
||||
unsafe "unsafe"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
||||
dashboard "github.com/grafana/grafana/pkg/apis/dashboard"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -44,16 +43,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*Dashboard)(nil), (*dashboard.Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_Dashboard_To_dashboard_Dashboard(a.(*Dashboard), b.(*dashboard.Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.Dashboard)(nil), (*Dashboard)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_Dashboard_To_v2alpha1_Dashboard(a.(*dashboard.Dashboard), b.(*Dashboard), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardAccess)(nil), (*dashboard.DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardAccess_To_dashboard_DashboardAccess(a.(*DashboardAccess), b.(*dashboard.DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
@@ -64,106 +53,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardList)(nil), (*dashboard.DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardList_To_dashboard_DashboardList(a.(*DashboardList), b.(*dashboard.DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardList)(nil), (*DashboardList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardList_To_v2alpha1_DashboardList(a.(*dashboard.DashboardList), b.(*DashboardList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardSpec)(nil), (*dashboard.DashboardSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec(a.(*DashboardSpec), b.(*dashboard.DashboardSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardSpec)(nil), (*DashboardSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec(a.(*dashboard.DashboardSpec), b.(*DashboardSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionInfo)(nil), (*dashboard.DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(a.(*DashboardVersionInfo), b.(*dashboard.DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionInfo)(nil), (*DashboardVersionInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionInfo_To_v2alpha1_DashboardVersionInfo(a.(*dashboard.DashboardVersionInfo), b.(*DashboardVersionInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardVersionList)(nil), (*dashboard.DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(a.(*DashboardVersionList), b.(*dashboard.DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardVersionList)(nil), (*DashboardVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardVersionList_To_v2alpha1_DashboardVersionList(a.(*dashboard.DashboardVersionList), b.(*DashboardVersionList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardWithAccessInfo)(nil), (*dashboard.DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(a.(*DashboardWithAccessInfo), b.(*dashboard.DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardWithAccessInfo)(nil), (*DashboardWithAccessInfo)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardWithAccessInfo_To_v2alpha1_DashboardWithAccessInfo(a.(*dashboard.DashboardWithAccessInfo), b.(*DashboardWithAccessInfo), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanel)(nil), (*dashboard.LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_LibraryPanel_To_dashboard_LibraryPanel(a.(*LibraryPanel), b.(*dashboard.LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanel)(nil), (*LibraryPanel)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanel_To_v2alpha1_LibraryPanel(a.(*dashboard.LibraryPanel), b.(*LibraryPanel), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelList)(nil), (*dashboard.LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(a.(*LibraryPanelList), b.(*dashboard.LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelList)(nil), (*LibraryPanelList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelList_To_v2alpha1_LibraryPanelList(a.(*dashboard.LibraryPanelList), b.(*LibraryPanelList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelSpec)(nil), (*dashboard.LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(a.(*LibraryPanelSpec), b.(*dashboard.LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelSpec)(nil), (*LibraryPanelSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec(a.(*dashboard.LibraryPanelSpec), b.(*LibraryPanelSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*LibraryPanelStatus)(nil), (*dashboard.LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(a.(*LibraryPanelStatus), b.(*dashboard.LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.LibraryPanelStatus)(nil), (*LibraryPanelStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_LibraryPanelStatus_To_v2alpha1_LibraryPanelStatus(a.(*dashboard.LibraryPanelStatus), b.(*LibraryPanelStatus), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*VersionsQueryOptions)(nil), (*dashboard.VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(a.(*VersionsQueryOptions), b.(*dashboard.VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.VersionsQueryOptions)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_VersionsQueryOptions_To_v2alpha1_VersionsQueryOptions(a.(*dashboard.VersionsQueryOptions), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_url_Values_To_v2alpha1_VersionsQueryOptions(a.(*url.Values), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
@@ -226,32 +115,6 @@ func Convert_dashboard_AnnotationPermission_To_v2alpha1_AnnotationPermission(in
|
||||
return autoConvert_dashboard_AnnotationPermission_To_v2alpha1_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_Dashboard_To_dashboard_Dashboard is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_Dashboard_To_dashboard_Dashboard(in *Dashboard, out *dashboard.Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_Dashboard_To_dashboard_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_Dashboard_To_v2alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_Dashboard_To_v2alpha1_Dashboard is an autogenerated conversion function.
|
||||
func Convert_dashboard_Dashboard_To_v2alpha1_Dashboard(in *dashboard.Dashboard, out *Dashboard, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_Dashboard_To_v2alpha1_Dashboard(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
@@ -286,258 +149,6 @@ func Convert_dashboard_DashboardAccess_To_v2alpha1_DashboardAccess(in *dashboard
|
||||
return autoConvert_dashboard_DashboardAccess_To_v2alpha1_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.Dashboard)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_DashboardList_To_dashboard_DashboardList is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_DashboardList_To_dashboard_DashboardList(in *DashboardList, out *dashboard.DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_DashboardList_To_dashboard_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardList_To_v2alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]Dashboard)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardList_To_v2alpha1_DashboardList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardList_To_v2alpha1_DashboardList(in *dashboard.DashboardList, out *DashboardList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardList_To_v2alpha1_DashboardList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec(in *DashboardSpec, out *dashboard.DashboardSpec, s conversion.Scope) error {
|
||||
out.Title = in.Title
|
||||
out.Unstructured = in.Unstructured
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec(in *DashboardSpec, out *dashboard.DashboardSpec, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_DashboardSpec_To_dashboard_DashboardSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec(in *dashboard.DashboardSpec, out *DashboardSpec, s conversion.Scope) error {
|
||||
out.Title = in.Title
|
||||
out.Unstructured = in.Unstructured
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec(in *dashboard.DashboardSpec, out *DashboardSpec, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardSpec_To_v2alpha1_DashboardSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in *DashboardVersionInfo, out *dashboard.DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_DashboardVersionInfo_To_dashboard_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionInfo_To_v2alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.ParentVersion = in.ParentVersion
|
||||
out.Created = in.Created
|
||||
out.CreatedBy = in.CreatedBy
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionInfo_To_v2alpha1_DashboardVersionInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionInfo_To_v2alpha1_DashboardVersionInfo(in *dashboard.DashboardVersionInfo, out *DashboardVersionInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionInfo_To_v2alpha1_DashboardVersionInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_DashboardVersionList_To_dashboard_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in *DashboardVersionList, out *dashboard.DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_DashboardVersionList_To_dashboard_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardVersionList_To_v2alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]DashboardVersionInfo)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardVersionList_To_v2alpha1_DashboardVersionList is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardVersionList_To_v2alpha1_DashboardVersionList(in *dashboard.DashboardVersionList, out *DashboardVersionList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardVersionList_To_v2alpha1_DashboardVersionList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_v2alpha1_Dashboard_To_dashboard_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v2alpha1_DashboardAccess_To_dashboard_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in *DashboardWithAccessInfo, out *dashboard.DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_DashboardWithAccessInfo_To_dashboard_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardWithAccessInfo_To_v2alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
if err := Convert_dashboard_Dashboard_To_v2alpha1_Dashboard(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_dashboard_DashboardAccess_To_v2alpha1_DashboardAccess(&in.Access, &out.Access, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardWithAccessInfo_To_v2alpha1_DashboardWithAccessInfo is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardWithAccessInfo_To_v2alpha1_DashboardWithAccessInfo(in *dashboard.DashboardWithAccessInfo, out *DashboardWithAccessInfo, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardWithAccessInfo_To_v2alpha1_DashboardWithAccessInfo(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*dashboard.LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_LibraryPanel_To_dashboard_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_LibraryPanel_To_dashboard_LibraryPanel(in *LibraryPanel, out *dashboard.LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_LibraryPanel_To_dashboard_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanel_To_v2alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Status = (*LibraryPanelStatus)(unsafe.Pointer(in.Status))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanel_To_v2alpha1_LibraryPanel is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanel_To_v2alpha1_LibraryPanel(in *dashboard.LibraryPanel, out *LibraryPanel, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanel_To_v2alpha1_LibraryPanel(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]dashboard.LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_LibraryPanelList_To_dashboard_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in *LibraryPanelList, out *dashboard.LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_LibraryPanelList_To_dashboard_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelList_To_v2alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]LibraryPanel)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelList_To_v2alpha1_LibraryPanelList is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelList_To_v2alpha1_LibraryPanelList(in *dashboard.LibraryPanelList, out *LibraryPanelList, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelList_To_v2alpha1_LibraryPanelList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*v0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]v0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in *LibraryPanelSpec, out *dashboard.LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_LibraryPanelSpec_To_dashboard_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
out.Type = in.Type
|
||||
out.PluginVersion = in.PluginVersion
|
||||
out.Title = in.Title
|
||||
out.Description = in.Description
|
||||
out.Options = in.Options
|
||||
out.FieldConfig = in.FieldConfig
|
||||
out.Datasource = (*v0alpha1.DataSourceRef)(unsafe.Pointer(in.Datasource))
|
||||
out.Targets = *(*[]v0alpha1.DataQuery)(unsafe.Pointer(&in.Targets))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec(in *dashboard.LibraryPanelSpec, out *LibraryPanelSpec, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelSpec_To_v2alpha1_LibraryPanelSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in *LibraryPanelStatus, out *dashboard.LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_LibraryPanelStatus_To_dashboard_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_LibraryPanelStatus_To_v2alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings))
|
||||
out.Missing = in.Missing
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_LibraryPanelStatus_To_v2alpha1_LibraryPanelStatus is an autogenerated conversion function.
|
||||
func Convert_dashboard_LibraryPanelStatus_To_v2alpha1_LibraryPanelStatus(in *dashboard.LibraryPanelStatus, out *LibraryPanelStatus, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_LibraryPanelStatus_To_v2alpha1_LibraryPanelStatus(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_v2alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in *VersionsQueryOptions, out *dashboard.VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_v2alpha1_VersionsQueryOptions_To_dashboard_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_VersionsQueryOptions_To_v2alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
out.Version = in.Version
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_VersionsQueryOptions_To_v2alpha1_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_dashboard_VersionsQueryOptions_To_v2alpha1_VersionsQueryOptions(in *dashboard.VersionsQueryOptions, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_VersionsQueryOptions_To_v2alpha1_VersionsQueryOptions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_url_Values_To_v2alpha1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
// WARNING: Field TypeMeta does not have json tag, skipping.
|
||||
|
||||
|
||||
@@ -46,12 +46,33 @@ func (in *AnnotationPermission) DeepCopy() *AnnotationPermission {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConversionStatus) DeepCopyInto(out *ConversionStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionStatus.
|
||||
func (in *ConversionStatus) DeepCopy() *ConversionStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConversionStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Dashboard) DeepCopyInto(out *Dashboard) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(DashboardStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -128,18 +149,22 @@ func (in *DashboardList) DeepCopyObject() runtime.Object {
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardSpec) DeepCopyInto(out *DashboardSpec) {
|
||||
func (in *DashboardStatus) DeepCopyInto(out *DashboardStatus) {
|
||||
*out = *in
|
||||
in.Unstructured.DeepCopyInto(&out.Unstructured)
|
||||
if in.ConversionStatus != nil {
|
||||
in, out := &in.ConversionStatus, &out.ConversionStatus
|
||||
*out = new(ConversionStatus)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardSpec.
|
||||
func (in *DashboardSpec) DeepCopy() *DashboardSpec {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardStatus.
|
||||
func (in *DashboardStatus) DeepCopy() *DashboardStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardSpec)
|
||||
out := new(DashboardStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -16,10 +16,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
return map[string]common.OpenAPIDefinition{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.AnnotationActions": schema_pkg_apis_dashboard_v2alpha1_AnnotationActions(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.AnnotationPermission": schema_pkg_apis_dashboard_v2alpha1_AnnotationPermission(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.ConversionStatus": schema_pkg_apis_dashboard_v2alpha1_ConversionStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.Dashboard": schema_pkg_apis_dashboard_v2alpha1_Dashboard(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardAccess": schema_pkg_apis_dashboard_v2alpha1_DashboardAccess(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardList": schema_pkg_apis_dashboard_v2alpha1_DashboardList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardSpec": schema_pkg_apis_dashboard_v2alpha1_DashboardSpec(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardStatus": schema_pkg_apis_dashboard_v2alpha1_DashboardStatus(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardVersionInfo": schema_pkg_apis_dashboard_v2alpha1_DashboardVersionInfo(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardVersionList": schema_pkg_apis_dashboard_v2alpha1_DashboardVersionList(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardWithAccessInfo": schema_pkg_apis_dashboard_v2alpha1_DashboardWithAccessInfo(ref),
|
||||
@@ -92,6 +93,36 @@ func schema_pkg_apis_dashboard_v2alpha1_AnnotationPermission(ref common.Referenc
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v2alpha1_ConversionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"failed": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"storedVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"error": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v2alpha1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -122,8 +153,13 @@ func schema_pkg_apis_dashboard_v2alpha1_Dashboard(ref common.ReferenceCallback)
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The dashboard body (unstructured for now)",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardSpec"),
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -131,7 +167,7 @@ func schema_pkg_apis_dashboard_v2alpha1_Dashboard(ref common.ReferenceCallback)
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,38 +288,22 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardList(ref common.ReferenceCallba
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v2alpha1_DashboardSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v2alpha1_DashboardStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"title": {
|
||||
"conversion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"Object": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Object is a JSON compatible map with string, float, int, bool, []interface{}, or map[string]interface{} children.",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.ConversionStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"title", "Object"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.ConversionStatus"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,8 +435,13 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The dashboard body (unstructured for now)",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardSpec"),
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional dashboard status",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
"access": {
|
||||
@@ -430,7 +455,7 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardWithAccessInfo(ref common.Refer
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardAccess", "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardAccess", "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1.DashboardStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1,LibraryPanelStatus,Warnings
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1,DashboardStatus,ConversionStatus
|
||||
|
||||
@@ -1,360 +0,0 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AnnotationActions) DeepCopyInto(out *AnnotationActions) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnotationActions.
|
||||
func (in *AnnotationActions) DeepCopy() *AnnotationActions {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AnnotationActions)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AnnotationPermission) DeepCopyInto(out *AnnotationPermission) {
|
||||
*out = *in
|
||||
out.Dashboard = in.Dashboard
|
||||
out.Organization = in.Organization
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnotationPermission.
|
||||
func (in *AnnotationPermission) DeepCopy() *AnnotationPermission {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AnnotationPermission)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Dashboard) DeepCopyInto(out *Dashboard) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dashboard.
|
||||
func (in *Dashboard) DeepCopy() *Dashboard {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Dashboard)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Dashboard) 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 *DashboardAccess) DeepCopyInto(out *DashboardAccess) {
|
||||
*out = *in
|
||||
if in.AnnotationsPermissions != nil {
|
||||
in, out := &in.AnnotationsPermissions, &out.AnnotationsPermissions
|
||||
*out = new(AnnotationPermission)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardAccess.
|
||||
func (in *DashboardAccess) DeepCopy() *DashboardAccess {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardAccess)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardList) DeepCopyInto(out *DashboardList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Dashboard, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardList.
|
||||
func (in *DashboardList) DeepCopy() *DashboardList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DashboardList) 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 *DashboardSpec) DeepCopyInto(out *DashboardSpec) {
|
||||
*out = *in
|
||||
in.Unstructured.DeepCopyInto(&out.Unstructured)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardSpec.
|
||||
func (in *DashboardSpec) DeepCopy() *DashboardSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardVersionInfo) DeepCopyInto(out *DashboardVersionInfo) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardVersionInfo.
|
||||
func (in *DashboardVersionInfo) DeepCopy() *DashboardVersionInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardVersionInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DashboardVersionList) DeepCopyInto(out *DashboardVersionList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]DashboardVersionInfo, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardVersionList.
|
||||
func (in *DashboardVersionList) DeepCopy() *DashboardVersionList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardVersionList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DashboardVersionList) 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 *DashboardWithAccessInfo) DeepCopyInto(out *DashboardWithAccessInfo) {
|
||||
*out = *in
|
||||
in.Dashboard.DeepCopyInto(&out.Dashboard)
|
||||
in.Access.DeepCopyInto(&out.Access)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardWithAccessInfo.
|
||||
func (in *DashboardWithAccessInfo) DeepCopy() *DashboardWithAccessInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DashboardWithAccessInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DashboardWithAccessInfo) 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 *LibraryPanel) DeepCopyInto(out *LibraryPanel) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
if in.Status != nil {
|
||||
in, out := &in.Status, &out.Status
|
||||
*out = new(LibraryPanelStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LibraryPanel.
|
||||
func (in *LibraryPanel) DeepCopy() *LibraryPanel {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LibraryPanel)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *LibraryPanel) 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 *LibraryPanelList) DeepCopyInto(out *LibraryPanelList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]LibraryPanel, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LibraryPanelList.
|
||||
func (in *LibraryPanelList) DeepCopy() *LibraryPanelList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LibraryPanelList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *LibraryPanelList) 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 *LibraryPanelSpec) DeepCopyInto(out *LibraryPanelSpec) {
|
||||
*out = *in
|
||||
in.Options.DeepCopyInto(&out.Options)
|
||||
in.FieldConfig.DeepCopyInto(&out.FieldConfig)
|
||||
if in.Datasource != nil {
|
||||
in, out := &in.Datasource, &out.Datasource
|
||||
*out = new(v0alpha1.DataSourceRef)
|
||||
**out = **in
|
||||
}
|
||||
if in.Targets != nil {
|
||||
in, out := &in.Targets, &out.Targets
|
||||
*out = make([]v0alpha1.DataQuery, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LibraryPanelSpec.
|
||||
func (in *LibraryPanelSpec) DeepCopy() *LibraryPanelSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LibraryPanelSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LibraryPanelStatus) DeepCopyInto(out *LibraryPanelStatus) {
|
||||
*out = *in
|
||||
if in.Warnings != nil {
|
||||
in, out := &in.Warnings, &out.Warnings
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.Missing.DeepCopyInto(&out.Missing)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LibraryPanelStatus.
|
||||
func (in *LibraryPanelStatus) DeepCopy() *LibraryPanelStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LibraryPanelStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *VersionsQueryOptions) DeepCopyInto(out *VersionsQueryOptions) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionsQueryOptions.
|
||||
func (in *VersionsQueryOptions) DeepCopy() *VersionsQueryOptions {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(VersionsQueryOptions)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *VersionsQueryOptions) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user