Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LazyInitLogger func(string) = func(configfile string) {
onceinitlogger.Do(func() {
lazyinitlogger(configfile)
})
}
View Source
var LoggerErrorOutput io.Writer = os.Stderr
View Source
var LoggerInfoOutput io.Writer = os.Stdout
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶
type Config ¶
type Database ¶
type Database struct { Type string `default:"mysql"` Protocol string `default:"tcp"` Host string `env:"SYNAPSE_DB_HOST"` Port string `env:"SYNAPSE_DB_PORT"` DBName string `env:"SYNAPSE_DB_SCHEME"` Username string `env:"SYNAPSE_DB_SERVER_USERNAME"` Password string `env:"SYNAPSE_DB_SERVER_PASSWORD"` MaxOpenConns int `default:"15"` MaxIdleConns int `default:"5"` MaxConnLifeTime int `default:"1"` ShowSQL bool `default:"false"` LogLevel string `default:"warn"` }
type Host ¶
type Host struct { Port int32 `env:"SYNAPSE_HOST_PORT" yaml:"port" default:"8099"` TlsEnable bool `env:"SYNAPSE_HOST_TLS_ENABLE" yaml:"tls-enable" default:"false"` TlsCertificateFilename string `env:"SYNAPSE_HOST_TLS_CRT_FILENAME" yaml:"tls-crt-filename" default:"manager.crt"` TlsPrivateKeyFilename string `env:"SYNAPSE_HOST_TLS_KEY_FILENAME" yaml:"tls-key-filename" default:"manager.key"` XAuthToken bool `default:"false"` }
type LoggerConfig ¶
type LoggerConfig struct { Logger struct { Severity string `env:"SYNAPSE_LOG_SEVERIY" yaml:"severity,omitempty"` SystemEvent bool `env:"SYNAPSE_LOG_SYSTEM_EVENT" yaml:"system-event,omitempty"` SystemEventName string `env:"SYNAPSE_LOG_SYSTEM_EVENT_NAME" yaml:"system-event-name,omitempty"` Verbose bool `env:"SYNAPSE_LOG_VERBOSE" yaml:"verbose,omitempty"` Filename string `env:"SYNAPSE_LOG_FILENAME" yaml:"filename,omitempty"` MaxSize int `env:"SYNAPSE_LOG_MAXSIZE" yaml:"max-size,omitempty"` MaxAge int `env:"SYNAPSE_LOG_MAXAGE" yaml:"max-age,omitempty"` MaxBackups int `env:"SYNAPSE_LOG_MAXBACKUPS" yaml:"max-backups,omitempty"` Compress bool `env:"SYNAPSE_LOG_COMPRESS" yaml:"compress,omitempty"` } }
Click to show internal directories.
Click to hide internal directories.