Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFlags(cmd *cobra.Command)
- type Auth
- type Config
- type Custom
- type Database
- type DatabaseDriver
- type GitHub
- type Google
- type HTTP
- type HTTPListener
- type JWT
- type LogLevel
- type Mapbox
- type Metrics
- type NATS
- type PProf
- type Persistence
- type Registration
- type Sentinel
- type Tracing
Constants ¶
View Source
const ( DefaultConfigPath = "config.yaml" DefaultHTTPIPV4Host = "0.0.0.0" DefaultHTTPIPV6Host = "::" DefaultHTTPPort = 8080 DefaultHTTPMetricsIPV4Host = "127.0.0.1" DefaultHTTPMetricsIPV6Host = "::1" DefaultHTTPMetricsPort = 8081 DefaultPersistenceDatabaseDriver = DatabaseDriverSQLite DefaultPersistenceDatabaseDatabase = "rtz.db" DefaultPersistenceUploads = "uploads/" DefaultRegistrationEnabled = false DefaultNATSEnabled = false DefaultAuthGitHubEnabled = false DefaultAuthGoogleEnabled = false DefaultAuthCustomEnabled = false DefaultLogLevel = LogLevelInfo DefaultParallelLogParsers = 4 )
Variables ¶
View Source
var ( ConfigFileKey = "config" HTTPIPV4HostKey = "http.ipv4_host" HTTPIPV6HostKey = "http.ipv6_host" HTTPPortKey = "http.port" HTTPTracingEnabledKey = "http.tracing.enabled" HTTPTracingOTLPEndKey = "http.tracing.otlp_endpoint" HTTPPProfEnabledKey = "http.pprof.enabled" HTTPTrustedProxiesKey = "http.trusted_proxies" HTTPMetricsEnabledKey = "http.metrics.enabled" HTTPMetricsIPV4HostKey = "http.metrics.ipv4_host" HTTPMetricsIPV6HostKey = "http.metrics.ipv6_host" HTTPMetricsPortKey = "http.metrics.port" HTTPCORSHostsKey = "http.cors_hosts" HTTPFrontendURLKey = "http.frontend_url" HTTPBackendURLKey = "http.backend_url" PersistenceDatabaseDriverKey = "persistence.database.driver" PersistenceDatabaseDatabaseKey = "persistence.database.database" PersistenceDatabaseUsernameKey = "persistence.database.username" PersistenceDatabasePasswordKey = "persistence.database.password" PersistenceDatabaseHostKey = "persistence.database.host" PersistenceDatabasePortKey = "persistence.database.port" PersistenceDatabaseExtraParametersKey = "persistence.database.extra_parameters" PersistenceUploadsKey = "persistence.uploads" RegistrationEnabledKey = "registration.enabled" AuthGoogleEnabledKey = "auth.google.enabled" AuthGoogleClientIDKey = "auth.google.client_id" //nolint:golint,gosec AuthGoogleClientSecretKey = "auth.google.client_secret" AuthGitHubEnabledKey = "auth.github.enabled" AuthGitHubClientIDKey = "auth.github.client_id" //nolint:golint,gosec AuthGitHubClientSecretKey = "auth.github.client_secret" AuthCustomEnabledKey = "auth.custom.enabled" AuthCustomClientIDKey = "auth.custom.client_id" //nolint:golint,gosec AuthCustomClientSecretKey = "auth.custom.client_secret" //nolint:golint,gosec AuthCustomTokenURLKey = "auth.custom.token_url" AuthCustomUserURLKey = "auth.custom.user_url" JWTSecretKey = "jwt.secret" MapboxPublicTokenKey = "mapbox.public_token" MapboxSecretTokenKey = "mapbox.secret_token" NATSEnabledKey = "nats.enabled" NATSURLKey = "nats.url" NATSTokenKey = "nats.token" LogLevelKey = "log_level" ParallelLogParsersKey = "parallel_log_parsers" )
View Source
var ( ErrJWTSecretRequired = errors.New("JWT secret is required") ErrBackendURLRequired = errors.New("Backend URL is required") ErrFrontendURLRequired = errors.New("Frontend URL is required") ErrOTLPEndpointRequired = errors.New("OTLP endpoint is required when tracing is enabled") ErrMapboxPublicTokenRequired = errors.New("Mapbox public token is required") ErrMapboxSecretTokenRequired = errors.New("Mapbox secret token is required") ErrDBHostRequired = errors.New("Database host is required") ErrDBDatabaseRequired = errors.New("Database name is required") ErrDatabaseDriverRequired = errors.New("Database driver is required") ErrNATSURLRequired = errors.New("NATS URL is required") ErrGitHubOAuthRequired = errors.New("GitHub OAuth client ID and secret are required") ErrGoogleOAuthRequired = errors.New("Google OAuth client ID and secret are required") ErrCustomOAuthRequired = errors.New("Custom OAuth client ID and secret are required") ErrCustomTokenURLRequired = errors.New("Custom OAuth token URL is required") ErrCustomUserURLRequired = errors.New("Custom OAuth user URL is required") ErrParallelLogParsersNotZero = errors.New("Number of parallel log parsers must be greater than zero") ErrInvalidLogLevel = errors.New("Invalid log level") )
Functions ¶
func RegisterFlags ¶
Types ¶
type Config ¶
type Config struct { HTTP HTTP `json:"http"` Persistence Persistence `json:"persistence"` Registration Registration `json:"registration"` Auth Auth `json:"auth"` JWT JWT `json:"jwt"` Mapbox Mapbox `json:"mapbox"` NATS NATS `json:"nats"` ParallelLogParsers uint `json:"parallel_log_parsers" yaml:"parallel_log_parsers"` LogLevel LogLevel `json:"log_level" yaml:"log_level"` }
type DatabaseDriver ¶ added in v0.0.139
type DatabaseDriver string
const ( DatabaseDriverSQLite DatabaseDriver = "sqlite" DatabaseDriverMySQL DatabaseDriver = "mysql" DatabaseDriverPostgres DatabaseDriver = "postgres" )
type HTTP ¶
type HTTP struct { HTTPListener Tracing FrontendURL string `json:"frontend_url" yaml:"frontend_url"` BackendURL string `json:"backend_url" yaml:"backend_url"` PProf PProf `json:"pprof"` TrustedProxies []string `json:"trusted_proxies" yaml:"trusted_proxies"` Metrics Metrics `json:"metrics"` CORSHosts []string `json:"cors_hosts" yaml:"cors_hosts"` }
type HTTPListener ¶
type Metrics ¶
type Metrics struct { HTTPListener Enabled bool `json:"enabled"` }
type Persistence ¶
type Registration ¶
type Registration struct {
Enabled bool `json:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.