forked from TrueCloudLab/neoneo-go
a1e3655560
neo-storm has developed more wrappers for syscall APIs, so they can and should be used as a drop-in replacement for pkg/vm/api. Moving it out of vm, as it's not exactly related to the VM itself.
24 lines
803 B
Go
24 lines
803 B
Go
package storage
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/interop/iterator"
|
|
|
|
// Package storage provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-go framework.
|
|
|
|
// Context represents the storage context
|
|
type Context struct{}
|
|
|
|
// GetContext returns the storage context
|
|
func GetContext() Context { return Context{} }
|
|
|
|
// Put value at given key
|
|
func Put(ctx Context, key interface{}, value interface{}) {}
|
|
|
|
// Get value matching given key
|
|
func Get(ctx Context, key interface{}) interface{} { return 0 }
|
|
|
|
// Delete key value pair from storage
|
|
func Delete(ctx Context, key interface{}) {}
|
|
|
|
// Find returns an iterator.Iterator over the keys that matched the given key.
|
|
func Find(ctx Context, key interface{}) iterator.Iterator { return iterator.Iterator{} }
|