mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix up imports
This commit is contained in:
parent
c4a0ec844c
commit
92a085550e
@ -2,7 +2,6 @@ package plugins
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/models"
|
"github.com/grafana/grafana/pkg/models"
|
||||||
)
|
)
|
||||||
|
@ -2,8 +2,6 @@ package plugins
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/models"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type PluginLoader interface {
|
type PluginLoader interface {
|
||||||
@ -44,20 +42,6 @@ type PluginStaticRoute struct {
|
|||||||
PluginId string
|
PluginId string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApiPluginRoute struct {
|
|
||||||
Path string `json:"path"`
|
|
||||||
Method string `json:"method"`
|
|
||||||
ReqSignedIn bool `json:"reqSignedIn"`
|
|
||||||
ReqGrafanaAdmin bool `json:"reqGrafanaAdmin"`
|
|
||||||
ReqRole models.RoleType `json:"reqRole"`
|
|
||||||
Url string `json:"url"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ApiPlugin struct {
|
|
||||||
PluginBase
|
|
||||||
Routes []*ApiPluginRoute `json:"routes"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EnabledPlugins struct {
|
type EnabledPlugins struct {
|
||||||
Panels []*PanelPlugin
|
Panels []*PanelPlugin
|
||||||
DataSources map[string]*DataSourcePlugin
|
DataSources map[string]*DataSourcePlugin
|
||||||
@ -73,12 +57,3 @@ func NewEnabledPlugins() EnabledPlugins {
|
|||||||
Apps: make([]*AppPlugin, 0),
|
Apps: make([]*AppPlugin, 0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *ApiPlugin) Load(decoder *json.Decoder, pluginDir string) error {
|
|
||||||
if err := decoder.Decode(&app); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiPlugins[app.Id] = app
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user