2018-08-20 11:22:46 +00:00
|
|
|
package storage
|
|
|
|
|
2019-08-15 16:41:51 +00:00
|
|
|
import "github.com/CityOfZion/neo-go/pkg/interop/iterator"
|
2018-08-31 08:23:57 +00:00
|
|
|
|
2018-08-21 10:57:48 +00:00
|
|
|
// Package storage provides function signatures that can be used inside
|
2019-08-15 16:41:51 +00:00
|
|
|
// smart contracts that are written in the neo-go framework.
|
2018-08-21 10:57:48 +00:00
|
|
|
|
2018-08-20 11:22:46 +00:00
|
|
|
// Context represents the storage context
|
2018-08-21 07:11:25 +00:00
|
|
|
type Context struct{}
|
2018-08-20 11:22:46 +00:00
|
|
|
|
|
|
|
// GetContext returns the storage context
|
2018-08-21 07:11:25 +00:00
|
|
|
func GetContext() Context { return Context{} }
|
2018-08-20 11:22:46 +00:00
|
|
|
|
|
|
|
// Put value at given key
|
2018-08-21 07:11:25 +00:00
|
|
|
func Put(ctx Context, key interface{}, value interface{}) {}
|
2018-08-20 11:22:46 +00:00
|
|
|
|
|
|
|
// Get value matching given key
|
2018-08-21 07:11:25 +00:00
|
|
|
func Get(ctx Context, key interface{}) interface{} { return 0 }
|
2018-08-20 11:22:46 +00:00
|
|
|
|
|
|
|
// Delete key value pair from storage
|
2018-08-21 07:11:25 +00:00
|
|
|
func Delete(ctx Context, key interface{}) {}
|
2018-08-20 11:22:46 +00:00
|
|
|
|
2018-08-31 08:23:57 +00: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{} }
|