Documentation ¶
Index ¶
- Constants
- type AuthorizationVerifier
- type Config
- type ConfigHandler
- type CoreSvcConfig
- type LoginConfig
- type MonitoringConfig
- type OIDCClient
- type PrometheusConfig
- type RateLimits
- type RedactedString
- type RedisConfig
- type RenkuServicesConfig
- type RevproxyConfig
- type RunningEnvironment
- type SentryConfig
- type ServerConfig
- type SessionConfig
- type TokenEncryptionConfig
Constants ¶
View Source
const DBTypeRedis string = "redis"
View Source
const DBTypeRedisMock string = "redis-mock"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationVerifier ¶
type Config ¶
type Config struct { RunningEnvironment DebugMode bool Server ServerConfig Sessions SessionConfig Revproxy RevproxyConfig Login LoginConfig Redis RedisConfig Monitoring MonitoringConfig }
type ConfigHandler ¶
type ConfigHandler struct {
// contains filtered or unexported fields
}
func NewConfigHandler ¶
func NewConfigHandler() *ConfigHandler
Creates a configuration handler that reads the configuration files, merges them and can watch them for changes. Please note that the merges replace whole arrays - they do not merge arrays. The secret file will always overwrite anything in the non-secret / regular file. And any environment variables will always rewrite stuff in the secret config, so the order of preference from most preferred to least is environment variables, secret config, non-secret config.
func (*ConfigHandler) Config ¶
func (c *ConfigHandler) Config() (Config, error)
func (*ConfigHandler) HandleChanges ¶
func (c *ConfigHandler) HandleChanges(callback func(Config, error))
func (*ConfigHandler) Watch ¶
func (c *ConfigHandler) Watch()
type CoreSvcConfig ¶
type LoginConfig ¶
type LoginConfig struct { RenkuBaseURL *url.URL LoginRoutesBasePath string TokenEncryption TokenEncryptionConfig Providers map[string]OIDCClient OldGitLabLogout bool LogoutGitLabUponRenkuLogout bool }
func (LoginConfig) Validate ¶
func (c LoginConfig) Validate(e RunningEnvironment) error
type MonitoringConfig ¶
type MonitoringConfig struct { Sentry SentryConfig Prometheus PrometheusConfig }
type OIDCClient ¶
type OIDCClient struct { Issuer string ClientID string ClientSecret RedactedString Scopes []string CallbackURI string UsePKCE bool CookieEncodingKey RedactedString CookieHashKey RedactedString // NOTE: UnsafeNoCookieHandler should only be used for testing, in production this has to be false/unset // without this there is no CSRF protection on the oauth callback endpoint UnsafeNoCookieHandler bool }
type PrometheusConfig ¶
type RateLimits ¶
type RedactedString ¶
type RedactedString string
func (RedactedString) MarshalBinary ¶
func (r RedactedString) MarshalBinary() ([]byte, error)
func (RedactedString) MarshalJSON ¶
func (r RedactedString) MarshalJSON() ([]byte, error)
func (RedactedString) MarshalText ¶
func (r RedactedString) MarshalText() ([]byte, error)
func (RedactedString) String ¶
func (r RedactedString) String() string
type RedisConfig ¶
type RedisConfig struct { Type string Addresses []string IsSentinel bool Password RedactedString MasterName string DBIndex int }
func (RedisConfig) Validate ¶
func (c RedisConfig) Validate(e RunningEnvironment) error
type RenkuServicesConfig ¶
type RevproxyConfig ¶
type RevproxyConfig struct { RenkuBaseURL *url.URL ExternalGitlabURL *url.URL K8sNamespace string RenkuServices RenkuServicesConfig }
func (*RevproxyConfig) Validate ¶
func (r *RevproxyConfig) Validate() error
type RunningEnvironment ¶
type RunningEnvironment string
const Development RunningEnvironment = "development"
const Production RunningEnvironment = "production"
type SentryConfig ¶
type SentryConfig struct { Enabled bool Dsn RedactedString Environment string SampleRate float64 }
type ServerConfig ¶
type ServerConfig struct { Host string Port int RateLimits RateLimits AllowOrigin []string }
type SessionConfig ¶
type SessionConfig struct { IdleSessionTTLSeconds int MaxSessionTTLSeconds int AuthorizationVerifiers []AuthorizationVerifier CookieEncodingKey RedactedString CookieHashKey RedactedString // NOTE: UnsafeNoCookieHandler should only be used for testing, in production this has to be false/unset // without this there is no CSRF protection on the oauth callback endpoint UnsafeNoCookieHandler bool }
func (*SessionConfig) Validate ¶
func (c *SessionConfig) Validate(e RunningEnvironment) error
type TokenEncryptionConfig ¶
type TokenEncryptionConfig struct { Enabled bool SecretKey RedactedString }
Click to show internal directories.
Click to hide internal directories.