Documentation ¶
Index ¶
- func InitCORS(cfg *CORSConfig) cors.Config
- func InitDB(cfg *DBConfig) (*gorm.DB, *sql.DB, error)
- func InitLog(env string, cfg *LogConfig) error
- func InitTracerProvider(cfg *Config) (*sdktrace.TracerProvider, error)
- type AppConfig
- type AuthConfig
- type CORSConfig
- type Config
- type DBConfig
- type DebugConfig
- type JaegerConfig
- type LogConfig
- type MySQLConfig
- type SQLite3Config
- type ShutdownConfig
- type SwaggerConfig
- type SynthesizerConfig
- type TraceConfog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCORS ¶
func InitCORS(cfg *CORSConfig) cors.Config
func InitTracerProvider ¶
func InitTracerProvider(cfg *Config) (*sdktrace.TracerProvider, error)
Types ¶
type AuthConfig ¶
type CORSConfig ¶
type CORSConfig struct {
AllowOrigins []string `yaml:"allowOrigins"`
}
type Config ¶
type Config struct { App *AppConfig `yaml:"app" validate:"required"` DB *DBConfig `yaml:"db" validate:"required"` Auth *AuthConfig `yaml:"auth" validate:"required"` Synthesizer *SynthesizerConfig `yaml:"synthesizer" validate:"required"` Trace *TraceConfog `yaml:"trace" validate:"required"` CORS *CORSConfig `yaml:"cors" validate:"required"` Shutdown *ShutdownConfig `yaml:"shutdown" validate:"required"` Log *LogConfig `yaml:"log" validate:"required"` Debug *DebugConfig `yaml:"debug"` Swagger *SwaggerConfig `yaml:"swagger" validate:"required"` }
func LoadConfig ¶
type DBConfig ¶
type DBConfig struct { DriverName string `yaml:"driverName"` SQLite3 *SQLite3Config `yaml:"sqlite3"` MySQL *MySQLConfig `yaml:"mysql"` }
type DebugConfig ¶
type JaegerConfig ¶
type JaegerConfig struct {
Endpoint string `yaml:"endpoint" validate:"required"`
}
type MySQLConfig ¶
type SQLite3Config ¶
type SQLite3Config struct {
File string `yaml:"file" validate:"required"`
}
type ShutdownConfig ¶
type SwaggerConfig ¶
type SynthesizerConfig ¶
type TraceConfog ¶
type TraceConfog struct { Exporter string `yaml:"exporter" validate:"required"` Jaeger *JaegerConfig `yaml:"jaeger"` }
Click to show internal directories.
Click to hide internal directories.