summaryrefslogtreecommitdiff
path: root/internal/storage/local.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-11-05 12:10:19 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-05 11:10:19 +0000
commitbcb80d3ff4a669d52d63950c8830427646c05884 (patch)
tree4aa95a83545b3f87a80fe4b625cb6f2ad9c4427f /internal/storage/local.go
parent[bugfix] Increase field size limits when registering apps (#958) (diff)
downloadgotosocial-bcb80d3ff4a669d52d63950c8830427646c05884.tar.xz
[chore] bump gruf/go-store to v2 (#953)
* [chore] bump gruf/go-store to v2 * no more boobs
Diffstat (limited to 'internal/storage/local.go')
-rw-r--r--internal/storage/local.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/storage/local.go b/internal/storage/local.go
index 103233219..3fde7f0b9 100644
--- a/internal/storage/local.go
+++ b/internal/storage/local.go
@@ -23,8 +23,8 @@ import (
"io"
"net/url"
- "codeberg.org/gruf/go-store/kv"
- "codeberg.org/gruf/go-store/storage"
+ "codeberg.org/gruf/go-store/v2/kv"
+ "codeberg.org/gruf/go-store/v2/storage"
)
type Local struct {
@@ -32,15 +32,15 @@ type Local struct {
}
func (l *Local) Get(ctx context.Context, key string) ([]byte, error) {
- return l.KVStore.Get(key)
+ return l.KVStore.Get(ctx, key)
}
func (l *Local) GetStream(ctx context.Context, key string) (io.ReadCloser, error) {
- return l.KVStore.GetStream(key)
+ return l.KVStore.GetStream(ctx, key)
}
func (l *Local) PutStream(ctx context.Context, key string, r io.Reader) error {
- err := l.KVStore.PutStream(key, r)
+ err := l.KVStore.PutStream(ctx, key, r)
if err == storage.ErrAlreadyExists {
return ErrAlreadyExists
}
@@ -48,7 +48,7 @@ func (l *Local) PutStream(ctx context.Context, key string, r io.Reader) error {
}
func (l *Local) Put(ctx context.Context, key string, value []byte) error {
- err := l.KVStore.Put(key, value)
+ err := l.KVStore.Put(ctx, key, value)
if err == storage.ErrAlreadyExists {
return ErrAlreadyExists
}
@@ -56,7 +56,7 @@ func (l *Local) Put(ctx context.Context, key string, value []byte) error {
}
func (l *Local) Delete(ctx context.Context, key string) error {
- return l.KVStore.Delete(key)
+ return l.KVStore.Delete(ctx, key)
}
func (l *Local) URL(ctx context.Context, key string) *url.URL {