config

package
v2.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	// Enabled - UI checks this first before reading your provider config
	Enabled bool `yaml:"enabled"`
	// A list of auth providers. Currently enables only the first provider in the list.
	Providers []AuthProvider `yaml:"providers"`
}

func (*Auth) Validate

func (c *Auth) Validate() error

Validate validates the persistence config

type AuthProvider

type AuthProvider struct {
	// Label - optional label for the provider
	Label string `yaml:"label"`
	// Type of the auth provider. Only OIDC is supported today
	Type string `yaml:"type"`
	// OIDC .well-known/openid-configuration URL, ex. https://accounts.google.com/
	ProviderURL string `yaml:"providerUrl"`
	// IssuerUrl - optional. Needed only when differs from the auth provider URL
	IssuerUrl    string `yaml:"issuerUrl"`
	ClientID     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
	// Scopes for auth. Typically [openid, profile, email]
	Scopes []string `yaml:"scopes"`
	// CallbackURL - URL for the callback URL, ex. https://localhost:8080/sso/callback
	CallbackURL string `yaml:"callbackUrl"`
	// Options added as URL query params when redirecting to auth provider. Can be used to configure custom auth flows such as Auth0 invitation flow.
	Options map[string]interface{} `yaml:"options"`
}

type CORS

type CORS struct {
	AllowOrigins []string `yaml:"allowOrigins"`
	// CookieInsecure allows CSRF cookie to be sent to servers that the browser considers
	// unsecured. Useful for cases where the connection is secured via VPN rather than
	// HTTPS directly.
	CookieInsecure bool `yaml:"cookieInsecure"`
}

type Codec

type Codec struct {
	Endpoint           string `yaml:"endpoint"`
	PassAccessToken    bool   `yaml:"passAccessToken"`
	IncludeCredentials bool   `yaml:"includeCredentials"`
}

type Config

type Config struct {
	TemporalGRPCAddress string `yaml:"temporalGrpcAddress"`
	Host                string `yaml:"host"`
	Port                int    `yaml:"port"`
	PublicPath          string `yaml:"publicPath"`
	TLS                 TLS    `yaml:"tls"`
	Auth                Auth   `yaml:"auth"`
	EnableUI            bool   `yaml:"enableUi"`
	CloudUI             bool   `yaml:"cloudUi"`
	UIAssetPath         string `yaml:"uiAssetPath"`
	CORS                CORS   `yaml:"cors"`
	DefaultNamespace    string `yaml:"defaultNamespace"`
	FeedbackURL         string `yaml:"feedbackUrl"`
	NotifyOnNewVersion  bool   `yaml:"notifyOnNewVersion"`
	// Show temporal-system namespace in namespace selector
	ShowTemporalSystemNamespace bool `yaml:"showTemporalSystemNamespace"`
	// How often to reload the config
	RefreshInterval     time.Duration `yaml:"refreshInterval"`
	Codec               Codec         `yaml:"codec"`
	DisableWriteActions bool          `yaml:"disableWriteActions"`
	// Discrete configuration for Workflow Actions in the UI
	WorkflowTerminateDisabled bool `yaml:"workflowTerminateDisabled"`
	WorkflowCancelDisabled    bool `yaml:"workflowCancelDisabled"`
	WorkflowSignalDisabled    bool `yaml:"workflowSignalDisabled"`
	WorkflowResetDisabled     bool `yaml:"workflowResetDisabled"`
	// Whether bulk/batch actions are enabled in the UI
	BatchActionsDisabled bool `yaml:"batchActionsDisabled"`
	// Whether to hide server errors for workflow queries in UI
	HideWorkflowQueryErrors bool `yaml:"hideWorkflowQueryErrors"`
	// Forward specified HTTP headers from HTTP API requests to Temporal gRPC backend
	ForwardHeaders []string `yaml:"forwardHeaders"`
}

Config contains the configuration for the UI server

func (*Config) GetConfig

func (c *Config) GetConfig() (*Config, error)

GetConfig implements ConfigProvider.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates this config

type ConfigProvider

type ConfigProvider interface {
	GetConfig() (*Config, error)
}

ConfigProvider serves as a common interface to read UI server configuration.

type ConfigProviderWithRefresh

type ConfigProviderWithRefresh struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewConfigProviderWithRefresh

func NewConfigProviderWithRefresh(cfgProvider ConfigProvider) (*ConfigProviderWithRefresh, error)

func (*ConfigProviderWithRefresh) Close

func (s *ConfigProviderWithRefresh) Close()

func (*ConfigProviderWithRefresh) GetConfig

func (r *ConfigProviderWithRefresh) GetConfig() (*Config, error)

type Filesystem added in v2.3.0

type Filesystem struct {
	Path string `yaml:"path"`
}

type TLS

type TLS struct {
	CaFile                 string `yaml:"caFile"`
	CertFile               string `yaml:"certFile"`
	KeyFile                string `yaml:"keyFile"`
	CaData                 string `yaml:"caData"`
	CertData               string `yaml:"certData"`
	KeyData                string `yaml:"keyData"`
	EnableHostVerification bool   `yaml:"enableHostVerification"`
	ServerName             string `yaml:"serverName"`
}

Jump to

Keyboard shortcuts

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