config

package
v1.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SaToken = "saToken"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppURL              string `env:"GF_REPORTER_PLUGIN_APP_URL, overwrite"                json:"appUrl"`
	SkipTLSCheck        bool   `env:"GF_REPORTER_PLUGIN_SKIP_TLS_CHECK, overwrite"         json:"skipTlsCheck"`
	Theme               string `env:"GF_REPORTER_PLUGIN_REPORT_THEME, overwrite"           json:"theme"`
	Orientation         string `env:"GF_REPORTER_PLUGIN_REPORT_ORIENTATION, overwrite"     json:"orientation"`
	Layout              string `env:"GF_REPORTER_PLUGIN_REPORT_LAYOUT, overwrite"          json:"layout"`
	DashboardMode       string `env:"GF_REPORTER_PLUGIN_REPORT_DASHBOARD_MODE, overwrite"  json:"dashboardMode"`
	TimeZone            string `env:"GF_REPORTER_PLUGIN_REPORT_TIMEZONE, overwrite"        json:"timeZone"`
	TimeFormat          string `env:"GF_REPORTER_PLUGIN_REPORT_TIMEFORMAT, overwrite"      json:"timeFormat"`
	HeaderTemplate      string `env:"GF_REPORTER_PLUGIN_REPORT_HEADER_TEMPLATE, overwrite" json:"headerTemplate"`
	FooterTemplate      string `env:"GF_REPORTER_PLUGIN_REPORT_FOOTER_TEMPLATE, overwrite" json:"footerTemplate"`
	MaxBrowserWorkers   int    `env:"GF_REPORTER_PLUGIN_MAX_BROWSER_WORKERS, overwrite"    json:"maxBrowserWorkers"`
	MaxRenderWorkers    int    `env:"GF_REPORTER_PLUGIN_MAX_RENDER_WORKERS, overwrite"     json:"maxRenderWorkers"`
	RemoteChromeURL     string `env:"GF_REPORTER_PLUGIN_REMOTE_CHROME_URL, overwrite"      json:"remoteChromeUrl"`
	NativeRendering     bool   `env:"GF_REPORTER_PLUGIN_NATIVE_RENDERER, overwrite"        json:"nativeRenderer"`
	AppVersion          string `json:"appVersion"`
	IncludePanelIDs     []string
	ExcludePanelIDs     []string
	IncludePanelDataIDs []string

	// Time location
	Location *time.Location

	// HTTP Client
	HTTPClientOptions httpclient.Options

	// Secrets
	Token string
}

Config contains plugin settings.

func Load

func Load(ctx context.Context, settings backend.AppInstanceSettings) (Config, error)

Load loads the plugin settings from data sent by provisioned config or from Grafana UI.

func (*Config) String

func (c *Config) String() string

String implements the stringer interface of Config.

func (*Config) Validate added in v1.7.1

func (c *Config) Validate() error

Validate checks current settings and sets them to defaults for invalid ones.

Jump to

Keyboard shortcuts

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