Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Username string `env:"EMERALD_AUTH_USERNAME"`
Password string `env:"EMERALD_AUTH_PASSWORD"`
SessionTTLHours int `env:"EMERALD_AUTH_SESSION_TTL_HOURS"`
SessionTTL time.Duration
CookieName string `env:"EMERALD_AUTH_COOKIE_NAME"`
}
func (AuthConfig) Validate ¶ added in v1.11.1
func (c AuthConfig) Validate() error
type Config ¶
type Config struct {
Server ServerConfig
Database DatabaseConfig
Auth AuthConfig
Security SecurityConfig
}
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `env:"EMERALD_DB_PATH"`
}
func (DatabaseConfig) Validate ¶ added in v1.11.1
func (c DatabaseConfig) Validate() error
type SecurityConfig ¶ added in v1.11.1
type SecurityConfig struct {
EncryptionKey string `env:"EMERALD_ENCRYPTION_KEY"`
AllowDBStoredKey bool `env:"EMERALD_ALLOW_DB_STORED_KEY"`
AllowedOrigins []string `env:"EMERALD_ALLOWED_ORIGINS" env-separator:","`
TrustProxy bool `env:"EMERALD_TRUST_PROXY"`
TrustedProxies []string `env:"EMERALD_TRUSTED_PROXIES" env-separator:","`
AllowPrivateWebTools bool `env:"EMERALD_ALLOW_PRIVATE_WEBTOOLS"`
AllowAbsoluteToolPaths bool `env:"EMERALD_ALLOW_ABSOLUTE_TOOL_PATHS"`
AllowPlugins bool `env:"EMERALD_ALLOW_PLUGINS"`
}
func (SecurityConfig) Validate ¶ added in v1.11.1
func (c SecurityConfig) Validate() error
type ServerConfig ¶
func (ServerConfig) Validate ¶ added in v1.11.1
func (c ServerConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.