Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseDashboardFamily ¶
func BaseDashboardFamily(p BaseLoadPaths) (schema.VersionedCueSchema, error)
BaseDashboardFamily loads the family of schema representing the "Base" variant of a Grafana dashboard: the core-defined dashboard schema that applies universally to all dashboards, independent of any plugins.
The returned VersionedCueSchema will always be the oldest schema in the family: the 0.0 schema. schema.Find() provides easy traversal to newer schema versions.
func DistDashboardFamily ¶
func DistDashboardFamily(p BaseLoadPaths) (schema.VersionedCueSchema, error)
DistDashboardFamily loads the family of schema representing the "Dist" variant of a Grafana dashboard: the "Base" variant (see BaseDashboardFamily()), but constrained such that all substructures (e.g. panels) must be valid with respect to the schemas provided by the core plugins that ship with Grafana.
The returned VersionedCueSchema will always be the oldest schema in the family: the 0.0 schema. schema.Find() provides easy traversal to newer schema versions.
Types ¶
type BaseLoadPaths ¶
type BaseLoadPaths struct { // BaseCueFS should be rooted at a directory containing the filesystem layout // expected to exist at github.com/grafana/grafana/cue. BaseCueFS fs.FS // DistPluginCueFS should point to some fs path (TBD) under which all core // plugins live. DistPluginCueFS fs.FS // InstanceCueFS should point to a root dir in which non-core plugins live. // Normal case will be that this only happens when an actual Grafana // instance is making the call, and has a plugin dir to offer - though // external tools could always create their own dirs shaped like a Grafana // plugin dir, and point to those. InstanceCueFS fs.FS }
BaseLoadPaths contains the configuration for loading a DistDashboard
func GetDefaultLoadPaths ¶
func GetDefaultLoadPaths() BaseLoadPaths
type CompositeDashboardSchema ¶
type CompositeDashboardSchema interface { schema.VersionedCueSchema LatestPanelSchemaFor(id string) (schema.VersionedCueSchema, error) }
One-off special interface for dashboard composite schema, until the composite dashboard schema pattern is fully generalized.
NOTE: THIS IS A TEMPORARY TYPE. IT WILL BE REPLACED WITH A GENERIC INTERFACE TO REPRESENT COMPOSITIONAL SCHEMA FAMILY PRIOR TO GRAFANA 8. UPDATING WILL SHOULD BE TRIVIAL, BUT IT WILL CAUSE BREAKAGES.