chanched handlers

This commit is contained in:
2023-08-12 19:26:50 +03:00
parent 85f4b92fa7
commit 17a09f7fb3
28 changed files with 503 additions and 1001 deletions

View File

@@ -1,22 +1,20 @@
package config
import service "go.unistack.org/cms-service"
type App struct {
Address string `flag:"name=pkgdash.address,desc='listen address',default='127.0.0.1:8080'"`
Name string
Version string
}
type Config struct {
App *App
Storage *service.ConfigStorage
Logger *service.ConfigLogger
Service *service.ConfigService
Core *service.ConfigCore
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{
Service: &service.ConfigService{
App: &App{
Name: ServiceName,
Version: ServiceVersion,
},