feat: add library elements to dash service (#114016)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user