pluginstore

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePluginStore

type FakePluginStore struct {
	PluginList []Plugin
}

func NewFakePluginStore

func NewFakePluginStore(ps ...Plugin) *FakePluginStore

func (*FakePluginStore) Plugin

func (pr *FakePluginStore) Plugin(_ context.Context, pluginID string) (Plugin, bool)

func (*FakePluginStore) Plugins

func (pr *FakePluginStore) Plugins(_ context.Context, pluginTypes ...plugins.Type) []Plugin

type Plugin

type Plugin struct {
	plugins.JSONData

	Class plugins.Class

	// App fields
	IncludedInAppID string
	DefaultNavURL   string
	Pinned          bool

	// Signature fields
	Signature     plugins.SignatureStatus
	SignatureType plugins.SignatureType
	SignatureOrg  string

	Error *plugins.Error

	// SystemJS fields
	Module  string
	BaseURL string

	Angular plugins.AngularMeta

	ExternalService *auth.ExternalService
	// contains filtered or unexported fields
}

func ToGrafanaDTO

func ToGrafanaDTO(p *plugins.Plugin) Plugin

func (Plugin) Base

func (p Plugin) Base() string

func (Plugin) IsApp

func (p Plugin) IsApp() bool

func (Plugin) IsCorePlugin

func (p Plugin) IsCorePlugin() bool

func (Plugin) SupportsStreaming

func (p Plugin) SupportsStreaming() bool

type Service

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

func New

func New(pluginRegistry registry.Service, pluginLoader loader.Service) *Service

func ProvideService

func ProvideService(pluginRegistry registry.Service, pluginSources sources.Registry,
	pluginLoader loader.Service) (*Service, error)

func (*Service) Plugin

func (s *Service) Plugin(ctx context.Context, pluginID string) (Plugin, bool)

func (*Service) Plugins

func (s *Service) Plugins(ctx context.Context, pluginTypes ...plugins.Type) []Plugin

func (*Service) Routes

func (s *Service) Routes(ctx context.Context) []*plugins.StaticRoute

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

func (*Service) SecretsManager

func (s *Service) SecretsManager(ctx context.Context) *plugins.Plugin

type Store

type Store interface {
	// Plugin finds a plugin by its ID.
	// Note: version is not required since Grafana only supports single versions of a plugin.
	Plugin(ctx context.Context, pluginID string) (Plugin, bool)
	// Plugins returns plugins by their requested type.
	Plugins(ctx context.Context, pluginTypes ...plugins.Type) []Plugin
}

Store is the publicly accessible storage for plugins.

Jump to

Keyboard shortcuts

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