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 `yaml:"path" env:"WEB_ASSET_PATH"`
}
Asset defines the available asset configuration.
type Config ¶
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http"`
Asset Asset `yaml:"asset"`
File string `yaml:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
Web Web `yaml:"web"`
Context context.Context `yaml:"-"`
}
Config combines all available configuration parts.
type Debug ¶
type Debug struct {
Addr string `yaml:"addr" env:"WEB_DEBUG_ADDR"`
Token string `yaml:"token" env:"WEB_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"WEB_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"WEB_DEBUG_ZPAGES"`
}
Debug defines the available debug configuration.
type ExternalApp ¶
type ExternalApp struct {
ID string `json:"id,omitempty" yaml:"id"`
Path string `json:"path,omitempty" yaml:"path"`
// Config is completely dynamic, because it depends on the extension
Config map[string]interface{} `json:"config,omitempty" yaml:"config"`
}
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" yaml:"url" env:""`
}
ExternalAppConfig defines an external web app configuration.
type HTTP ¶
type HTTP struct {
Addr string `yaml:"addr" env:"WEB_HTTP_ADDR"`
Namespace string `yaml:"-"`
Root string `yaml:"root" env:"WEB_HTTP_ROOT"`
CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL"`
}
HTTP defines the available http configuration.
type Log ¶
type Log struct {
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;WEB_LOG_LEVEL"`
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;WEB_LOG_PRETTY"`
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;WEB_LOG_COLOR"`
File string `mapstructure:"file" env:"OCIS_LOG_FILE;WEB_LOG_FILE"`
}
Log defines the available log configuration.
type OIDC ¶
type OIDC struct {
MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL"`
Authority string `json:"authority,omitempty" yaml:"authority" env:"OCIS_URL;WEB_OIDC_AUTHORITY"`
ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID"`
ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"`
Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE"`
}
OIDC defines the available oidc configuration
type Service ¶ added in v1.17.0
type Service struct {
Name string `yaml:"-"`
}
Service defines the available service configuration.
type Tracing ¶
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEB_TRACING_ENABLED"`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEB_TRACING_TYPE"`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEB_TRACING_ENDPOINT"`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEB_TRACING_COLLECTOR"`
}
Tracing defines the available tracing configuration.
type Web ¶
type Web struct {
Path string `yaml:"path" env:"WEB_UI_PATH"`
ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER"` // used to build Theme in WebConfig
ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH"` // used to build Theme in WebConfig
Config WebConfig `yaml:"config"`
}
Web defines the available web configuration.
type WebConfig ¶
type WebConfig struct {
Server string `json:"server,omitempty" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"`
Theme string `json:"theme,omitempty" yaml:"theme" env:""`
Version string `json:"version,omitempty" yaml:"version" env:"WEB_UI_CONFIG_VERSION"`
OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oids"`
Apps []string `json:"apps" yaml:"apps"`
ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"`
Options map[string]interface{} `json:"options,omitempty" yaml:"options"`
}
WebConfig defines the available web configuration for a dynamically rendered config.json.