chore: use Context interface

Imported from CityOfZion/neo-storm (16c6f9fab7de374196a4fb352d781abeebb384c1).
This commit is contained in:
Jeroen Peeters 2018-08-21 09:11:25 +02:00 committed by Roman Khimov
parent 9d983ec77b
commit 90809ee73e

View file

@ -1,19 +1,19 @@
package storage package storage
// Context represents the storage context // Context represents the storage context
type Context interface{} type Context struct{}
// GetContext returns the storage context // GetContext returns the storage context
func GetContext() interface{} { return nil } func GetContext() Context { return Context{} }
// Put value at given key // Put value at given key
func Put(ctx interface{}, key interface{}, value interface{}) {} func Put(ctx Context, key interface{}, value interface{}) {}
// Get value matching given key // Get value matching given key
func Get(ctx interface{}, key interface{}) interface{} { return 0 } func Get(ctx Context, key interface{}) interface{} { return 0 }
// Delete key value pair from storage // Delete key value pair from storage
func Delete(ctx interface{}, key interface{}) {} func Delete(ctx Context, key interface{}) {}
// Find values stored on keys partially matching given key // Find values stored on keys partially matching given key
func Find(ctx interface{}, key interface{}) interface{} { return 0 } func Find(ctx Context, key interface{}) interface{} { return 0 }