neo-go/pkg/interop/storage/storage.go

25 lines
807 B
Go
Raw Normal View History

package storage
import "github.com/nspcc-dev/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.
2019-10-22 14:56:03 +00:00
// Context represents the storage context.
type Context struct{}
2019-10-22 14:56:03 +00:00
// GetContext returns the storage context.
func GetContext() Context { return Context{} }
2019-10-22 14:56:03 +00:00
// Put value at given key.
func Put(ctx Context, key interface{}, value interface{}) {}
2019-10-22 14:56:03 +00:00
// Get value matching given key.
func Get(ctx Context, key interface{}) interface{} { return 0 }
2019-10-22 14:56:03 +00:00
// 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{} }