Documentation
¶
Index ¶
- func ExecutePanelScript(cueScript *build.Instance, grafanaPanelData []byte) (*common.Plugin, bool, error)
- func ExecuteQueryScript(cueScript *build.Instance, grafanaQueryData []byte) (*common.Plugin, bool, error)
- func ExecuteVariableScript(cueScript *build.Instance, grafanaVariableData []byte) (*common.Plugin, bool, error)
- func GetPluginKind(migrateFile string) (plugin.Kind, error)
- func Load(pluginPath string, moduleSpec plugin.ModuleSpec) ([]schema.LoadSchema, error)
- func LoadMigrateSchema(schemaPath string) (*build.Instance, error)
- func ReplaceInputValue(input map[string]string, grafanaDashboard string) string
- type CurrentValue
- type GridPosition
- type Migration
- type Panel
- type SimplifiedDashboard
- type TemplateVar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecutePanelScript ¶ added in v0.52.0
func ExecuteQueryScript ¶ added in v0.52.0
func ExecuteVariableScript ¶ added in v0.52.0
func GetPluginKind ¶ added in v0.52.0
GetPluginKind guesses the plugin kind from a migration file based on expected patterns
func Load ¶
func Load(pluginPath string, moduleSpec plugin.ModuleSpec) ([]schema.LoadSchema, error)
Types ¶
type CurrentValue ¶
type CurrentValue struct {
Value *variable.DefaultValue `json:"value,omitempty"`
}
type GridPosition ¶
type Migration ¶
type Migration interface {
Load(pluginPath string, module v1.PluginModule) error
LoadDevPlugin(pluginPath string, module v1.PluginModule) error
UnLoadDevPlugin(module v1.PluginModule)
Migrate(grafanaDashboard *SimplifiedDashboard) (*v1.Dashboard, error)
}
type Panel ¶
type Panel struct {
Type string `json:"type"`
Title string `json:"title"`
Description string `json:"description"`
Collapsed bool `json:"collapsed"`
Panels []Panel `json:"panels"`
GridPosition GridPosition `json:"gridPos"`
Targets []json.RawMessage `json:"targets"`
json.RawMessage
}
func (*Panel) UnmarshalJSON ¶
type SimplifiedDashboard ¶
type SimplifiedDashboard struct {
UID string `json:"uid,omitempty"`
Title string `json:"title"`
Panels []Panel `json:"panels"`
Templating struct {
List []TemplateVar `json:"list"`
} `json:"templating"`
}
func (*SimplifiedDashboard) UnmarshalJSON ¶
func (d *SimplifiedDashboard) UnmarshalJSON(data []byte) error
type TemplateVar ¶
type TemplateVar struct {
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
Label string `json:"label"`
Hide int `json:"hide"`
Sort *int `json:"sort,omitempty"`
IncludeAll bool `json:"includeAll"`
AllValue string `json:"allValue"`
Multi bool `json:"multi"`
Current *CurrentValue `json:"current,omitempty"`
Query json.RawMessage `json:"query"`
json.RawMessage
}
func (*TemplateVar) UnmarshalJSON ¶
func (v *TemplateVar) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.