kiosk

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateURL

func GenerateURL(cfg *Config) string

GenerateURL constructs URL with appropriate parameters for kiosk mode.

func GetExecutor added in v1.0.5

func GetExecutor(ctx context.Context) context.Context

GetExecutor returns executor for chromedp

func GrafanaKioskAPIKey added in v1.0.7

func GrafanaKioskAPIKey(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskAPIKey creates a chrome-based kiosk using a grafana api key.

func GrafanaKioskAWSLogin added in v1.0.7

func GrafanaKioskAWSLogin(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskAWSLogin Provides login for AWS Managed Grafana instances

func GrafanaKioskAnonymous

func GrafanaKioskAnonymous(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskAnonymous creates a chrome-based kiosk using a local grafana-server account.

func GrafanaKioskAzureAD added in v1.0.11

func GrafanaKioskAzureAD(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskAzureAD creates a chrome-based kiosk using an Azure Active Directory authenticated account.

func GrafanaKioskGCOM

func GrafanaKioskGCOM(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskGCOM creates a chrome-based kiosk using a grafana.com authenticated account.

func GrafanaKioskGenericOauth added in v1.0.3

func GrafanaKioskGenericOauth(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskGenericOauth creates a chrome-based kiosk using a oauth2 authenticated account.

func GrafanaKioskIDToken added in v1.0.5

func GrafanaKioskIDToken(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskIDToken creates a chrome-based kiosk using a oauth2 authenticated account.

func GrafanaKioskLocal

func GrafanaKioskLocal(ctx context.Context, cfg *Config, dir string, messages chan string)

GrafanaKioskLocal creates a chrome-based kiosk using a local grafana-server account.

func IsDataSourceQueryRequest added in v1.0.12

func IsDataSourceQueryRequest(requestURL, targetScheme, targetHost string) bool

IsDataSourceQueryRequest checks if the request URL is a datasource query API call to the target host. It matches both the legacy /api/ds/query path and the newer /apis/query.grafana.app/.../query path.

func IsTargetHostRequest added in v1.0.12

func IsTargetHostRequest(requestHost, targetHost string) bool

IsTargetHostRequest checks if the request URL host matches the target host.

func LocalLoginBypassURL added in v1.0.12

func LocalLoginBypassURL(rawURL string) string

LocalLoginBypassURL extracts the base URL and appends /login/local to bypass OAuth auto-login and use a local account instead.

Types

type APIKey added in v1.0.7

type APIKey struct {
	APIKey string `yaml:"apikey" env:"KIOSK_APIKEY_APIKEY" env-description:"APIKEY"`
}

APIKey APIKey for login

type BuildInfo added in v1.0.7

type BuildInfo struct {
	Version string `yaml:"version,omitempty"`
}

BuildInfo contains the build version

type Config added in v1.0.2

type Config struct {
	BuildInfo BuildInfo `yaml:"buildinfo"`
	General   General   `yaml:"general"`
	Target    Target    `yaml:"target"`
	GoAuth    GoAuth    `yaml:"goauth"`
	IDToken   IDToken   `yaml:"idtoken"`
	APIKey    APIKey    `yaml:"apikey"`
}

Config configuration for backend.

type General added in v1.0.7

type General struct {
	AutoFit         bool   `yaml:"autofit" env:"KIOSK_AUTOFIT" env-default:"true" env-description:"fit panels to screen"`
	HideVariables   bool   `yaml:"hide-variables" env:"KIOSK_HIDE_VARIABLES" env-default:"false" env-description:"Hide variables in the top nav bar"`
	HideLinks       bool   `yaml:"hide-links" env:"KIOSK_HIDE_LINKS" env-default:"false" env-description:"Hide links in the top nav bar"`
	HidePlaylistNav bool   `` /* 126-byte string literal not displayed */
	HideTimePicker  bool   `` /* 126-byte string literal not displayed */
	Incognito       bool   `yaml:"incognito" env:"KIOSK_INCOGNITO" env-default:"true" env-description:"use incognito mode"`
	DebugEnabled    bool   `yaml:"debug" env:"KIOSK_DEBUG" env-default:"false" env-description:"enables debug output"`
	GPUEnabled      bool   `yaml:"gpu-enabled" env:"KIOSK_GPU_ENABLED" env-default:"false" env-description:"disable GPU support"`
	LXDEEnabled     bool   `yaml:"lxde" env:"KIOSK_LXDE_ENABLED" env-default:"false" env-description:"initialize LXDE for kiosk mode"`
	LXDEHome        string `` /* 132-byte string literal not displayed */
	Mode            string `yaml:"kiosk-mode" env:"KIOSK_MODE" env-default:"full" env-description:"[full|tv|disabled]"`
	OzonePlatform   string `` /* 138-byte string literal not displayed */
	PageLoadDelayMS int64  `` /* 141-byte string literal not displayed */
	ScaleFactor     string `yaml:"scale-factor" env:"KIOSK_SCALE_FACTOR" env-default:"1.0" env-description:"Scale factor, like zoom"`
	WindowPosition  string `yaml:"window-position" env:"KIOSK_WINDOW_POSITION" env-default:"0,0" env-description:"Top Left Position of Kiosk"`
	WindowSize      string `yaml:"window-size" env:"KIOSK_WINDOW_SIZE" env-default:"" env-description:"Size of Kiosk in pixels (width,height)"`
}

General non-site specific configurations

type GoAuth added in v1.0.7

type GoAuth struct {
	AutoLogin                       bool   `yaml:"auto-login" env:"KIOSK_GOAUTH_AUTO_LOGIN" env-description:"[false|true]"`
	UsernameField                   string `yaml:"fieldname-username" env:"KIOSK_GOAUTH_FIELD_USER" env-description:"Username html input name value"`
	PasswordField                   string `yaml:"fieldname-password" env:"KIOSK_GOAUTH_FIELD_PASSWORD" env-description:"Password html input name value"`
	WaitForPasswordField            bool   `` /* 151-byte string literal not displayed */
	WaitForPasswordFieldIgnoreClass string `` /* 164-byte string literal not displayed */
	WaitForStaySignedInPrompt       bool   `` /* 197-byte string literal not displayed */
}

GoAuth OAuth

type IDToken added in v1.0.7

type IDToken struct {
	KeyFile  string `yaml:"idtoken-keyfile" env:"KIOSK_IDTOKEN_KEYFILE" env-default:"key.json" env-description:"JSON Credentials for idtoken"`
	Audience string `yaml:"idtoken-audience" env:"KIOSK_IDTOKEN_AUDIENCE" env-description:"Audience for idtoken, typically your oauth client id"`
}

IDToken token based login

type Target added in v1.0.7

type Target struct {
	IgnoreCertificateErrors bool   `` /* 142-byte string literal not displayed */
	IsPlayList              bool   `yaml:"playlist" env:"KIOSK_IS_PLAYLIST" env-default:"false" env-description:"URL is a playlist"`
	LoginMethod             string `` /* 133-byte string literal not displayed */
	Password                string `yaml:"password" env:"KIOSK_LOGIN_PASSWORD" env-default:"guest" env-description:"password"`
	URL                     string `yaml:"URL" env:"KIOSK_URL" env-default:"https://play.grafana.org" env-description:"URL to Grafana server"`
	Username                string `yaml:"username" env:"KIOSK_LOGIN_USER" env-default:"guest" env-description:"username"`
	UseMFA                  bool   `yaml:"use-mfa" env:"KIOSK_USE_MFA" env-default:"false" env-description:"MFA is enabled for given account"`
}

Target the dashboard/playlist details

Jump to

Keyboard shortcuts

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