summaryrefslogtreecommitdiff
path: root/internal/cliactions/server
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-12 10:10:24 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-12 10:10:24 +0100
commitf6492d12d948507021bbe934de94e87e20464c01 (patch)
tree6705d6ef6f3c4d70f3b3ebc77c2960d8e508cf37 /internal/cliactions/server
parentMerge pull request #213 from superseriousbusiness/alpine+node_upstep (diff)
parentfix keys used to access storage items (diff)
downloadgotosocial-f6492d12d948507021bbe934de94e87e20464c01.tar.xz
Merge pull request #214 from NyaaaWhatsUpDoc/improvement/update-storage-library
add git.iim.gay/grufwub/go-store for storage backend, replacing blob.Storage
Diffstat (limited to 'internal/cliactions/server')
-rw-r--r--internal/cliactions/server/server.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/cliactions/server/server.go b/internal/cliactions/server/server.go
index 3ef714fb0..e2f6a24b4 100644
--- a/internal/cliactions/server/server.go
+++ b/internal/cliactions/server/server.go
@@ -8,6 +8,7 @@ import (
"os/signal"
"syscall"
+ "git.iim.gay/grufwub/go-store/kv"
"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/api"
"github.com/superseriousbusiness/gotosocial/internal/api/client/account"
@@ -32,7 +33,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/user"
"github.com/superseriousbusiness/gotosocial/internal/api/s2s/webfinger"
"github.com/superseriousbusiness/gotosocial/internal/api/security"
- "github.com/superseriousbusiness/gotosocial/internal/blob"
"github.com/superseriousbusiness/gotosocial/internal/cliactions"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db/bundb"
@@ -76,7 +76,8 @@ var Start cliactions.GTSAction = func(ctx context.Context, c *config.Config, log
return fmt.Errorf("error creating router: %s", err)
}
- storageBackend, err := blob.NewLocal(c, log)
+ // Open the storage backend
+ storage, err := kv.OpenFile(c.StorageConfig.BasePath, nil)
if err != nil {
return fmt.Errorf("error creating storage backend: %s", err)
}
@@ -86,11 +87,11 @@ var Start cliactions.GTSAction = func(ctx context.Context, c *config.Config, log
timelineManager := timelineprocessing.NewManager(dbService, typeConverter, c, log)
// build backend handlers
- mediaHandler := media.New(c, dbService, storageBackend, log)
+ mediaHandler := media.New(c, dbService, storage, log)
oauthServer := oauth.New(dbService, log)
transportController := transport.NewController(c, dbService, &federation.Clock{}, http.DefaultClient, log)
federator := federation.NewFederator(dbService, federatingDB, transportController, c, log, typeConverter, mediaHandler)
- processor := processing.NewProcessor(c, typeConverter, federator, oauthServer, mediaHandler, storageBackend, timelineManager, dbService, log)
+ processor := processing.NewProcessor(c, typeConverter, federator, oauthServer, mediaHandler, storage, timelineManager, dbService, log)
if err := processor.Start(ctx); err != nil {
return fmt.Errorf("error starting processor: %s", err)
}