diff options
author | 2023-05-21 17:12:47 +0200 | |
---|---|---|
committer | 2023-05-21 16:12:47 +0100 | |
commit | 107237c8e84c541d7f24095dcce7abaf5d973a7e (patch) | |
tree | b8721da6c56172dad5bb290516f7a0526bbc2236 /internal/config/helpers.gen.go | |
parent | [bugfix] Start + stop caches properly for testrig + pruning (#1804) (diff) | |
download | gotosocial-107237c8e84c541d7f24095dcce7abaf5d973a7e.tar.xz |
[feature] Make client IP logging configurable (#1799)
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 b635f7b8e..9993d7aaf 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -3679,3 +3679,28 @@ func GetRequestIDHeader() string { return global.GetRequestIDHeader() } // SetRequestIDHeader safely sets the value for global configuration 'RequestIDHeader' field func SetRequestIDHeader(v string) { global.SetRequestIDHeader(v) } + +// GetLogClientIP safely fetches the Configuration value for state's 'LogClientIP' field +func (st *ConfigState) GetLogClientIP() (v bool) { + st.mutex.Lock() + v = st.config.LogClientIP + st.mutex.Unlock() + return +} + +// SetLogClientIP safely sets the Configuration value for state's 'LogClientIP' field +func (st *ConfigState) SetLogClientIP(v bool) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.LogClientIP = v + st.reloadToViper() +} + +// LogClientIPFlag returns the flag name for the 'LogClientIP' field +func LogClientIPFlag() string { return "log-client-ip" } + +// GetLogClientIP safely fetches the value for global configuration 'LogClientIP' field +func GetLogClientIP() bool { return global.GetLogClientIP() } + +// SetLogClientIP safely sets the value for global configuration 'LogClientIP' field +func SetLogClientIP(v bool) { global.SetLogClientIP(v) } |