Documentation
¶
Index ¶
- func InitCORS(cfg *CORSConfig) cors.Config
- func InitDB(ctx context.Context, cfg *DBConfig, sqlFSs ...fs.FS) (libgateway.DialectRDBMS, *gorm.DB, *sql.DB, error)
- func InitLog(cfg *LogConfig)
- func InitTracerProvider(ctx context.Context, appName string, traceConfig *TraceConfig) (*sdktrace.TracerProvider, error)
- func MergeFS(driverName string, fss ...fs.FS) (*mergedFS, error)
- type CORSConfig
- type DBConfig
- type GoogleTraceConfig
- type InitDBFunc
- type InitTracerExporterFunc
- type LogConfig
- type OTLPConfig
- type SwaggerConfig
- type TraceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCORS ¶
func InitCORS(cfg *CORSConfig) cors.Config
func InitTracerProvider ¶
func InitTracerProvider(ctx context.Context, appName string, traceConfig *TraceConfig) (*sdktrace.TracerProvider, error)
Types ¶
type CORSConfig ¶
type CORSConfig struct {
AllowOrigins []string `yaml:"allowOrigins"`
}
type DBConfig ¶
type DBConfig struct { DriverName string `yaml:"driverName"` MySQL *libgateway.MySQLConfig `yaml:"mysql"` Postgres *libgateway.PostgresConfig `yaml:"postgres"` SQLite3 *libgateway.SQLite3Config `yaml:"sqlite3"` Migration bool `yaml:"migration"` }
type GoogleTraceConfig ¶
type GoogleTraceConfig struct {
ProjectID string `yaml:"projectID" validate:"required"`
}
type InitDBFunc ¶
type InitTracerExporterFunc ¶
type InitTracerExporterFunc func(ctx context.Context, traceConfig *TraceConfig) (sdktrace.SpanExporter, error)
type OTLPConfig ¶
type SwaggerConfig ¶
type TraceConfig ¶
type TraceConfig struct { Exporter string `yaml:"exporter" validate:"required"` OTLP *OTLPConfig `yaml:"otlp"` Google *GoogleTraceConfig `yaml:"google"` }
Click to show internal directories.
Click to hide internal directories.