state

package
v0.0.0-...-06981e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStateNotFound = errors.New("State was not found")
)

Technical state errors TODO: make errors constant

Functions

func GetState

func GetState(ctx contractapi.TransactionContextInterface, key string, v interface{}) (err error)

GetState is a function to get data from the World State that will return an error if the state does not exist and that will unmarshal to a specified empty interface if found

func PutState

func PutState(ctx contractapi.TransactionContextInterface, key string, v interface{}) (err error)

PutState takes care of marshalling the state value before storing it in the World State with the specified key

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL