Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ProjectName string
Environment string
DebugLogPath string
Secret string
AccessLog struct {
On bool
BodyDump bool
Path string
BodyDumpMaskParam []string
ReqHeaderParam []string
SkipEndpoints []string
}
Prometheus struct {
On bool
SkipEndpoints []string
Subsystem string
}
HTTP struct {
Port string
Host string
BodyLimit string
IsHttpsRedirect bool
Timeout time.Duration
ErrorMessage struct {
E404 struct {
Json []struct {
Key string
Value string
}
Html struct {
File string
}
}
E405 struct {
Json []struct {
Key string
Value string
}
Html struct {
File string
}
}
E500 struct {
Json []struct {
Key string
Value string
}
Html struct {
File string
}
}
E504 struct {
Json []struct {
Key string
Value string
}
Html struct {
File string
}
}
Default struct {
Json []struct {
Key string
Value string
}
Html struct {
File string
}
}
}
KeepAlive bool
AllowedMethod []string
SSL struct {
On bool
CertFile string
PrivFile string
MinTLSVersion uint16
}
ShutdownTimeout time.Duration
}
NetHttpFastTransporter struct {
On bool
MaxIdleConns *int
MaxIdleConnsPerHost *int
MaxConnsPerHost *int
IdleConnTimeout *time.Duration
DNSCacheTimeout *time.Duration
}
HTML struct {
ViewsTemplateCache bool
}
Database struct {
Tenant struct {
On bool
}
MySQL dbdrivers.SQLConfig
Mongo dbdrivers.MongoConfig
Redis dbdrivers.RedisConfig
Memory dbdrivers.MemoryConfig
}
Sentry Sentry
Security struct {
HTTP struct {
Header struct {
XssProtection string
ContentTypeNosniff string
XFrameOptions string
HstsMaxAge int
ContentSecurityPolicy string
}
}
}
AsyncPool []struct {
Name string
Size *int
BlockAfter *int
}
AsyncPoolReleaseTimeout time.Duration
}
var Bean *Config
Hold the useful configuration settings of bean so that we can use it quickly from anywhere.
func LoadConfig ¶
LoadConfig parses a given config file into global Bean variable.
Click to show internal directories.
Click to hide internal directories.