Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config appConfig // Global config object
Functions ¶
Types ¶
type DBConfig ¶ added in v0.0.1
type DBConfig struct {
Type string `ini:"type"`
User string `ini:"user"`
Password string `ini:"password"`
Port string `ini:"port"`
Name string `ini:"name"`
Url string `ini:"url"`
SSLMode string `ini:"sslMode"`
}
DBConfig is custom configuration for DB.
type LoggerConfig ¶ added in v0.0.1
type LoggerConfig struct {
Level string `ini:"level"`
Route string `ini:"route"`
APP string `ini:"app"` // log writer: bark, telegram, newrelic, default: os.Stdout
Bark string `ini:"bark"` // bark token
Telegram string `ini:"telegram"` // telegram bot token
Newrelic string `ini:"newrelic"` // newrelic api key
}
LoggerConfig is configuration for logger.
type OAuth2Config ¶ added in v0.1.3
type OAuth2Config struct {
GithubClientID string `ini:"githubClientID"`
GithubClientSecret string `ini:"githubClientSecret"`
}
OAuth2Config is the OAuth2 configuration.
type OtelConfig ¶ added in v0.1.1
type OtelConfig struct {
EnableTrace bool `ini:"trace"` // enable OpenTelemetry tracing
EnableMetric bool `ini:"metric"` // enable OpenTelemetry metrics
EnableLog bool `ini:"log"` // enable OpenTelemetry logging
ClientType string `ini:"clientType"` // client type, used to determine the OpenTelemetry client
Endpoint string `ini:"endpoint"` // endpoint for OpenTelemetry, default: localhost:4317
Header string `ini:"header"` // header name for authentication
Token string `ini:"token"` // token or key for authentication
EnablePrometheus bool `ini:"prometheus"` // enable Prometheus metrics
}
OtelConfig is the OpenTelemetry configuration.
type RedisConfig ¶ added in v0.0.1
type RedisConfig struct {
URL string `ini:"url"`
Username string `ini:"username"`
Password string `ini:"password"`
DB int `ini:"db"`
}
RedisConfig is custom configuration for Redis.
type SMTPConfig ¶ added in v0.0.1
type SMTPConfig struct {
Host string `ini:"host"`
Port int `ini:"port"`
Username string `ini:"username"`
Password string `ini:"password"`
SkipTLS bool `ini:"skipTLS"`
}
SMTPConfig is the mail SMTP configuration.
type SentryConfig ¶ added in v0.0.1
type SentryConfig struct {
Enable bool `ini:"enable"`
DSN string `ini:"DSN"`
Debug bool `ini:"debug"`
}
SentryConfig is configuration for Sentry.
type ServerConfig ¶ added in v0.0.1
type ServerConfig struct {
Debug bool `ini:"debug"`
Port string `ini:"port"`
TLS bool `ini:"tls"`
CertFile string `ini:"certFile"`
KeyFile string `ini:"keyFile"`
JwtToken string `ini:"jwtToken"`
JwtExp int `ini:"jwtExp"`
}
ServerConfig is configuration for server.
type WebAuthnConfig ¶ added in v0.0.1
type WebAuthnConfig struct {
RPID string `ini:"rpID"`
RPDisplayName string `ini:"rpDisplayName"`
RPOrigins []string `ini:"rpOrigins"`
}
WebAuthnConfig is the WebAuthn configuration.
Click to show internal directories.
Click to hide internal directories.