diff options
author | 2022-07-03 12:08:30 +0200 | |
---|---|---|
committer | 2022-07-03 12:08:30 +0200 | |
commit | 9d0df426da59275f7aeaf46004befe5a778da274 (patch) | |
tree | 82c6bb98597e44c4f70b731336dcdfc839412c1c /testrig/federator.go | |
parent | [chore] Re-enable source tar but name it clearly as source (#683) (diff) | |
download | gotosocial-9d0df426da59275f7aeaf46004befe5a778da274.tar.xz |
[feature] S3 support (#674)
* feat: vendor minio client
* feat: introduce storage package with s3 support
* feat: serve s3 files directly
this saves a lot of bandwith as the files are fetched from the object
store directly
* fix: use explicit local storage in tests
* feat: integrate s3 storage with the main server
* fix: add s3 config to cli tests
* docs: explicitly set values in example config
also adds license header to the storage package
* fix: use better http status code on s3 redirect
HTTP 302 Found is the best fit, as it signifies that the resource
requested was found but not under its presumed URL
307/TemporaryRedirect would mean that this resource is usually located
here, not in this case
303/SeeOther indicates that the redirection does not link to the
requested resource but to another page
* refactor: use context in storage driver interface
Diffstat (limited to 'testrig/federator.go')
-rw-r--r-- | testrig/federator.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testrig/federator.go b/testrig/federator.go index 0546325ab..2c709bc81 100644 --- a/testrig/federator.go +++ b/testrig/federator.go @@ -19,16 +19,16 @@ package testrig import ( - "codeberg.org/gruf/go-store/kv" "github.com/superseriousbusiness/gotosocial/internal/concurrency" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/media" "github.com/superseriousbusiness/gotosocial/internal/messages" + "github.com/superseriousbusiness/gotosocial/internal/storage" "github.com/superseriousbusiness/gotosocial/internal/transport" ) // NewTestFederator returns a federator with the given database and (mock!!) transport controller. -func NewTestFederator(db db.DB, tc transport.Controller, storage *kv.KVStore, mediaManager media.Manager, fedWorker *concurrency.WorkerPool[messages.FromFederator]) federation.Federator { +func NewTestFederator(db db.DB, tc transport.Controller, storage storage.Driver, mediaManager media.Manager, fedWorker *concurrency.WorkerPool[messages.FromFederator]) federation.Federator { return federation.NewFederator(db, NewTestFederatingDB(db, fedWorker), tc, NewTestTypeConverter(db), mediaManager) } |