Documentation
¶
Index ¶
Constants ¶
View Source
const ServiceName = "game-library-auth"
ServiceName - service name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
PrivateKeyFile string `mapstructure:"AUTH_PRIVATEKEYFILE"`
SigningAlgorithm string `mapstructure:"AUTH_SIGNINGALG"`
Issuer string `mapstructure:"AUTH_ISSUER"`
AccessTokenTTL time.Duration `mapstructure:"AUTH_ACCESSTOKENTTL"`
RefreshTokenTTL time.Duration `mapstructure:"AUTH_REFRESHTOKENTTL"`
}
Auth represents settings related to authentication and authorization
type Cfg ¶
type Cfg struct {
DB DB `mapstructure:",squash"`
Web Web `mapstructure:",squash"`
Auth Auth `mapstructure:",squash"`
OAuth OAuth `mapstructure:",squash"`
Jaeger Jaeger `mapstructure:",squash"`
Graylog Graylog `mapstructure:",squash"`
Log Log `mapstructure:",squash"`
EmailSender EmailSender `mapstructure:",squash"`
InfoAPI InfoAPI `mapstructure:",squash"`
}
Cfg - app configuration
type DB ¶
type DB struct {
DSN string `mapstructure:"DB_DSN"`
}
DB represents settings related to database
type EmailSender ¶
type EmailSender struct {
APIToken string `mapstructure:"EMAIL_SENDER_API_TOKEN"`
APITimeout time.Duration `mapstructure:"EMAIL_SENDER_API_TIMEOUT"`
EmailFrom string `mapstructure:"EMAIL_SENDER_EMAIL_FROM"`
ContactEmail string `mapstructure:"EMAIL_SENDER_CONTACT_EMAIL"`
BaseURL string `mapstructure:"EMAIL_SENDER_BASE_URL"`
UnsubscribeURL string `mapstructure:"EMAIL_SENDER_UNSUBSCRIBE_URL"`
UnsubscribeSecret string `mapstructure:"EMAIL_SENDER_UNSUBSCRIBE_SECRET"`
}
EmailSender represents settings for email sending service
type Graylog ¶
type Graylog struct {
Address string `mapstructure:"GRAYLOG_ADDR"`
}
Graylog represents settings related to Graylog integration
type InfoAPI ¶
type InfoAPI struct {
Address string `mapstructure:"INFOAPI_ADDRESS"`
Timeout time.Duration `mapstructure:"INFOAPI_TIMEOUT"`
}
InfoAPI represents settings for InfoAPI gRPC client
type Jaeger ¶
type Jaeger struct {
OTLPEndpoint string `mapstructure:"JAEGER_OTLP_ENDPOINT"`
}
Jaeger represents settings for Jaeger OTLP trace export
type Log ¶
type Log struct {
Level string `mapstructure:"LOG_LEVEL"`
}
Log represents settings for logging
type OAuth ¶
type OAuth struct {
Timeout time.Duration `mapstructure:"OAUTH_TIMEOUT"`
GoogleClientID string `mapstructure:"OAUTH_GOOGLECLIENTID"`
GitHubClientID string `mapstructure:"OAUTH_GITHUBCLIENTID"`
GitHubClientSecret string `mapstructure:"OAUTH_GITHUBCLIENTSECRET"`
}
OAuth represents settings related to OAuth providers
type Web ¶
type Web struct {
HTTPAddress string `mapstructure:"APP_HTTP_ADDRESS"`
GRPCAddress string `mapstructure:"APP_GRPC_ADDRESS"`
DebugAddress string `mapstructure:"APP_DEBUG_ADDRESS"`
ReadTimeout time.Duration `mapstructure:"APP_READTIMEOUT"`
WriteTimeout time.Duration `mapstructure:"APP_WRITETIMEOUT"`
AllowedCORSOrigin string `mapstructure:"APP_ALLOWEDCORSORIGIN"`
RefreshCookieSameSite string `mapstructure:"APP_REFRESH_TOKEN_COOKIE_SAMESITE"`
RefreshCookieSecure bool `mapstructure:"APP_REFRESH_TOKEN_COOKIE_SECURE"`
}
Web represents settings related to web server
Click to show internal directories.
Click to hide internal directories.