config

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Enabled   bool           `yaml:"enabled"`
	Providers []AuthProvider `yaml:"providers"`
}

func (*Auth) Validate

func (c *Auth) Validate() error

Validate validates the persistence config

type AuthProvider

type AuthProvider struct {
	Label        string                 `yaml:"label"`
	Type         string                 `yaml:"type"`
	ProviderUrl  string                 `yaml:"providerUrl"`
	ClientID     string                 `yaml:"clientId"`
	ClientSecret string                 `yaml:"clientSecret"`
	Scopes       []string               `yaml:"scopes"`
	CallbackURL  string                 `yaml:"callbackUrl"`
	PassIDToken  bool                   `yaml:"passIdToken"`
	Options      map[string]interface{} `yaml:"options"`
}

type CORS

type CORS struct {
	AllowOrigins []string `yaml:"allowOrigins"`
}

type Config

type Config struct {
	TemporalGRPCAddress string `yaml:"temporalGrpcAddress"`
	Host                string `yaml:"host"`
	Port                int    `yaml:"port"`
	UIRootPath          string `yaml:"uiRootPath"`
	TLS                 TLS    `yaml:"tls"`
	Auth                Auth   `yaml:"auth"`
	EnableUI            bool   `yaml:"enableUi"`
	EnableOpenAPI       bool   `yaml:"enableOpenApi"`
	CORS                CORS   `yaml:"cors"`
	DefaultNamespace    string `yaml:"defaultNamespace"`
	// show temporal-system namespace in namespace selector
	ShowTemporalSystemNamespace bool `yaml:"showTemporalSystemNamespace"`
	// How often to reload the config
	RefreshInterval time.Duration `yaml:"refreshInterval"`
}

Config contains the configuration for the UI server

func (*Config) GetConfig added in v0.3.0

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

GetConfig implements ConfigProvider.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates this config

type ConfigProvider added in v0.3.0

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

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

type ConfigProviderWithRefresh added in v0.3.0

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

func NewConfigProviderWithRefresh added in v0.3.0

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

func (*ConfigProviderWithRefresh) Close added in v0.3.0

func (s *ConfigProviderWithRefresh) Close()

func (*ConfigProviderWithRefresh) GetConfig added in v0.3.0

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

type TLS added in v0.2.0

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