Documentation ¶
Index ¶
- Variables
- type DataSourcePlugin
- type EnabledPlugins
- type FrontendPluginBase
- type JwtTokenAuth
- type PanelPlugin
- type PluginBase
- type PluginBuildInfo
- type PluginDependencies
- type PluginDependencyItem
- type PluginInclude
- type PluginInfo
- type PluginInfoLink
- type PluginLoader
- type PluginLogos
- type PluginManager
- type PluginNotFoundError
- type PluginRoute
- type PluginRouteHeader
- type PluginRouteURLParam
- type PluginScanner
- type PluginScreenshots
- type PluginSignature
- type PluginState
- 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 Plugins map[string]*PluginBase PluginTypes map[string]interface{} StaticRoutes []*PluginStaticRoute )
Functions ¶
This section is empty.
Types ¶
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"` Tracing bool `json:"tracing"` QueryOptions map[string]bool `json:"queryOptions,omitempty"` BuiltIn bool `json:"builtIn,omitempty"` Mixed bool `json:"mixed,omitempty"` Routes []*PluginRoute `json:"routes"` Streaming bool `json:"streaming"` Executable string `json:"executable,omitempty"` SDK bool `json:"sdk,omitempty"` }
type EnabledPlugins ¶
type EnabledPlugins struct { Panels []*PanelPlugin DataSources map[string]*DataSourcePlugin }
func NewEnabledPlugins ¶
func NewEnabledPlugins() EnabledPlugins
type FrontendPluginBase ¶
type FrontendPluginBase struct {
PluginBase
}
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 PanelPlugin ¶
type PanelPlugin struct { FrontendPluginBase SkipDataQuery bool `json:"skipDataQuery"` }
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"` Category string `json:"category"` HideFromList bool `json:"hideFromList,omitempty"` Preload bool `json:"preload"` State PluginState `json:"state,omitempty"` Signature PluginSignature `json:"signature"` IncludedInAppId string `json:"-"` PluginDir string `json:"-"` IsCorePlugin bool `json:"-"` GrafanaNetVersion string `json:"-"` GrafanaNetHasUpdate bool `json:"-"` }
type PluginBuildInfo ¶
type PluginDependencies ¶
type PluginDependencies struct { DatavVersion 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"` Build PluginBuildInfo `json:"build"` 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 (p *PluginManager) Init() error
type PluginNotFoundError ¶
type PluginNotFoundError struct {
PluginId string
}
func (PluginNotFoundError) Error ¶
func (e PluginNotFoundError) Error() string
type PluginRoute ¶
type PluginRoute struct { Path string `json:"path"` Method string `json:"method"` ReqRole models.RoleType `json:"reqRole"` URL string `json:"url"` URLParams []PluginRouteURLParam `json:"urlParams"` Headers []PluginRouteHeader `json:"headers"` TokenAuth *JwtTokenAuth `json:"tokenAuth"` JwtTokenAuth *JwtTokenAuth `json:"jwtTokenAuth"` }
type PluginRouteHeader ¶
PluginRouteHeader describes an HTTP header that is forwarded with the proxied request for a plugin route
type PluginRouteURLParam ¶
PluginRouteURLParam describes query string parameters for a url in a plugin route
type PluginScanner ¶
type PluginScanner struct {
// contains filtered or unexported fields
}
type PluginScreenshots ¶
type PluginSignature ¶
type PluginSignature string
const ( PluginSignatureInternal PluginSignature = "internal" // core plugin, no signature PluginSignatureValid PluginSignature = "valid" // signed and accurate MANIFEST PluginSignatureInvalid PluginSignature = "invalid" // invalid signature PluginSignatureModified PluginSignature = "modified" // valid signature, but content mismatch PluginSignatureUnsigned PluginSignature = "unsigned" // no MANIFEST file )
type PluginState ¶
type PluginState string
var ( PluginStateAlpha PluginState = "alpha" PluginStateBeta PluginState = "beta" )
type PluginStaticRoute ¶
Click to show internal directories.
Click to hide internal directories.