summaryrefslogtreecommitdiff
path: root/internal/config/helpers.gen.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-11-08 14:32:17 +0000
committerLibravatar GitHub <noreply@github.com>2023-11-08 14:32:17 +0000
commite9e5dc5a40926e5320cb131b035c46b1e1b0bd59 (patch)
tree52edc9fa5742f28e1e5223f51cda628ec1c35a24 /internal/config/helpers.gen.go
parent[chore]: Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#2338) (diff)
downloadgotosocial-e9e5dc5a40926e5320cb131b035c46b1e1b0bd59.tar.xz
[feature] add support for polls + receiving federated status edits (#2330)
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r--internal/config/helpers.gen.go75
1 files changed, 75 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go
index 415035bea..6e9b71812 100644
--- a/internal/config/helpers.gen.go
+++ b/internal/config/helpers.gen.go
@@ -3099,6 +3099,81 @@ func GetCacheNotificationMemRatio() float64 { return global.GetCacheNotification
// SetCacheNotificationMemRatio safely sets the value for global configuration 'Cache.NotificationMemRatio' field
func SetCacheNotificationMemRatio(v float64) { global.SetCacheNotificationMemRatio(v) }
+// GetCachePollMemRatio safely fetches the Configuration value for state's 'Cache.PollMemRatio' field
+func (st *ConfigState) GetCachePollMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.PollMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCachePollMemRatio safely sets the Configuration value for state's 'Cache.PollMemRatio' field
+func (st *ConfigState) SetCachePollMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.PollMemRatio = v
+ st.reloadToViper()
+}
+
+// CachePollMemRatioFlag returns the flag name for the 'Cache.PollMemRatio' field
+func CachePollMemRatioFlag() string { return "cache-poll-mem-ratio" }
+
+// GetCachePollMemRatio safely fetches the value for global configuration 'Cache.PollMemRatio' field
+func GetCachePollMemRatio() float64 { return global.GetCachePollMemRatio() }
+
+// SetCachePollMemRatio safely sets the value for global configuration 'Cache.PollMemRatio' field
+func SetCachePollMemRatio(v float64) { global.SetCachePollMemRatio(v) }
+
+// GetCachePollVoteMemRatio safely fetches the Configuration value for state's 'Cache.PollVoteMemRatio' field
+func (st *ConfigState) GetCachePollVoteMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.PollVoteMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCachePollVoteMemRatio safely sets the Configuration value for state's 'Cache.PollVoteMemRatio' field
+func (st *ConfigState) SetCachePollVoteMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.PollVoteMemRatio = v
+ st.reloadToViper()
+}
+
+// CachePollVoteMemRatioFlag returns the flag name for the 'Cache.PollVoteMemRatio' field
+func CachePollVoteMemRatioFlag() string { return "cache-poll-vote-mem-ratio" }
+
+// GetCachePollVoteMemRatio safely fetches the value for global configuration 'Cache.PollVoteMemRatio' field
+func GetCachePollVoteMemRatio() float64 { return global.GetCachePollVoteMemRatio() }
+
+// SetCachePollVoteMemRatio safely sets the value for global configuration 'Cache.PollVoteMemRatio' field
+func SetCachePollVoteMemRatio(v float64) { global.SetCachePollVoteMemRatio(v) }
+
+// GetCachePollVoteIDsMemRatio safely fetches the Configuration value for state's 'Cache.PollVoteIDsMemRatio' field
+func (st *ConfigState) GetCachePollVoteIDsMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.PollVoteIDsMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCachePollVoteIDsMemRatio safely sets the Configuration value for state's 'Cache.PollVoteIDsMemRatio' field
+func (st *ConfigState) SetCachePollVoteIDsMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.PollVoteIDsMemRatio = v
+ st.reloadToViper()
+}
+
+// CachePollVoteIDsMemRatioFlag returns the flag name for the 'Cache.PollVoteIDsMemRatio' field
+func CachePollVoteIDsMemRatioFlag() string { return "cache-poll-vote-ids-mem-ratio" }
+
+// GetCachePollVoteIDsMemRatio safely fetches the value for global configuration 'Cache.PollVoteIDsMemRatio' field
+func GetCachePollVoteIDsMemRatio() float64 { return global.GetCachePollVoteIDsMemRatio() }
+
+// SetCachePollVoteIDsMemRatio safely sets the value for global configuration 'Cache.PollVoteIDsMemRatio' field
+func SetCachePollVoteIDsMemRatio(v float64) { global.SetCachePollVoteIDsMemRatio(v) }
+
// GetCacheReportMemRatio safely fetches the Configuration value for state's 'Cache.ReportMemRatio' field
func (st *ConfigState) GetCacheReportMemRatio() (v float64) {
st.mutex.RLock()