Documentation ¶
Index ¶
- Variables
- func GetPluginReadme(pluginId string) ([]byte, error)
- func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
- func ImportDashboard(cmd *ImportDashboardCommand) error
- func Init() error
- func StartPluginUpdateChecker()
- type AppPlugin
- type AppPluginCss
- type AppPluginRoute
- type AppPluginRouteHeader
- type DashTemplateEvaluator
- type DashboardInputMissingError
- type DataSourcePlugin
- type EnabledPlugins
- type FrontendPluginBase
- type GithubLatest
- type GrafanaNetPlugin
- type ImportDashboardCommand
- type ImportDashboardInput
- type PanelPlugin
- type PluginBase
- type PluginDashboardInfoDTO
- type PluginDependencies
- type PluginDependencyItem
- type PluginInclude
- type PluginInfo
- type PluginInfoLink
- type PluginLoader
- type PluginLogos
- type PluginNotFoundError
- type PluginScanner
- type PluginScreenshots
- type PluginStaticRoute
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PluginTypeApp = "app" PluginTypeDatasource = "datasource" PluginTypePanel = "panel" PluginTypeDashboard = "dashboard" )
View Source
var ( DataSources map[string]*DataSourcePlugin Panels map[string]*PanelPlugin StaticRoutes []*PluginStaticRoute Apps map[string]*AppPlugin Plugins map[string]*PluginBase PluginTypes map[string]interface{} GrafanaLatestVersion string GrafanaHasUpdate bool )
Functions ¶
func GetPluginReadme ¶
func GetPluginSettings ¶
func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
func ImportDashboard ¶
func ImportDashboard(cmd *ImportDashboardCommand) error
func StartPluginUpdateChecker ¶
func StartPluginUpdateChecker()
Types ¶
type AppPlugin ¶
type AppPlugin struct { FrontendPluginBase Routes []*AppPluginRoute `json:"routes"` FoundChildPlugins []*PluginInclude `json:"-"` Pinned bool `json:"-"` }
type AppPluginCss ¶
type AppPluginRoute ¶
type AppPluginRouteHeader ¶
type DashTemplateEvaluator ¶
type DashTemplateEvaluator struct {
// contains filtered or unexported fields
}
func (*DashTemplateEvaluator) Eval ¶
func (this *DashTemplateEvaluator) Eval() (*simplejson.Json, error)
type DashboardInputMissingError ¶
type DashboardInputMissingError struct {
VariableName string
}
func (DashboardInputMissingError) Error ¶
func (e DashboardInputMissingError) Error() string
type DataSourcePlugin ¶
type EnabledPlugins ¶
type EnabledPlugins struct { Panels []*PanelPlugin DataSources map[string]*DataSourcePlugin Apps []*AppPlugin }
func GetEnabledPlugins ¶
func GetEnabledPlugins(orgId int64) (*EnabledPlugins, error)
func NewEnabledPlugins ¶
func NewEnabledPlugins() EnabledPlugins
type FrontendPluginBase ¶
type FrontendPluginBase struct {
PluginBase
}
type GithubLatest ¶
type GrafanaNetPlugin ¶
type ImportDashboardCommand ¶
type ImportDashboardCommand struct { Dashboard *simplejson.Json Path string Inputs []ImportDashboardInput Overwrite bool OrgId int64 UserId int64 PluginId string Result *PluginDashboardInfoDTO }
type ImportDashboardInput ¶
type PanelPlugin ¶
type PanelPlugin struct {
FrontendPluginBase
}
type PluginBase ¶
type PluginBase struct { Type string `json:"type"` Name string `json:"name"` Id string `json:"id"` Info PluginInfo `json:"info"` Dependencies PluginDependencies `json:"dependencies"` Includes []*PluginInclude `json:"includes"` Module string `json:"module"` BaseUrl string `json:"baseUrl"` HideFromList bool `json:"hideFromList"` State string `json:"state"` IncludedInAppId string `json:"-"` PluginDir string `json:"-"` IsCorePlugin bool `json:"-"` GrafanaNetVersion string `json:"-"` GrafanaNetHasUpdate bool `json:"-"` // cache for readme file contents Readme []byte `json:"-"` }
type PluginDashboardInfoDTO ¶
type PluginDashboardInfoDTO struct { PluginId string `json:"pluginId"` Title string `json:"title"` Imported bool `json:"imported"` ImportedUri string `json:"importedUri"` Slug string `json:"slug"` ImportedRevision int64 `json:"importedRevision"` Revision int64 `json:"revision"` Description string `json:"description"` Path string `json:"path"` Removed bool `json:"removed"` }
func GetPluginDashboards ¶
func GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDTO, error)
type PluginDependencies ¶
type PluginDependencies struct { GrafanaVersion string `json:"grafanaVersion"` Plugins []PluginDependencyItem `json:"plugins"` }
type PluginDependencyItem ¶
type PluginInclude ¶
type PluginInfo ¶
type PluginInfo struct { Author PluginInfoLink `json:"author"` Description string `json:"description"` Links []PluginInfoLink `json:"links"` Logos PluginLogos `json:"logos"` Screenshots []PluginScreenshots `json:"screenshots"` Version string `json:"version"` Updated string `json:"updated"` }
type PluginInfoLink ¶
type PluginLoader ¶
type PluginLogos ¶
type PluginNotFoundError ¶
type PluginNotFoundError struct {
PluginId string
}
func (PluginNotFoundError) Error ¶
func (e PluginNotFoundError) Error() string
type PluginScanner ¶
type PluginScanner struct {
// contains filtered or unexported fields
}
type PluginScreenshots ¶
type PluginStaticRoute ¶
Click to show internal directories.
Click to hide internal directories.