mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 17:43:35 -06:00
* split out plugin manager * remove whitespace * fix tests * split up tests * updating naming conventions * simplify manager * tidy * add more fakes * testing time * add query verif to int test * renaming * add process tests * tidy up manager tests * add extra case to int test * add more coverage to store and process tests * remove comment * fix capatilization * init on provide * remove addfromsource from API
36 lines
1.2 KiB
Go
36 lines
1.2 KiB
Go
package dashboards
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
// FileStore is the interface for plugin dashboard file storage.
|
|
type FileStore interface {
|
|
// ListPluginDashboardFiles lists plugin dashboard files.
|
|
ListPluginDashboardFiles(ctx context.Context, args *ListPluginDashboardFilesArgs) (*ListPluginDashboardFilesResult, error)
|
|
// GetPluginDashboardFileContents gets the referenced plugin dashboard file content.
|
|
GetPluginDashboardFileContents(ctx context.Context, args *GetPluginDashboardFileContentsArgs) (*GetPluginDashboardFileContentsResult, error)
|
|
}
|
|
|
|
// ListPluginDashboardFilesArgs list plugin dashboard files argument model.
|
|
type ListPluginDashboardFilesArgs struct {
|
|
PluginID string
|
|
}
|
|
|
|
// ListPluginDashboardFilesResult list plugin dashboard files result model.
|
|
type ListPluginDashboardFilesResult struct {
|
|
FileReferences []string
|
|
}
|
|
|
|
// GetPluginDashboardFileContentsArgs get plugin dashboard file content argument model.
|
|
type GetPluginDashboardFileContentsArgs struct {
|
|
PluginID string
|
|
FileReference string
|
|
}
|
|
|
|
// GetPluginDashboardFileContentsResult get plugin dashboard file content result model.
|
|
type GetPluginDashboardFileContentsResult struct {
|
|
Content io.ReadCloser
|
|
}
|