Documentation
¶
Overview ¶
Package configfile contains primitives needed to manage a configuration file with the syntax of PostgreSQL
Index ¶
- func CreateConnectionString(parameters map[string]string) string
- func RemoveOptionFromConfigurationContents(content string, option string) string
- func UpdateConfigurationContents(content string, options map[string]string) (string, error)
- func UpdatePostgresConfigurationFile(fileName string, options map[string]string, managedOptions ...string) (changed bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConnectionString ¶
CreateConnectionString create a PostgreSQL connection string given the passed parameters, escaping them as necessary
func RemoveOptionFromConfigurationContents ¶
RemoveOptionFromConfigurationContents deletes the lines containing the given option a configuration file whose content is passed
func UpdateConfigurationContents ¶
UpdateConfigurationContents search and replace options in a configuration file whose content is passed
func UpdatePostgresConfigurationFile ¶
func UpdatePostgresConfigurationFile( fileName string, options map[string]string, managedOptions ...string, ) (changed bool, err error)
UpdatePostgresConfigurationFile search and replace options in a Postgres configuration file. If any managedOptions is passed, it will be removed unless present in the options map. If the configuration file doesn't exist, it will be written.
Types ¶
This section is empty.