 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func ComposePluginStartCommmand(executable string) string
- func GetPluginMarkdown(pluginId string, name string) ([]byte, error)
- func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
- func ImportDashboard(cmd *ImportDashboardCommand) error
- 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 JwtTokenAuth
- type LogWrapper
- func (lw LogWrapper) Debug(msg string, args ...interface{})
- func (lw LogWrapper) Error(msg string, args ...interface{})
- func (lw LogWrapper) Info(msg string, args ...interface{})
- func (lw LogWrapper) IsDebug() bool
- func (lw LogWrapper) IsError() bool
- func (lw LogWrapper) IsInfo() bool
- func (lw LogWrapper) IsTrace() bool
- func (lw LogWrapper) IsWarn() bool
- func (lw LogWrapper) Named(name string) hclog.Logger
- func (lw LogWrapper) ResetNamed(name string) hclog.Logger
- func (lw LogWrapper) StandardLogger(ops *hclog.StandardLoggerOptions) *log.Logger
- func (lw LogWrapper) Trace(msg string, args ...interface{})
- func (lw LogWrapper) Warn(msg string, args ...interface{})
- func (lw LogWrapper) With(args ...interface{}) hclog.Logger
 
- type PanelPlugin
- type PluginBase
- type PluginDashboardInfoDTO
- type PluginDependencies
- type PluginDependencyItem
- type PluginInclude
- type PluginInfo
- type PluginInfoLink
- type PluginLoader
- type PluginLogos
- type PluginManager
- type PluginNotFoundError
- type PluginScanner
- type PluginScreenshots
- type PluginState
- type PluginStaticRoute
- type RendererPlugin
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{} Renderer *RendererPlugin GrafanaLatestVersion string GrafanaHasUpdate bool )
Functions ¶
func GetPluginSettings ¶
func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
func ImportDashboard ¶
func ImportDashboard(cmd *ImportDashboardCommand) error
Types ¶
type AppPlugin ¶
type AppPlugin struct {
	FrontendPluginBase
	Routes []*AppPluginRoute `json:"routes"`
	FoundChildPlugins []*PluginInclude `json:"-"`
	Pinned            bool             `json:"-"`
}
    type AppPluginCss ¶
type AppPluginRoute ¶
type AppPluginRoute struct {
	Path         string                 `json:"path"`
	Method       string                 `json:"method"`
	ReqRole      models.RoleType        `json:"reqRole"`
	Url          string                 `json:"url"`
	Headers      []AppPluginRouteHeader `json:"headers"`
	TokenAuth    *JwtTokenAuth          `json:"tokenAuth"`
	JwtTokenAuth *JwtTokenAuth          `json:"jwtTokenAuth"`
}
    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 DataSourcePlugin struct {
	FrontendPluginBase
	Annotations  bool              `json:"annotations"`
	Metrics      bool              `json:"metrics"`
	Alerting     bool              `json:"alerting"`
	Explore      bool              `json:"explore"`
	Table        bool              `json:"tables"`
	Logs         bool              `json:"logs"`
	QueryOptions map[string]bool   `json:"queryOptions,omitempty"`
	BuiltIn      bool              `json:"builtIn,omitempty"`
	Mixed        bool              `json:"mixed,omitempty"`
	Routes       []*AppPluginRoute `json:"routes"`
	Backend    bool   `json:"backend,omitempty"`
	Executable string `json:"executable,omitempty"`
	// contains filtered or unexported fields
}
    DataSourcePlugin contains all metadata about a datasource plugin
func (*DataSourcePlugin) Kill ¶
func (p *DataSourcePlugin) Kill()
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
	FolderId  int64
	OrgId    int64
	User     *m.SignedInUser
	PluginId string
	Result   *PluginDashboardInfoDTO
}
    type ImportDashboardInput ¶
type JwtTokenAuth ¶
type JwtTokenAuth struct {
	Url    string            `json:"url"`
	Scopes []string          `json:"scopes"`
	Params map[string]string `json:"params"`
}
    JwtTokenAuth struct is both for normal Token Auth and JWT Token Auth with an uploaded JWT file.
type LogWrapper ¶
func (LogWrapper) Debug ¶
func (lw LogWrapper) Debug(msg string, args ...interface{})
func (LogWrapper) Error ¶
func (lw LogWrapper) Error(msg string, args ...interface{})
func (LogWrapper) Info ¶
func (lw LogWrapper) Info(msg string, args ...interface{})
func (LogWrapper) IsDebug ¶
func (lw LogWrapper) IsDebug() bool
func (LogWrapper) IsError ¶
func (lw LogWrapper) IsError() bool
func (LogWrapper) IsInfo ¶
func (lw LogWrapper) IsInfo() bool
func (LogWrapper) IsTrace ¶
func (lw LogWrapper) IsTrace() bool
func (LogWrapper) IsWarn ¶
func (lw LogWrapper) IsWarn() bool
func (LogWrapper) ResetNamed ¶
func (lw LogWrapper) ResetNamed(name string) hclog.Logger
func (LogWrapper) StandardLogger ¶
func (lw LogWrapper) StandardLogger(ops *hclog.StandardLoggerOptions) *log.Logger
func (LogWrapper) Trace ¶
func (lw LogWrapper) Trace(msg string, args ...interface{})
func (LogWrapper) Warn ¶
func (lw LogWrapper) Warn(msg string, args ...interface{})
func (LogWrapper) With ¶
func (lw LogWrapper) With(args ...interface{}) hclog.Logger
type PanelPlugin ¶
type PanelPlugin struct {
	FrontendPluginBase
	DataFormats []string `json:"dataFormats"`
}
    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,omitempty"`
	State        PluginState        `json:"state,omitempty"`
	IncludedInAppId string `json:"-"`
	PluginDir       string `json:"-"`
	IsCorePlugin    bool   `json:"-"`
	GrafanaNetVersion   string `json:"-"`
	GrafanaNetHasUpdate bool   `json:"-"`
}
    type PluginDashboardInfoDTO ¶
type PluginDashboardInfoDTO struct {
	PluginId         string `json:"pluginId"`
	Title            string `json:"title"`
	Imported         bool   `json:"imported"`
	ImportedUri      string `json:"importedUri"`
	ImportedUrl      string `json:"importedUrl"`
	Slug             string `json:"slug"`
	DashboardId      int64  `json:"dashboardId"`
	FolderId         int64  `json:"folderId"`
	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 PluginManager ¶
type PluginManager struct {
	// contains filtered or unexported fields
}
    func (*PluginManager) Init ¶
func (pm *PluginManager) Init() error
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 PluginState ¶
type PluginState string
var ( PluginStateAlpha PluginState = "alpha" PluginStateBeta PluginState = "beta" )
type PluginStaticRoute ¶
type RendererPlugin ¶
type RendererPlugin struct {
	PluginBase
	Executable string `json:"executable,omitempty"`
}
    
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.