comparison pkg/config/config.go @ 4624:209b10f7bb2c geoserver_sql_views

Add config for GeoServer database session startup SQL Prepended to setting the role in order to avoid any configuration overwriting it.
author Tom Gottfried <tom@intevation.de>
date Wed, 09 Oct 2019 18:47:13 +0200
parents 317d176ef38c
children 0919946f624b
comparison
equal deleted inserted replaced
4623:30bb2d819d57 4624:209b10f7bb2c
100 // If false the only missing parts are added to the GeoServer setup. 100 // If false the only missing parts are added to the GeoServer setup.
101 // This should be the default mode when running gemma after an update 101 // This should be the default mode when running gemma after an update
102 // as it reduces the pressure on the GeoServer and enables faster 102 // as it reduces the pressure on the GeoServer and enables faster
103 // rebooting. 103 // rebooting.
104 func GeoServerClean() bool { return viper.GetBool("geoserver-clean") } 104 func GeoServerClean() bool { return viper.GetBool("geoserver-clean") }
105
106 // GeoServerStartupSQL can be used to add SQL commands to GeoServers database
107 // session start script. See
108 // https://docs.geoserver.org/stable/en/user/data/database/sqlsession.html
109 // Note that the commands will be executed as the user configured as 'db-user'.
110 func GeoServerStartupSQL() string {
111 return viper.GetString("geoserver-startup-sql")
112 }
105 113
106 // TmpDir is the path where to store temporary files. 114 // TmpDir is the path where to store temporary files.
107 // If left empty the system default for temporary files is used. 115 // If left empty the system default for temporary files is used.
108 func TmpDir() string { return viper.GetString("tmp-dir") } 116 func TmpDir() string { return viper.GetString("tmp-dir") }
109 117