diff options
author | 2024-08-08 13:00:19 +0100 | |
---|---|---|
committer | 2024-08-08 14:00:19 +0200 | |
commit | 94c615d417948011430adb2ba9f8f5b99b962250 (patch) | |
tree | 175dcd1297302a9275ba6f7b007beaa2ba41433e /internal/config/helpers.gen.go | |
parent | [feature] Use gifv type for short soundless mp4 videos (#3182) (diff) | |
download | gotosocial-94c615d417948011430adb2ba9f8f5b99b962250.tar.xz |
[feature] Add `db-postgres-connection-string` option (#3178)
* handle db-url
* lint and add doc
* add more doc
* fix config test
* return error
* change name from db-url to db-postgres-connection-string
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r-- | internal/config/helpers.gen.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index d75956963..f176676e5 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -700,6 +700,31 @@ func GetDbSqliteBusyTimeout() time.Duration { return global.GetDbSqliteBusyTimeo // SetDbSqliteBusyTimeout safely sets the value for global configuration 'DbSqliteBusyTimeout' field func SetDbSqliteBusyTimeout(v time.Duration) { global.SetDbSqliteBusyTimeout(v) } +// GetDbPostgresConnectionString safely fetches the Configuration value for state's 'DbPostgresConnectionString' field +func (st *ConfigState) GetDbPostgresConnectionString() (v string) { + st.mutex.RLock() + v = st.config.DbPostgresConnectionString + st.mutex.RUnlock() + return +} + +// SetDbPostgresConnectionString safely sets the Configuration value for state's 'DbPostgresConnectionString' field +func (st *ConfigState) SetDbPostgresConnectionString(v string) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.DbPostgresConnectionString = v + st.reloadToViper() +} + +// DbPostgresConnectionStringFlag returns the flag name for the 'DbPostgresConnectionString' field +func DbPostgresConnectionStringFlag() string { return "db-postgres-connection-string" } + +// GetDbPostgresConnectionString safely fetches the value for global configuration 'DbPostgresConnectionString' field +func GetDbPostgresConnectionString() string { return global.GetDbPostgresConnectionString() } + +// SetDbPostgresConnectionString safely sets the value for global configuration 'DbPostgresConnectionString' field +func SetDbPostgresConnectionString(v string) { global.SetDbPostgresConnectionString(v) } + // GetWebTemplateBaseDir safely fetches the Configuration value for state's 'WebTemplateBaseDir' field func (st *ConfigState) GetWebTemplateBaseDir() (v string) { st.mutex.RLock() |