feat(plugins): worked on plugin dashboard import handling

This commit is contained in:
Torkel Ödegaard
2016-03-10 19:57:48 +01:00
parent 78b9c3004a
commit 60adcedebe
14 changed files with 189 additions and 84 deletions
+16
View File
@@ -3,12 +3,28 @@ package plugins
import (
"encoding/json"
"errors"
"fmt"
"strings"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/setting"
)
var (
PluginTypeApp = "app"
PluginTypeDatasource = "datasource"
PluginTypePanel = "panel"
PluginTypeDashboard = "dashboard"
)
type PluginNotFoundError struct {
PluginId string
}
func (e *PluginNotFoundError) Error() string {
return fmt.Sprintf("Plugin with id %s not found", e.PluginId)
}
type PluginLoader interface {
Load(decoder *json.Decoder, pluginDir string) error
}