config

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path string
}

Asset defines the available asset configuration.

type Config

type Config struct {
	File    string
	Log     Log
	Debug   Debug
	HTTP    HTTP
	Tracing Tracing
	Asset   Asset
	OIDC    OIDC
	Web     Web

	Context    context.Context
	Supervised bool
}

Config combines all available configuration parts.

func New

func New() *Config

New initializes a new configuration with or without defaults.

type Debug

type Debug struct {
	Addr   string
	Token  string
	Pprof  bool
	Zpages bool
}

Debug defines the available debug configuration.

type ExternalApp

type ExternalApp struct {
	ID   string `json:"id,omitempty"`
	Path string `json:"path,omitempty"`
	// Config is completely dynamic, because it depends on the extension
	Config map[string]interface{} `json:"config,omitempty"`
}

ExternalApp defines an external web app.

{
	"name": "hello",
	"path": "http://localhost:9105/hello.js",
	  "config": {
	    "url": "http://localhost:9105"
	  }
 }

type ExternalAppConfig

type ExternalAppConfig struct {
	URL string `json:"url,omitempty"`
}

ExternalAppConfig defines an external web app configuration.

type HTTP

type HTTP struct {
	Addr      string
	Root      string
	Namespace string
	CacheTTL  int
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string
	Pretty bool
	Color  bool
	File   string
}

Log defines the available logging configuration.

type OIDC

type OIDC struct {
	MetadataURL  string `json:"metadata_url,omitempty"`
	Authority    string `json:"authority,omitempty"`
	ClientID     string `json:"client_id,omitempty"`
	ResponseType string `json:"response_type,omitempty"`
	Scope        string `json:"scope,omitempty"`
}

OIDC defines the available oidc configuration

type Tracing

type Tracing struct {
	Enabled   bool
	Type      string
	Endpoint  string
	Collector string
	Service   string
}

Tracing defines the available tracing configuration.

type Web

type Web struct {
	Path        string
	ThemeServer string // used to build Theme in WebConfig
	ThemePath   string // used to build Theme in WebConfig
	Config      WebConfig
}

Web defines the available web configuration.

type WebConfig

type WebConfig struct {
	Server        string                 `json:"server,omitempty"`
	Theme         string                 `json:"theme,omitempty"`
	Version       string                 `json:"version,omitempty"` // TODO what is version used for?
	OpenIDConnect OIDC                   `json:"openIdConnect,omitempty"`
	Apps          []string               `json:"apps"` // TODO add nilasempty when https://go-review.googlesource.com/c/go/+/205897/ is released
	ExternalApps  []ExternalApp          `json:"external_apps,omitempty"`
	Options       map[string]interface{} `json:"options,omitempty"`
}

WebConfig defines the available web configuration for a dynamically rendered config.json.

Jump to

Keyboard shortcuts

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