23 lines
554 B
Go
23 lines
554 B
Go
package config
|
|
|
|
type App struct {
|
|
Name string
|
|
Version string
|
|
}
|
|
|
|
type Config struct {
|
|
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'"`
|
|
}
|
|
|
|
func NewConfig() *Config {
|
|
return &Config{
|
|
App: &App{
|
|
Name: ServiceName,
|
|
Version: ServiceVersion,
|
|
},
|
|
}
|
|
}
|