Documentation ¶
Index ¶
Constants ¶
View Source
const (
EnvFile = ".env"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Server struct { Host string `envconfig:"SERVER_HOST"` Port string `envconfig:"SERVER_PORT" default:"8080"` TlsPort string `envconfig:"SERVER_TLS_PORT" default:"8443"` GracefulShutdownTime int `envconfig:"GRACEFUL_SHUTDOWN_TIME" default:"10"` UseTls bool `envconfig:"USE_TLS" default:"false"` CertFile string `envconfig:"CERT_FILE" default:"./cert/cert.pem"` KeyFile string `envconfig:"KEY_FILE" default:"./cert/cert.key"` } Gin struct { Mode string `envconfig:"GIN_MODE" default:"release"` } Db struct { Username string `envconfig:"DB_USERNAME" required:"true"` Password string `envconfig:"DB_PASSWORD" required:"true"` Host string `envconfig:"DB_HOST" required:"true"` Port int32 `envconfig:"DB_PORT" required:"true"` Name string `envconfig:"DB_NAME" required:"true"` JobTable string `envconfig:"DB_TABLE" default:"joblist"` } Misc struct { MaxResultLimit int `envconfig:"MAX_RESULT_LIMIT" default:"100"` } RunTime struct { Router *gin.Engine DbConn *sqlx.DB Sani *sanitize.Sanitizer BmPolicy *bluemonday.Policy ListenAddr string StartDate time.Time } }
Click to show internal directories.
Click to hide internal directories.