{"modulePath":"github.com/sqlatlas/gui","version":"v6.1.6+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plugins\n\n## Variables\n\n```go\nvar (\n\tPluginTypeApp        = \"app\"\n\tPluginTypeDatasource = \"datasource\"\n\tPluginTypePanel      = \"panel\"\n\tPluginTypeDashboard  = \"dashboard\"\n)\n```\n\n```go\nvar (\n\tDataSources  map[string]*DataSourcePlugin\n\tPanels       map[string]*PanelPlugin\n\tStaticRoutes []*PluginStaticRoute\n\tApps         map[string]*AppPlugin\n\tPlugins      map[string]*PluginBase\n\tPluginTypes  map[string]interface{}\n\tRenderer     *RendererPlugin\n\n\tGrafanaLatestVersion string\n\tGrafanaHasUpdate     bool\n)\n```\n\n## Functions\n\n```go\nfunc ComposePluginStartCommmand(executable string) string\n```\n\n```go\nfunc GetPluginMarkdown(pluginId string, name string) ([]byte, error)\n```\n\n```go\nfunc GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)\n```\n\n```go\nfunc ImportDashboard(cmd *ImportDashboardCommand) error\n```\n\n## Types\n\n```go\ntype AppPlugin struct {\n\tFrontendPluginBase\n\tRoutes []*AppPluginRoute `json:\"routes\"`\n\n\tFoundChildPlugins []*PluginInclude `json:\"-\"`\n\tPinned            bool             `json:\"-\"`\n}\n```\n\n```go\nfunc (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error\n```\n\n```go\ntype AppPluginCss struct {\n\tLight string `json:\"light\"`\n\tDark  string `json:\"dark\"`\n}\n```\n\n```go\ntype AppPluginRoute struct {\n\tPath         string                 `json:\"path\"`\n\tMethod       string                 `json:\"method\"`\n\tReqRole      models.RoleType        `json:\"reqRole\"`\n\tUrl          string                 `json:\"url\"`\n\tHeaders      []AppPluginRouteHeader `json:\"headers\"`\n\tTokenAuth    *JwtTokenAuth          `json:\"tokenAuth\"`\n\tJwtTokenAuth *JwtTokenAuth          `json:\"jwtTokenAuth\"`\n}\n```\n\n```go\ntype AppPluginRouteHeader struct {\n\tName    string `json:\"name\"`\n\tContent string `json:\"content\"`\n}\n```\n\n```go\ntype DashTemplateEvaluator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (this *DashTemplateEvaluator) Eval() (*simplejson.Json, error)\n```\n\n```go\ntype DashboardInputMissingError struct {\n\tVariableName string\n}\n```\n\n```go\nfunc (e DashboardInputMissingError) Error() string\n```\n\n```go\ntype DataSourcePlugin struct {\n\tFrontendPluginBase\n\tAnnotations  bool              `json:\"annotations\"`\n\tMetrics      bool              `json:\"metrics\"`\n\tAlerting     bool              `json:\"alerting\"`\n\tExplore      bool              `json:\"explore\"`\n\tTable        bool              `json:\"tables\"`\n\tLogs         bool              `json:\"logs\"`\n\tQueryOptions map[string]bool   `json:\"queryOptions,omitempty\"`\n\tBuiltIn      bool              `json:\"builtIn,omitempty\"`\n\tMixed        bool              `json:\"mixed,omitempty\"`\n\tRoutes       []*AppPluginRoute `json:\"routes\"`\n\n\tBackend    bool   `json:\"backend,omitempty\"`\n\tExecutable string `json:\"executable,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nDataSourcePlugin contains all metadata about a datasource plugin\n\n```go\nfunc (p *DataSourcePlugin) Kill()\n```\n\n```go\nfunc (p *DataSourcePlugin) Load(decoder *json.Decoder, pluginDir string) error\n```\n\n```go\ntype EnabledPlugins struct {\n\tPanels      []*PanelPlugin\n\tDataSources map[string]*DataSourcePlugin\n\tApps        []*AppPlugin\n}\n```\n\n```go\nfunc GetEnabledPlugins(orgId int64) (*EnabledPlugins, error)\n```\n\n```go\nfunc NewEnabledPlugins() EnabledPlugins\n```\n\n```go\ntype FrontendPluginBase struct {\n\tPluginBase\n}\n```\n\n```go\ntype GithubLatest struct {\n\tStable  string `json:\"stable\"`\n\tTesting string `json:\"testing\"`\n}\n```\n\n```go\ntype GrafanaNetPlugin struct {\n\tSlug    string `json:\"slug\"`\n\tVersion string `json:\"version\"`\n}\n```\n\n```go\ntype ImportDashboardCommand struct {\n\tDashboard *simplejson.Json\n\tPath      string\n\tInputs    []ImportDashboardInput\n\tOverwrite bool\n\tFolderId  int64\n\n\tOrgId    int64\n\tUser     *m.SignedInUser\n\tPluginId string\n\tResult   *PluginDashboardInfoDTO\n}\n```\n\n```go\ntype ImportDashboardInput struct {\n\tType     string `json:\"type\"`\n\tPluginId string `json:\"pluginId\"`\n\tName     string `json:\"name\"`\n\tValue    string `json:\"value\"`\n}\n```\n\n```go\ntype JwtTokenAuth struct {\n\tUrl    string            `json:\"url\"`\n\tScopes []string          `json:\"scopes\"`\n\tParams map[string]string `json:\"params\"`\n}\n```\nJwtTokenAuth struct is both for normal Token Auth and JWT Token Auth with an uploaded JWT file.\n\n```go\ntype LogWrapper struct {\n\tLogger glog.Logger\n}\n```\n\n```go\nfunc (lw LogWrapper) Debug(msg string, args ...interface{})\n```\n\n```go\nfunc (lw LogWrapper) Error(msg string, args ...interface{})\n```\n\n```go\nfunc (lw LogWrapper) Info(msg string, args ...interface{})\n```\n\n```go\nfunc (lw LogWrapper) IsDebug() bool\n```\n\n```go\nfunc (lw LogWrapper) IsError() bool\n```\n\n```go\nfunc (lw LogWrapper) IsInfo() bool\n```\n\n```go\nfunc (lw LogWrapper) IsTrace() bool\n```\n\n```go\nfunc (lw LogWrapper) IsWarn() bool\n```\n\n```go\nfunc (lw LogWrapper) Named(name string) hclog.Logger\n```\n\n```go\nfunc (lw LogWrapper) ResetNamed(name string) hclog.Logger\n```\n\n```go\nfunc (lw LogWrapper) StandardLogger(ops *hclog.StandardLoggerOptions) *log.Logger\n```\n\n```go\nfunc (lw LogWrapper) Trace(msg string, args ...interface{})\n```\n\n```go\nfunc (lw LogWrapper) Warn(msg string, args ...interface{})\n```\n\n```go\nfunc (lw LogWrapper) With(args ...interface{}) hclog.Logger\n```\n\n```go\ntype PanelPlugin struct {\n\tFrontendPluginBase\n\tDataFormats []string `json:\"dataFormats\"`\n}\n```\n\n```go\nfunc (p *PanelPlugin) Load(decoder *json.Decoder, pluginDir string) error\n```\n\n```go\ntype PluginBase struct {\n\tType         string             `json:\"type\"`\n\tName         string             `json:\"name\"`\n\tId           string             `json:\"id\"`\n\tInfo         PluginInfo         `json:\"info\"`\n\tDependencies PluginDependencies `json:\"dependencies\"`\n\tIncludes     []*PluginInclude   `json:\"includes\"`\n\tModule       string             `json:\"module\"`\n\tBaseUrl      string             `json:\"baseUrl\"`\n\tHideFromList bool               `json:\"hideFromList,omitempty\"`\n\tState        PluginState        `json:\"state,omitempty\"`\n\n\tIncludedInAppId string `json:\"-\"`\n\tPluginDir       string `json:\"-\"`\n\tDefaultNavUrl   string `json:\"-\"`\n\tIsCorePlugin    bool   `json:\"-\"`\n\n\tGrafanaNetVersion   string `json:\"-\"`\n\tGrafanaNetHasUpdate bool   `json:\"-\"`\n}\n```\n\n```go\ntype PluginDashboardInfoDTO struct {\n\tPluginId         string `json:\"pluginId\"`\n\tTitle            string `json:\"title\"`\n\tImported         bool   `json:\"imported\"`\n\tImportedUri      string `json:\"importedUri\"`\n\tImportedUrl      string `json:\"importedUrl\"`\n\tSlug             string `json:\"slug\"`\n\tDashboardId      int64  `json:\"dashboardId\"`\n\tFolderId         int64  `json:\"folderId\"`\n\tImportedRevision int64  `json:\"importedRevision\"`\n\tRevision         int64  `json:\"revision\"`\n\tDescription      string `json:\"description\"`\n\tPath             string `json:\"path\"`\n\tRemoved          bool   `json:\"removed\"`\n}\n```\n\n```go\nfunc GetPluginDashboards(orgId int64, pluginId string) ([]*PluginDashboardInfoDTO, error)\n```\n\n```go\ntype PluginDependencies struct {\n\tGrafanaVersion string                 `json:\"grafanaVersion\"`\n\tPlugins        []PluginDependencyItem `json:\"plugins\"`\n}\n```\n\n```go\ntype PluginDependencyItem struct {\n\tType    string `json:\"type\"`\n\tId      string `json:\"id\"`\n\tName    string `json:\"name\"`\n\tVersion string `json:\"version\"`\n}\n```\n\n```go\ntype PluginInclude struct {\n\tName       string     `json:\"name\"`\n\tPath       string     `json:\"path\"`\n\tType       string     `json:\"type\"`\n\tComponent  string     `json:\"component\"`\n\tRole       m.RoleType `json:\"role\"`\n\tAddToNav   bool       `json:\"addToNav\"`\n\tDefaultNav bool       `json:\"defaultNav\"`\n\tSlug       string     `json:\"slug\"`\n\n\tId string `json:\"-\"`\n}\n```\n\n```go\ntype PluginInfo struct {\n\tAuthor      PluginInfoLink      `json:\"author\"`\n\tDescription string              `json:\"description\"`\n\tLinks       []PluginInfoLink    `json:\"links\"`\n\tLogos       PluginLogos         `json:\"logos\"`\n\tScreenshots []PluginScreenshots `json:\"screenshots\"`\n\tVersion     string              `json:\"version\"`\n\tUpdated     string              `json:\"updated\"`\n}\n```\n\n```go\ntype PluginInfoLink struct {\n\tName string `json:\"name\"`\n\tUrl  string `json:\"url\"`\n}\n```\n\n```go\ntype PluginLoader interface {\n\tLoad(decoder *json.Decoder, pluginDir string) error\n}\n```\n\n```go\ntype PluginLogos struct {\n\tSmall string `json:\"small\"`\n\tLarge string `json:\"large\"`\n}\n```\n\n```go\ntype PluginManager struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (pm *PluginManager) Init() error\n```\n\n```go\nfunc (pm *PluginManager) Run(ctx context.Context) error\n```\n\n```go\ntype PluginNotFoundError struct {\n\tPluginId string\n}\n```\n\n```go\nfunc (e PluginNotFoundError) Error() string\n```\n\n```go\ntype PluginScanner struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype PluginScreenshots struct {\n\tPath string `json:\"path\"`\n\tName string `json:\"name\"`\n}\n```\n\n```go\ntype PluginState string\n```\n\n```go\nvar (\n\tPluginStateAlpha PluginState = \"alpha\"\n\tPluginStateBeta  PluginState = \"beta\"\n)\n```\n\n```go\ntype PluginStaticRoute struct {\n\tDirectory string\n\tPluginId  string\n}\n```\n\n```go\ntype RendererPlugin struct {\n\tPluginBase\n\n\tExecutable string `json:\"executable,omitempty\"`\n}\n```\n\n```go\nfunc (r *RendererPlugin) Load(decoder *json.Decoder, pluginDir string) error\n```\n\n","path":"github.com/sqlatlas/gui/pkg/plugins","name":"plugins","synopsis":"","isRedistributable":true}
