diff options
author | 2023-10-30 18:35:11 +0100 | |
---|---|---|
committer | 2023-10-30 17:35:11 +0000 | |
commit | 4dc0547dc0e80a4289f46cd8ee5b3aaf855f1f1e (patch) | |
tree | 465b66e88a1defdae6c29f86e9e1a3269dc474ff /internal/config/helpers.gen.go | |
parent | [chore]: Bump github.com/google/uuid from 1.3.1 to 1.4.0 (#2315) (diff) | |
download | gotosocial-4dc0547dc0e80a4289f46cd8ee5b3aaf855f1f1e.tar.xz |
[feature] Customizable media cleaner schedule (#2304)
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r-- | internal/config/helpers.gen.go | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index 80687eb66..415035bea 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -1224,6 +1224,56 @@ func GetMediaEmojiRemoteMaxSize() bytesize.Size { return global.GetMediaEmojiRem // SetMediaEmojiRemoteMaxSize safely sets the value for global configuration 'MediaEmojiRemoteMaxSize' field func SetMediaEmojiRemoteMaxSize(v bytesize.Size) { global.SetMediaEmojiRemoteMaxSize(v) } +// GetMediaCleanupFrom safely fetches the Configuration value for state's 'MediaCleanupFrom' field +func (st *ConfigState) GetMediaCleanupFrom() (v string) { + st.mutex.RLock() + v = st.config.MediaCleanupFrom + st.mutex.RUnlock() + return +} + +// SetMediaCleanupFrom safely sets the Configuration value for state's 'MediaCleanupFrom' field +func (st *ConfigState) SetMediaCleanupFrom(v string) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.MediaCleanupFrom = v + st.reloadToViper() +} + +// MediaCleanupFromFlag returns the flag name for the 'MediaCleanupFrom' field +func MediaCleanupFromFlag() string { return "media-cleanup-from" } + +// GetMediaCleanupFrom safely fetches the value for global configuration 'MediaCleanupFrom' field +func GetMediaCleanupFrom() string { return global.GetMediaCleanupFrom() } + +// SetMediaCleanupFrom safely sets the value for global configuration 'MediaCleanupFrom' field +func SetMediaCleanupFrom(v string) { global.SetMediaCleanupFrom(v) } + +// GetMediaCleanupEvery safely fetches the Configuration value for state's 'MediaCleanupEvery' field +func (st *ConfigState) GetMediaCleanupEvery() (v time.Duration) { + st.mutex.RLock() + v = st.config.MediaCleanupEvery + st.mutex.RUnlock() + return +} + +// SetMediaCleanupEvery safely sets the Configuration value for state's 'MediaCleanupEvery' field +func (st *ConfigState) SetMediaCleanupEvery(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.MediaCleanupEvery = v + st.reloadToViper() +} + +// MediaCleanupEveryFlag returns the flag name for the 'MediaCleanupEvery' field +func MediaCleanupEveryFlag() string { return "media-cleanup-every" } + +// GetMediaCleanupEvery safely fetches the value for global configuration 'MediaCleanupEvery' field +func GetMediaCleanupEvery() time.Duration { return global.GetMediaCleanupEvery() } + +// SetMediaCleanupEvery safely sets the value for global configuration 'MediaCleanupEvery' field +func SetMediaCleanupEvery(v time.Duration) { global.SetMediaCleanupEvery(v) } + // GetStorageBackend safely fetches the Configuration value for state's 'StorageBackend' field func (st *ConfigState) GetStorageBackend() (v string) { st.mutex.RLock() |