mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
chore: use Context interface
Imported from CityOfZion/neo-storm (16c6f9fab7de374196a4fb352d781abeebb384c1).
This commit is contained in:
parent
9d983ec77b
commit
90809ee73e
1 changed files with 6 additions and 6 deletions
|
@ -1,19 +1,19 @@
|
|||
package storage
|
||||
|
||||
// Context represents the storage context
|
||||
type Context interface{}
|
||||
type Context struct{}
|
||||
|
||||
// GetContext returns the storage context
|
||||
func GetContext() interface{} { return nil }
|
||||
func GetContext() Context { return Context{} }
|
||||
|
||||
// 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
|
||||
func Get(ctx interface{}, key interface{}) interface{} { return 0 }
|
||||
func Get(ctx Context, key interface{}) interface{} { return 0 }
|
||||
|
||||
// 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
|
||||
func Find(ctx interface{}, key interface{}) interface{} { return 0 }
|
||||
func Find(ctx Context, key interface{}) interface{} { return 0 }
|
||||
|
|
Loading…
Reference in a new issue