feat: added KV storage interface
This commit is contained in:
parent
4d33b12fe0
commit
5c4bbe0b58
3 changed files with 44 additions and 0 deletions
13
pkg/storage/storage.go
Normal file
13
pkg/storage/storage.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package storage
|
||||
|
||||
type KVStore interface {
|
||||
Get(k string) (any, error)
|
||||
Set(k string, v any) error
|
||||
GetData() any
|
||||
}
|
||||
|
||||
type KVStaticStore[T any] interface {
|
||||
Get(k string) (T, error)
|
||||
Set(k string, v T) error
|
||||
GetData() T
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue