sdk: setup KVStore.

This commit is contained in:
fiatjaf
2025-01-14 23:11:37 -03:00
parent e89b817f7d
commit faa4fabffe
7 changed files with 342 additions and 18 deletions

16
sdk/kvstore/interface.go Normal file
View File

@@ -0,0 +1,16 @@
package kvstore
// KVStore is a simple key-value store interface
type KVStore interface {
// Get retrieves a value for a given key. Returns nil if not found.
Get(key []byte) ([]byte, error)
// Set stores a value for a given key
Set(key []byte, value []byte) error
// Delete removes a key and its value
Delete(key []byte) error
// Close releases any resources held by the store
Close() error
}