diff options
author | 2024-07-11 16:44:29 +0200 | |
---|---|---|
committer | 2024-07-11 15:44:29 +0100 | |
commit | 5bc567196bf2204272950c525e8592e56057c3bd (patch) | |
tree | 24aec5e75d2a0208505da16ee2c55efd887d3e25 /internal/config/helpers.gen.go | |
parent | [bugfix] Don't throw error when parent statuses are missing (#2011) (#3088) (diff) | |
download | gotosocial-5bc567196bf2204272950c525e8592e56057c3bd.tar.xz |
[chore] Add interaction policy gtsmodels (#3075)
* [chore] introduce interaction policy gts models
* update migration a smidge
* fix copy paste typo
* update migration
* use int for InteractionType
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r-- | internal/config/helpers.gen.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index 71a77e753..8dab7ac6a 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -3250,6 +3250,33 @@ func GetCacheInstanceMemRatio() float64 { return global.GetCacheInstanceMemRatio // SetCacheInstanceMemRatio safely sets the value for global configuration 'Cache.InstanceMemRatio' field func SetCacheInstanceMemRatio(v float64) { global.SetCacheInstanceMemRatio(v) } +// GetCacheInteractionApprovalMemRatio safely fetches the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field +func (st *ConfigState) GetCacheInteractionApprovalMemRatio() (v float64) { + st.mutex.RLock() + v = st.config.Cache.InteractionApprovalMemRatio + st.mutex.RUnlock() + return +} + +// SetCacheInteractionApprovalMemRatio safely sets the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field +func (st *ConfigState) SetCacheInteractionApprovalMemRatio(v float64) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.InteractionApprovalMemRatio = v + st.reloadToViper() +} + +// CacheInteractionApprovalMemRatioFlag returns the flag name for the 'Cache.InteractionApprovalMemRatio' field +func CacheInteractionApprovalMemRatioFlag() string { return "cache-interaction-approval-mem-ratio" } + +// GetCacheInteractionApprovalMemRatio safely fetches the value for global configuration 'Cache.InteractionApprovalMemRatio' field +func GetCacheInteractionApprovalMemRatio() float64 { + return global.GetCacheInteractionApprovalMemRatio() +} + +// SetCacheInteractionApprovalMemRatio safely sets the value for global configuration 'Cache.InteractionApprovalMemRatio' field +func SetCacheInteractionApprovalMemRatio(v float64) { global.SetCacheInteractionApprovalMemRatio(v) } + // GetCacheListMemRatio safely fetches the Configuration value for state's 'Cache.ListMemRatio' field func (st *ConfigState) GetCacheListMemRatio() (v float64) { st.mutex.RLock() |