Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("setup_config", fx.Provide(newModule))
Module
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
JWTDuration int64 `env:"JWT_DURATION"` // jwt token duration in seconds
}
type Config ¶
type Config struct {
fx.Out
API *API `env:",prefix=API_"`
Auth *Authenticator `env:",prefix=JWT_"`
DB *DB `env:",prefix=DB_"`
Log *Logger `env:",prefix=LOG_"`
Server *Server `env:",prefix=SERVER_"`
Tunnel *Tunnel `env:",prefix=TUNNEL_"`
}
Configs
type DB ¶
type DB struct {
Username string `env:"USERNAME, default=dino"`
Password string `env:"PASSWORD, default=dino"`
Host string `env:"HOST, default=postgres"`
Port string `env:"PORT, default=5432"`
Name string `env:"NAME, default=dino"`
ExtraParams string `env:"EXTRA_PARAMS, default=sslmode=disable"`
}
DB
type Server ¶
type Server struct {
Host string `env:"HOST, default=127.0.0.1"`
Port string `env:"PORT, default=50051"`
QuicHost string `env:"QUIC_HOST, default=127.0.0.1"`
QuicPort string `env:"QUIC_PORT, default=4242"`
CertPath string `env:"SSL_CERT_PATH"`
KeyPath string `env:"SSL_KEY_PATH"`
}
Server
Click to show internal directories.
Click to hide internal directories.