mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
d76defe517
* move GrafanaMetaAccessor into pkg/apis, add support for Spec.Title & Spec.Name * K8s: Move GrafanaMetaAccessor (PR into another) (#79728) * access titles * remove title * remove title * remove kinds metadata accessor * remove kinds metadata accessor * fixes * error handling * fix tests --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
19 lines
533 B
Go
19 lines
533 B
Go
package kinds
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
)
|
|
|
|
// GrafanaResource is a generic kubernetes resource with a helper for the common grafana metadata
|
|
// This is a temporary solution until this object (or similar) can be moved to the app-sdk or kindsys
|
|
type GrafanaResource[Spec any, Status any] struct {
|
|
metav1.TypeMeta `json:",inline"`
|
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
|
|
Spec *Spec `json:"spec,omitempty"`
|
|
Status *Status `json:"status,omitempty"`
|
|
|
|
// Avoid extending
|
|
_ any `json:"-"`
|
|
}
|