detector

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector added in v0.8.1

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

Detector can detect Angular plugins in Grafana dashboards.

func NewDetector added in v0.8.1

func NewDetector(log *logger.LeveledLogger, grafanaClient GrafanaDetectorAPIClient, gcomClient gcom.APIClient, maxConcurrency int) *Detector

NewDetector returns a new Detector.

func (*Detector) Run added in v0.8.1

func (d *Detector) Run(ctx context.Context) ([]output.Dashboard, error)

Run runs the angular detector tool against the specified Grafana instance.

type GrafanaDetectorAPIClient added in v0.9.0

type GrafanaDetectorAPIClient interface {
	BaseURL() string
	GetPlugins(ctx context.Context) ([]grafana.Plugin, error)
	GetFrontendSettings(ctx context.Context) (*grafana.FrontendSettings, error)
	GetServiceAccountPermissions(ctx context.Context) (map[string][]string, error)
	GetDatasourcePluginIDs(ctx context.Context) ([]grafana.Datasource, error)
	GetDashboards(ctx context.Context, page int) ([]grafana.ListedDashboard, error)
	GetDashboard(ctx context.Context, uid string) (*grafana.DashboardDefinition, error)
}

GrafanaDetectorAPIClient is an interface that can be used to interact with the Grafana API for detecting Angular plugins.

Jump to

Keyboard shortcuts

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