2018-08-20 13:22:46 +02:00
|
|
|
package storage
|
|
|
|
|
2020-03-03 17:21:42 +03:00
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop/iterator"
|
2018-08-31 10:23:57 +02:00
|
|
|
|
2018-08-21 12:57:48 +02:00
|
|
|
// Package storage provides function signatures that can be used inside
|
2019-08-15 19:41:51 +03:00
|
|
|
// smart contracts that are written in the neo-go framework.
|
2018-08-21 12:57:48 +02:00
|
|
|
|
2019-10-22 17:56:03 +03:00
|
|
|
// Context represents the storage context.
|
2018-08-21 09:11:25 +02:00
|
|
|
type Context struct{}
|
2018-08-20 13:22:46 +02:00
|
|
|
|
2019-10-22 17:56:03 +03:00
|
|
|
// GetContext returns the storage context.
|
2018-08-21 09:11:25 +02:00
|
|
|
func GetContext() Context { return Context{} }
|
2018-08-20 13:22:46 +02:00
|
|
|
|
2019-10-22 17:56:03 +03:00
|
|
|
// Put value at given key.
|
2018-08-21 09:11:25 +02:00
|
|
|
func Put(ctx Context, key interface{}, value interface{}) {}
|
2018-08-20 13:22:46 +02:00
|
|
|
|
2019-10-22 17:56:03 +03:00
|
|
|
// Get value matching given key.
|
2018-08-21 09:11:25 +02:00
|
|
|
func Get(ctx Context, key interface{}) interface{} { return 0 }
|
2018-08-20 13:22:46 +02:00
|
|
|
|
2019-10-22 17:56:03 +03:00
|
|
|
// Delete key value pair from storage.
|
2018-08-21 09:11:25 +02:00
|
|
|
func Delete(ctx Context, key interface{}) {}
|
2018-08-20 13:22:46 +02:00
|
|
|
|
2018-08-31 10:23:57 +02:00
|
|
|
// Find returns an iterator.Iterator over the keys that matched the given key.
|
|
|
|
func Find(ctx Context, key interface{}) iterator.Iterator { return iterator.Iterator{} }
|