Mercurial > gemma
comparison pkg/config/config.go @ 449:a74b8c2a4e75
Removed the command line option to publish tables with GeoServer.
This is now done with configuration from the database.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 21 Aug 2018 20:43:42 +0200 |
parents | ffdb507d5b42 |
children | 8f3f7577fbe7 |
comparison
equal
deleted
inserted
replaced
448:25dd96101aeb | 449:a74b8c2a4e75 |
---|---|
42 func Proxies(key string) map[string]interface{} { return viper.GetStringMap(key) } | 42 func Proxies(key string) map[string]interface{} { return viper.GetStringMap(key) } |
43 | 43 |
44 func GeoServerURL() string { return viper.GetString("geoserver-url") } | 44 func GeoServerURL() string { return viper.GetString("geoserver-url") } |
45 func GeoServerUser() string { return viper.GetString("geoserver-user") } | 45 func GeoServerUser() string { return viper.GetString("geoserver-user") } |
46 func GeoServerPassword() string { return viper.GetString("geoserver-password") } | 46 func GeoServerPassword() string { return viper.GetString("geoserver-password") } |
47 func GeoServerTables() []string { return viper.GetStringSlice("geoserver-tables") } | |
48 | 47 |
49 var ( | 48 var ( |
50 proxyKeyOnce sync.Once | 49 proxyKeyOnce sync.Once |
51 proxyKey []byte | 50 proxyKey []byte |
52 | 51 |
85 Short: "gemma is a server for waterway monitoring and management", | 84 Short: "gemma is a server for waterway monitoring and management", |
86 } | 85 } |
87 | 86 |
88 var allowedOrigins = []string{ | 87 var allowedOrigins = []string{ |
89 // TODO: Fill me! | 88 // TODO: Fill me! |
90 } | |
91 | |
92 var geoTables = []string{ | |
93 "fairway_dimensions", | |
94 } | 89 } |
95 | 90 |
96 func init() { | 91 func init() { |
97 cobra.OnInitialize(initConfig) | 92 cobra.OnInitialize(initConfig) |
98 fl := RootCmd.PersistentFlags() | 93 fl := RootCmd.PersistentFlags() |
142 strSl("allowed-origins", allowedOrigins, "allow access for remote origins") | 137 strSl("allowed-origins", allowedOrigins, "allow access for remote origins") |
143 | 138 |
144 str("geoserver-url", "http://localhost:8080/geoserver", "URL to GeoServer") | 139 str("geoserver-url", "http://localhost:8080/geoserver", "URL to GeoServer") |
145 str("geoserver-user", "admin", "GeoServer user") | 140 str("geoserver-user", "admin", "GeoServer user") |
146 str("geoserver-password", "geoserver", "GeoServer password") | 141 str("geoserver-password", "geoserver", "GeoServer password") |
147 strSl("geoserver-tables", geoTables, "tables to publish with GeoServer") | |
148 | 142 |
149 str("metamorph-db-user", "", "Metamorphic database user") | 143 str("metamorph-db-user", "", "Metamorphic database user") |
150 str("metamorph-db-password", "", "Metamorphic database user password") | 144 str("metamorph-db-password", "", "Metamorphic database user password") |
151 | 145 |
152 str("proxy-key", "", `signing key for proxy URLs. Defaults to random key.`) | 146 str("proxy-key", "", `signing key for proxy URLs. Defaults to random key.`) |