plugincontext

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPluginNotFound = errors.New("plugin not found")

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func ProvideService

func ProvideService(cacheService *localcache.CacheService, pluginStore plugins.Store,
	dataSourceService datasources.DataSourceService, pluginSettingsService pluginsettings.Service) *Provider

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, pluginID string, user *user.SignedInUser, orgID int64) (backend.PluginContext, error)

Get allows getting plugin context by its ID. If datasourceUID is not empty string then PluginContext.DataSourceInstanceSettings will be resolved and appended to returned context. Note: *user.SignedInUser can be nil.

func (*Provider) GetWithDataSource

func (p *Provider) GetWithDataSource(ctx context.Context, pluginID string, user *user.SignedInUser, ds *datasources.DataSource) (backend.PluginContext, error)

GetWithDataSource allows getting plugin context by its ID and PluginContext.DataSourceInstanceSettings will be resolved and appended to the returned context. Note: *user.SignedInUser can be nil.

func (*Provider) InvalidateSettingsCache

func (p *Provider) InvalidateSettingsCache(_ context.Context, pluginID string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL