diff options
author | 2023-07-29 03:49:14 -0700 | |
---|---|---|
committer | 2023-07-29 12:49:14 +0200 | |
commit | b874e9251e00961f295e4c409e1b34da89fab4ed (patch) | |
tree | cb528816250f322707a90c0954c963886ea96c19 /internal/config/helpers.gen.go | |
parent | [chore] Update activity dependency (#2031) (diff) | |
download | gotosocial-b874e9251e00961f295e4c409e1b34da89fab4ed.tar.xz |
[feature] Implement markers API (#1989)
* Implement markers API
Fixes #1856
* Correct import grouping in markers files
* Regenerate Swagger for markers API
* Shorten names for readability
* Cache markers for 6 hours
* Update DB ref
* Update envparsing.sh
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r-- | internal/config/helpers.gen.go | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index a3a394b2d..5eed1b468 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -3228,6 +3228,81 @@ func GetCacheGTSListEntrySweepFreq() time.Duration { return global.GetCacheGTSLi // SetCacheGTSListEntrySweepFreq safely sets the value for global configuration 'Cache.GTS.ListEntrySweepFreq' field func SetCacheGTSListEntrySweepFreq(v time.Duration) { global.SetCacheGTSListEntrySweepFreq(v) } +// GetCacheGTSMarkerMaxSize safely fetches the Configuration value for state's 'Cache.GTS.MarkerMaxSize' field +func (st *ConfigState) GetCacheGTSMarkerMaxSize() (v int) { + st.mutex.RLock() + v = st.config.Cache.GTS.MarkerMaxSize + st.mutex.RUnlock() + return +} + +// SetCacheGTSMarkerMaxSize safely sets the Configuration value for state's 'Cache.GTS.MarkerMaxSize' field +func (st *ConfigState) SetCacheGTSMarkerMaxSize(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.MarkerMaxSize = v + st.reloadToViper() +} + +// CacheGTSMarkerMaxSizeFlag returns the flag name for the 'Cache.GTS.MarkerMaxSize' field +func CacheGTSMarkerMaxSizeFlag() string { return "cache-gts-marker-max-size" } + +// GetCacheGTSMarkerMaxSize safely fetches the value for global configuration 'Cache.GTS.MarkerMaxSize' field +func GetCacheGTSMarkerMaxSize() int { return global.GetCacheGTSMarkerMaxSize() } + +// SetCacheGTSMarkerMaxSize safely sets the value for global configuration 'Cache.GTS.MarkerMaxSize' field +func SetCacheGTSMarkerMaxSize(v int) { global.SetCacheGTSMarkerMaxSize(v) } + +// GetCacheGTSMarkerTTL safely fetches the Configuration value for state's 'Cache.GTS.MarkerTTL' field +func (st *ConfigState) GetCacheGTSMarkerTTL() (v time.Duration) { + st.mutex.RLock() + v = st.config.Cache.GTS.MarkerTTL + st.mutex.RUnlock() + return +} + +// SetCacheGTSMarkerTTL safely sets the Configuration value for state's 'Cache.GTS.MarkerTTL' field +func (st *ConfigState) SetCacheGTSMarkerTTL(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.MarkerTTL = v + st.reloadToViper() +} + +// CacheGTSMarkerTTLFlag returns the flag name for the 'Cache.GTS.MarkerTTL' field +func CacheGTSMarkerTTLFlag() string { return "cache-gts-marker-ttl" } + +// GetCacheGTSMarkerTTL safely fetches the value for global configuration 'Cache.GTS.MarkerTTL' field +func GetCacheGTSMarkerTTL() time.Duration { return global.GetCacheGTSMarkerTTL() } + +// SetCacheGTSMarkerTTL safely sets the value for global configuration 'Cache.GTS.MarkerTTL' field +func SetCacheGTSMarkerTTL(v time.Duration) { global.SetCacheGTSMarkerTTL(v) } + +// GetCacheGTSMarkerSweepFreq safely fetches the Configuration value for state's 'Cache.GTS.MarkerSweepFreq' field +func (st *ConfigState) GetCacheGTSMarkerSweepFreq() (v time.Duration) { + st.mutex.RLock() + v = st.config.Cache.GTS.MarkerSweepFreq + st.mutex.RUnlock() + return +} + +// SetCacheGTSMarkerSweepFreq safely sets the Configuration value for state's 'Cache.GTS.MarkerSweepFreq' field +func (st *ConfigState) SetCacheGTSMarkerSweepFreq(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.MarkerSweepFreq = v + st.reloadToViper() +} + +// CacheGTSMarkerSweepFreqFlag returns the flag name for the 'Cache.GTS.MarkerSweepFreq' field +func CacheGTSMarkerSweepFreqFlag() string { return "cache-gts-marker-sweep-freq" } + +// GetCacheGTSMarkerSweepFreq safely fetches the value for global configuration 'Cache.GTS.MarkerSweepFreq' field +func GetCacheGTSMarkerSweepFreq() time.Duration { return global.GetCacheGTSMarkerSweepFreq() } + +// SetCacheGTSMarkerSweepFreq safely sets the value for global configuration 'Cache.GTS.MarkerSweepFreq' field +func SetCacheGTSMarkerSweepFreq(v time.Duration) { global.SetCacheGTSMarkerSweepFreq(v) } + // GetCacheGTSMediaMaxSize safely fetches the Configuration value for state's 'Cache.GTS.MediaMaxSize' field func (st *ConfigState) GetCacheGTSMediaMaxSize() (v int) { st.mutex.RLock() |