Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coremodel ¶
type Coremodel struct {
// contains filtered or unexported fields
}
Coremodel contains the foundational schema declaration for playlists. It implements coremodel.Interface.
func New ¶
New returns a new instance of the playlist coremodel.
Note that this function does not cache, and initially loading a Thema lineage can be expensive. As such, the Grafana backend should prefer to access this coremodel through a registry (pkg/framework/coremodel/registry), which does cache.
func (*Coremodel) CurrentSchema ¶
CurrentSchema returns the current (latest) playlist Thema schema.
type Model ¶
type Model struct { // Interval sets the time between switching views in a playlist. // FIXME: Is this based on a standardized format or what options are available? Can datemath be used? Interval string `json:"interval"` // The ordered list of items that the playlist will iterate over. Items *[]PlaylistItem `json:"items,omitempty"` // Name of the playlist. Name string `json:"name"` // Unique playlist identifier. Generated on creation, either by the // creator of the playlist of by the application. Uid string `json:"uid"` }
Model is the Go representation of a playlist.
THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES. Equivalent Go types at stable import paths are provided in https://github.com/grafana/grok.
type PlaylistItem ¶
type PlaylistItem struct { // Title is an unused property -- it will be removed in the future Title *string `json:"title,omitempty"` // Type of the item. Type PlaylistItemType `json:"type"` // Value depends on type and describes the playlist item. // // - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This // is not portable as the numerical identifier is non-deterministic between different instances. // Will be replaced by dashboard_by_uid in the future. (deprecated) // - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All // dashboards behind the tag will be added to the playlist. // - dashboard_by_uid: The value is the dashboard UID Value string `json:"value"` }
PlaylistItem is the Go representation of a playlist.Item.
THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES. Equivalent Go types at stable import paths are provided in https://github.com/grafana/grok.
type PlaylistItemType ¶
type PlaylistItemType string
Type of the item.
THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES. Equivalent Go types at stable import paths are provided in https://github.com/grafana/grok.
const ( PlaylistItemTypeDashboardById PlaylistItemType = "dashboard_by_id" PlaylistItemTypeDashboardByTag PlaylistItemType = "dashboard_by_tag" PlaylistItemTypeDashboardByUid PlaylistItemType = "dashboard_by_uid" )
Defines values for PlaylistItemType.