summaryrefslogtreecommitdiff
path: root/internal/config/helpers.gen.go
diff options
context:
space:
mode:
authorLibravatar Vyr Cossont <VyrCossont@users.noreply.github.com>2024-06-06 09:38:02 -0700
committerLibravatar GitHub <noreply@github.com>2024-06-06 16:38:02 +0000
commit5e2d4fdb19eb4fcd4c0bbfb3e2f29067a58c88c8 (patch)
tree607006af6b4bb63bb625b39f3ca0fe869eb6ba95 /internal/config/helpers.gen.go
parent[bugfix] update media if more than just url changes (#2970) (diff)
downloadgotosocial-5e2d4fdb19eb4fcd4c0bbfb3e2f29067a58c88c8.tar.xz
[feature] User muting (#2960)
* User muting * Address review feedback * Rename uniqueness constraint on user_mutes to match convention * Remove unused account_id from where clause * Add UserMute to NewTestDB * Update test/envparsing.sh with new and fixed cache stuff * Address tobi's review comments * Make compiledUserMuteListEntry.expired consistent with UserMute.Expired * Make sure mute_expires_at is serialized as an explicit null for indefinite mutes --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r--internal/config/helpers.gen.go55
1 files changed, 53 insertions, 2 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go
index 2f37cbacb..edfe96e57 100644
--- a/internal/config/helpers.gen.go
+++ b/internal/config/helpers.gen.go
@@ -2,7 +2,7 @@
// GoToSocial
// Copyright (C) GoToSocial Authors admin@gotosocial.org
// SPDX-License-Identifier: AGPL-3.0-or-later
-//
+//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
@@ -2917,7 +2917,7 @@ func (st *ConfigState) SetCacheBlockIDsMemRatio(v float64) {
}
// CacheBlockIDsMemRatioFlag returns the flag name for the 'Cache.BlockIDsMemRatio' field
-func CacheBlockIDsMemRatioFlag() string { return "cache-block-mem-ratio" }
+func CacheBlockIDsMemRatioFlag() string { return "cache-block-ids-mem-ratio" }
// GetCacheBlockIDsMemRatio safely fetches the value for global configuration 'Cache.BlockIDsMemRatio' field
func GetCacheBlockIDsMemRatio() float64 { return global.GetCacheBlockIDsMemRatio() }
@@ -3775,6 +3775,56 @@ func GetCacheUserMemRatio() float64 { return global.GetCacheUserMemRatio() }
// SetCacheUserMemRatio safely sets the value for global configuration 'Cache.UserMemRatio' field
func SetCacheUserMemRatio(v float64) { global.SetCacheUserMemRatio(v) }
+// GetCacheUserMuteMemRatio safely fetches the Configuration value for state's 'Cache.UserMuteMemRatio' field
+func (st *ConfigState) GetCacheUserMuteMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.UserMuteMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCacheUserMuteMemRatio safely sets the Configuration value for state's 'Cache.UserMuteMemRatio' field
+func (st *ConfigState) SetCacheUserMuteMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.UserMuteMemRatio = v
+ st.reloadToViper()
+}
+
+// CacheUserMuteMemRatioFlag returns the flag name for the 'Cache.UserMuteMemRatio' field
+func CacheUserMuteMemRatioFlag() string { return "cache-user-mute-mem-ratio" }
+
+// GetCacheUserMuteMemRatio safely fetches the value for global configuration 'Cache.UserMuteMemRatio' field
+func GetCacheUserMuteMemRatio() float64 { return global.GetCacheUserMuteMemRatio() }
+
+// SetCacheUserMuteMemRatio safely sets the value for global configuration 'Cache.UserMuteMemRatio' field
+func SetCacheUserMuteMemRatio(v float64) { global.SetCacheUserMuteMemRatio(v) }
+
+// GetCacheUserMuteIDsMemRatio safely fetches the Configuration value for state's 'Cache.UserMuteIDsMemRatio' field
+func (st *ConfigState) GetCacheUserMuteIDsMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.UserMuteIDsMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCacheUserMuteIDsMemRatio safely sets the Configuration value for state's 'Cache.UserMuteIDsMemRatio' field
+func (st *ConfigState) SetCacheUserMuteIDsMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.UserMuteIDsMemRatio = v
+ st.reloadToViper()
+}
+
+// CacheUserMuteIDsMemRatioFlag returns the flag name for the 'Cache.UserMuteIDsMemRatio' field
+func CacheUserMuteIDsMemRatioFlag() string { return "cache-user-mute-ids-mem-ratio" }
+
+// GetCacheUserMuteIDsMemRatio safely fetches the value for global configuration 'Cache.UserMuteIDsMemRatio' field
+func GetCacheUserMuteIDsMemRatio() float64 { return global.GetCacheUserMuteIDsMemRatio() }
+
+// SetCacheUserMuteIDsMemRatio safely sets the value for global configuration 'Cache.UserMuteIDsMemRatio' field
+func SetCacheUserMuteIDsMemRatio(v float64) { global.SetCacheUserMuteIDsMemRatio(v) }
+
// GetCacheWebfingerMemRatio safely fetches the Configuration value for state's 'Cache.WebfingerMemRatio' field
func (st *ConfigState) GetCacheWebfingerMemRatio() (v float64) {
st.mutex.RLock()
@@ -4024,3 +4074,4 @@ func GetRequestIDHeader() string { return global.GetRequestIDHeader() }
// SetRequestIDHeader safely sets the value for global configuration 'RequestIDHeader' field
func SetRequestIDHeader(v string) { global.SetRequestIDHeader(v) }
+