diff options
| author | Ewy~ <ewy0@protonmail.com> | 2026-03-31 17:18:35 +0200 |
|---|---|---|
| committer | Ewy~ <ewy0@protonmail.com> | 2026-03-31 17:18:35 +0200 |
| commit | cf085e93b7abc53b8ecc78c07210384e0ff8d516 (patch) | |
| tree | 270bc83c7e4d1c468bd7fcc61d2d65d6f447eda6 /storage/storage.go | |
initial commit
Diffstat (limited to 'storage/storage.go')
| -rw-r--r-- | storage/storage.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/storage.go b/storage/storage.go new file mode 100644 index 0000000..94d7056 --- /dev/null +++ b/storage/storage.go @@ -0,0 +1,15 @@ +package storage + +import ( + "github.com/google/uuid" +) + +type Storage[T any, K comparable] interface { + Save(item T) (K, error) + Update(item T) error + Load(key K) (*T, error) + Delete(item T) error + Close() error +} + +var Current Storage[Link, uuid.UUID] |
