Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cors ¶
type Cors struct { AllowedOrigins []string `split_words:"true" required:"true"` AllowedMethods []string `split_words:"true" default:"GET,POST,PUT,DELETE,PATCH,OPTIONS"` AllowedHeaders []string `` /* 168-byte string literal not displayed */ AllowCredentials bool `split_words:"true" default:"true"` MaxAge int `split_words:"true" default:"300"` }
type Database ¶
type Database struct { Url string `required:"true"` SslMode string `default:"disable"` PoolMax int32 `split_words:"true" default:"5"` PoolMin int32 `split_words:"true" default:"0"` ConnectTimeout time.Duration `split_words:"true" default:"10s"` MaxConnLifetime time.Duration `split_words:"true" default:"60m"` MaxConnIdleTime time.Duration `split_words:"true" default:"30m"` HealthCheckPeriod time.Duration `split_words:"true" default:"60s"` TimeZone string `split_words:"true" default:"UTC"` }
type Secure ¶
type Secure struct { AllowedHosts []string `split_words:"true" default:"localhost"` AllowedHostsAreRegex bool `split_words:"true" default:"false"` HostsProxyHeaders []string `split_words:"true" default:"X-Forwarded-Host"` SSLRedirect bool `split_words:"true" default:"true"` SSLHost string `split_words:"true" default:"localhost"` STSSeconds int64 `split_words:"true" default:"31536000"` STSIncludeSubdomains bool `split_words:"true" default:"true"` STSPreload bool `split_words:"true" default:"true"` FrameDeny bool `split_words:"true" default:"true"` ContentTypeNosniff bool `split_words:"true" default:"true"` BrowserXssFilter bool `split_words:"true" default:"true"` ContentSecurityPolicy string `split_words:"true" default:"script-src $NONCE"` SSLProxyHeaders map[string]string `split_words:"true" default:"X-Forwarded-Proto:https"` }
type Server ¶
type Server struct { AppEnv string `default:"development"` Name string `default:"go-api"` Host string `default:"0.0.0.0"` Port int `default:"3000"` Logging bool `default:"true"` IdleTimeout time.Duration `split_words:"true" default:"60s"` ReadTimeout time.Duration `split_words:"true" default:"5s"` WriteTimeout time.Duration `split_words:"true" default:"10s"` TLSCertPath string `split_words:"true" required:"true"` TLSKeyPath string `split_words:"true" required:"true"` }
Click to show internal directories.
Click to hide internal directories.