pkgdash/config/config.go

23 lines
554 B
Go
Raw Normal View History

2023-08-07 21:30:30 +03:00
package config
type App struct {
2023-08-12 19:26:50 +03:00
Name string
Version string
2023-08-07 21:30:30 +03:00
}
type Config struct {
2023-08-12 19:26:50 +03:00
App *App
Address string `flag:"name=pkgdash.address,desc='listen address',default='127.0.0.1:8080'"`
StorageDSN map[string]string `flag:"name=storage.dsn,desc='components storage dsn',default='all=sqlite+file:database.db'"`
LogLevel string `flag:"name=logger.level,desc='logging level',default='info'"`
2023-08-07 21:30:30 +03:00
}
func NewConfig() *Config {
return &Config{
2023-08-12 19:26:50 +03:00
App: &App{
2023-08-07 21:30:30 +03:00
Name: ServiceName,
Version: ServiceVersion,
},
}
}