move file backend to the platform service (#21365)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b30e511ffe
Коммит
2ce3e81490
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/config"
|
||||
"github.com/mattermost/mattermost-server/v6/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/filestore"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/v6/store"
|
||||
"github.com/mattermost/mattermost-server/v6/store/localcachelayer"
|
||||
@@ -74,6 +75,13 @@ func Config(dsn string, readOnly bool, configDefaults *model.Config) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func SetFileStore(filestore filestore.FileBackend) Option {
|
||||
return func(ps *PlatformService) error {
|
||||
ps.filestore = filestore
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// ConfigStore applies the given config store, typically to replace the traditional sources with a memory store for testing.
|
||||
func ConfigStore(configStore *config.Store) Option {
|
||||
return func(ps *PlatformService) error {
|
||||
|
||||
Ссылка в новой задаче
Block a user