Documentation ¶
Index ¶
- type BasePluginContextProvider
- type BaseProvider
- type Provider
- func (p *Provider) Get(ctx context.Context, pluginID string, user identity.Requester, orgID int64) (backend.PluginContext, error)
- func (p *Provider) GetDataSourceInstanceSettings(ctx context.Context, uid string) (*backend.DataSourceInstanceSettings, error)
- func (p *Provider) GetWithDataSource(ctx context.Context, pluginID string, user identity.Requester, ...) (backend.PluginContext, error)
- func (p *Provider) InvalidateSettingsCache(_ context.Context, pluginID string)
- func (p *Provider) PluginContextForDataSource(ctx context.Context, datasourceSettings *backend.DataSourceInstanceSettings) (backend.PluginContext, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasePluginContextProvider ¶
type BasePluginContextProvider interface { // GetBasePluginContext returns a plugin context for the given plugin and user. // It does not add DatasourceInstaceSettings or AppInstanceSettings GetBasePluginContext(ctx context.Context, plugin pluginstore.Plugin, user identity.Requester) backend.PluginContext }
type BaseProvider ¶
type BaseProvider struct {
// contains filtered or unexported fields
}
func ProvideBaseService ¶
func ProvideBaseService(cfg *setting.Cfg, pluginRequestConfigProvider pluginconfig.PluginRequestConfigProvider) *BaseProvider
func (*BaseProvider) GetBasePluginContext ¶
func (p *BaseProvider) GetBasePluginContext(ctx context.Context, plugin pluginstore.Plugin, user identity.Requester) backend.PluginContext
type Provider ¶
type Provider struct { *BaseProvider // contains filtered or unexported fields }
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, cacheService *localcache.CacheService, pluginStore pluginstore.Store, dataSourceCache datasources.CacheService, dataSourceService datasources.DataSourceService, pluginSettingsService pluginsettings.Service, pluginRequestConfigProvider pluginconfig.PluginRequestConfigProvider) *Provider
func (*Provider) Get ¶
func (p *Provider) Get(ctx context.Context, pluginID string, user identity.Requester, orgID int64) (backend.PluginContext, error)
Get will retrieve plugin context by the provided pluginID and orgID. This is intended to be used for app plugin requests. PluginContext.AppInstanceSettings will be resolved and appended to the returned context. Note: identity.Requester can be nil.
func (*Provider) GetDataSourceInstanceSettings ¶
func (*Provider) GetWithDataSource ¶
func (p *Provider) GetWithDataSource(ctx context.Context, pluginID string, user identity.Requester, ds *datasources.DataSource) (backend.PluginContext, error)
GetWithDataSource will retrieve plugin context by the provided pluginID and datasource. This is intended to be used for datasource plugin requests. PluginContext.DataSourceInstanceSettings will be resolved and appended to the returned context. Note: identity.Requester can be nil.
func (*Provider) InvalidateSettingsCache ¶
func (*Provider) PluginContextForDataSource ¶
func (p *Provider) PluginContextForDataSource(ctx context.Context, datasourceSettings *backend.DataSourceInstanceSettings) (backend.PluginContext, error)
PluginContextForDataSource will retrieve plugin context by the provided pluginID and datasource UID / K8s name. This is intended to be used for datasource API server plugin requests.