Preparep console params for application
This commit is contained in:
parent
00fd369771
commit
ac5a56fc8e
|
@ -12,4 +12,12 @@ db:
|
||||||
- name: f2
|
- name: f2
|
||||||
fks:
|
fks:
|
||||||
- name: test1
|
- name: test1
|
||||||
|
backend:
|
||||||
|
config:
|
||||||
|
- name: nominatim
|
||||||
|
type: string
|
||||||
|
help: Nominatim server for geocoding
|
||||||
|
- name: tile_server
|
||||||
|
type: string
|
||||||
|
help: Tile server for download tiles map
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
package lib
|
package lib
|
||||||
|
|
||||||
var AppConfig struct {
|
var AppConfig struct {
|
||||||
Env string
|
Env string `arg:"-e,env:ENV" default:"prod" help:"Environment for application. dev or prod. Default prod"`
|
||||||
MigrateDB bool
|
MigrateDB bool `arg:"-m,--migrate,env:DB_MIGRATE" "default:false" help:"Run migrate Database"`
|
||||||
DBInstance string
|
DBInstance string `arg:"--db-instance,env:DB_INSTANCE" "default:postgres" help:"postgres (PostgreSQL) or mysql (MySQL/MariaDB)"`
|
||||||
DbName string
|
DbName string `arg:"--db-name,env:DB_NAME" default:"dbname" help:"Database name for connect"`
|
||||||
DbAddress string
|
DbAddress string `arg:"--db-host,env:DB_HOST" default:"localhost" help:"Database host for connect"`
|
||||||
DbPort string
|
DbPort string `arg:"--db-port,env:DB_PORT" default:"5432" help:"Database port for connect"`
|
||||||
DbLogin string
|
DbLogin string `arg:"--db-login,env:DB_LOGIN" default:"db" help:"Database login for connect"`
|
||||||
DbPassword string
|
DbPassword string `arg:"--db-pwd,env:DB_PWD" default:"db" help:"Database password for connect"`
|
||||||
Port string
|
Port string `arg:"--port,env:PORT" default:"3000" help:"Open port for incoming connections"`
|
||||||
|
|
||||||
LdapURL string
|
LdapURL string `arg:"--ldap-url,env:LDAP_URL" help:"Ldap url for server"`
|
||||||
LdapBind string
|
LdapBind string `arg:"--ldap-bind,env:LDAP_BIND" help:"Ldap bind for credential"`
|
||||||
LdapPassword string
|
LdapPassword string `arg:"--ldap-pwd,env:LDAP_PWD" help:"Ldap password for credential"`
|
||||||
LdapSearchBase string
|
LdapSearchBase string `arg:"--ldap-search-base,env:LDAP_SEARCH_BASE" help:"Ldap search base for search users"`
|
||||||
|
|
||||||
Nominatim string
|
{{ range $index, $field := .Config }}
|
||||||
TileServer string
|
{{ configParamName $field }} {{ configParamType $field }} {{ configParamTag $field }}
|
||||||
|
{{ end }}
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"{{ .Name }}/middlewares"
|
"{{ .Name }}/middlewares"
|
||||||
"{{ .Name }}/routes"
|
"{{ .Name }}/routes"
|
||||||
|
|
||||||
"github.com/go-co-op/gocron"
|
"github.com/alexflint/go-arg"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user