Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Path string `yaml:"-" mapstructure:"-"` AppConfig AppConfig `yaml:"app" mapstructure:"app"` LoggerConfig LoggerConfig `yaml:"logger" mapstructure:"logger"` DatabaseConfig DatabaseConfig `yaml:"db" mapstructure:"db"` Oauth2Config Oauth2Config `yaml:"oauth" mapstructure:"oauth"` ProbesConfig ProbesConfig `yaml:"probes" mapstructure:"probes"` PrometheusConfig PrometheusConfig `yaml:"prometheus" mapstructure:"prometheus"` TracingConfig TracingConfig `yaml:"tracing" mapstructure:"tracing"` }
type DatabaseConfig ¶
type DatabaseConfig struct { Dialect string `yaml:"dialect" mapstructure:"dialect"` AutoMigrate bool `yaml:"autoMigrate" mapstructure:"autoMigrate"` MysqlOptions MysqlOptions `yaml:"mysql" mapstructure:"mysql"` SqliteOptions SqliteOptions `yaml:"sqlite" mapstructure:"sqlite"` // contains filtered or unexported fields }
type LoggerConfig ¶
type LoggerConfig struct { Filename string `yaml:"filename" mapstructure:"filename"` MaxSize int `yaml:"maxSize" mapstructure:"maxSize"` MaxBackups int `yaml:"maxBackups" mapstructure:"maxBackups"` MaxAge int `yaml:"maxAge" mapstructure:"maxAge"` Level string `yaml:"level" mapstructure:"level"` Stdout bool `yaml:"stdout" mapstructure:"stdout"` }
type MysqlOptions ¶
type MysqlOptions struct { User string `yaml:"user" mapstructure:"user"` Password string `yaml:"password" mapstructure:"password"` Host string `yaml:"host" mapstructure:"host"` Port int `yaml:"port" mapstructure:"port"` Name string `yaml:"name" mapstructure:"name"` Charset string `yaml:"charset" mapstructure:"charset"` }
type Oauth2Config ¶
type ProbesConfig ¶
type PrometheusConfig ¶
type SqliteOptions ¶
type SqliteOptions struct {
Name string `yaml:"name" mapstructure:"name"`
}
type TracingConfig ¶
type TracingConfig struct { //是否开启 opentracing, 默认 false Enable bool `yaml:"enable" mapstructure:"enable"` JaegerConfig jagercfg.Configuration `yaml:"jaeger" mapstructure:"jaeger"` }
Click to show internal directories.
Click to hide internal directories.