mirror of
https://github.com/grafana/grafana.git
synced 2026-08-13 06:34:55 -05:00
Plugins: Add Plugin FS abstraction (#63734)
* unexport pluginDir from dto * first pass * tidy * naming + add mutex * add dupe checking * fix func typo * interface + move logic from renderer * remote finder * remote signing * fix tests * tidy up * tidy markdown logic * split changes * fix tests * slim interface down * fix status code * tidy exec path func * fixup * undo changes * remove unused func * remove unused func * fix goimports * fetch remotely * simultaneous support * fix linter * use var * add exception for gosec warning * fixup * fix tests * tidy * rework cfg pattern * simplify * PR feedback * fix dupe field * remove g304 nolint * apply PR feedback * remove unnecessary gosec nolint * fix finder loop and update comment * fix map alloc * fix test * remove commented code
This commit is contained in:
@@ -2,6 +2,7 @@ package plugins
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/fs"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
|
||||
@@ -38,6 +39,23 @@ type UpdateInfo struct {
|
||||
PluginZipURL string
|
||||
}
|
||||
|
||||
type FS interface {
|
||||
fs.FS
|
||||
|
||||
Base() string
|
||||
Files() []string
|
||||
}
|
||||
|
||||
type FoundBundle struct {
|
||||
Primary FoundPlugin
|
||||
Children []*FoundPlugin
|
||||
}
|
||||
|
||||
type FoundPlugin struct {
|
||||
JSONData JSONData
|
||||
FS FS
|
||||
}
|
||||
|
||||
// Client is used to communicate with backend plugin implementations.
|
||||
type Client interface {
|
||||
backend.QueryDataHandler
|
||||
|
||||
Reference in New Issue
Block a user