feat: add library elements to dash service (#114016)

This commit is contained in:
Costa Alexoglou
2025-11-18 09:21:05 +01:00
committed by GitHub
parent d6e81c6334
commit faabe2e46d
12 changed files with 162 additions and 36 deletions
@@ -27,12 +27,27 @@ type DataSourceIndexProvider interface {
Index(ctx context.Context) *DatasourceIndex
}
type LibraryElementInfo struct {
UID string
Name string
Kind int64
Type string
Description string
FolderUID string
}
type LibraryElementIndexProvider interface {
// GetLibraryElementInfo returns library element information for use in migrations.
GetLibraryElementInfo(ctx context.Context) []LibraryElementInfo
}
type PanelPluginInfo struct {
ID string
Version string
}
func GetMigrations(dsIndexProvider DataSourceIndexProvider) map[int]SchemaVersionMigrationFunc {
func GetMigrations(dsIndexProvider DataSourceIndexProvider, _ LibraryElementIndexProvider) map[int]SchemaVersionMigrationFunc {
return map[int]SchemaVersionMigrationFunc{
2: V2,
3: V3,