debug

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	InvokeStateCleanFunc  = `StateClean`
	QueryStateKeysFunc    = `StateKeys`
	QueryStateGetFunc     = `StateGet`
	InvokeStatePutFunc    = `StatePut`
	InvokeStateDeleteFunc = `StateDelete`
)

Variables

View Source
var (
	// KeyParam parameter for get, put, delete data from state
	KeyParam = param.Strings(`key`)

	// PrefixParam parameter for key, value lists
	PrefixParam = param.Strings(`prefix`)

	// ValueParam  parameter for putting value in state
	ValueParam = param.Bytes(`value`)
)

Functions

func AddHandlers

func AddHandlers(r *router.Group, prefix string, middleware ...router.MiddlewareFunc)

AddHandler adds debug handlers to router, allows to add more middleware for example for access control

func DelStateByPrefixes

func DelStateByPrefixes(stub shim.ChaincodeStubInterface, prefixes []string) (map[string]int, error)

DelStateByPrefixes deletes from state entries with matching key prefix

func InvokeStateClean

func InvokeStateClean(c router.Context) (interface{}, error)

InvokeStateClean delete entries from state, prefix []string contains key prefixes or whole key

func InvokeStateDelete

func InvokeStateDelete(c router.Context) (interface{}, error)

QueryStateGet router handler delete state entry by key ([]string)

func InvokeStatePut

func InvokeStatePut(c router.Context) (interface{}, error)

InvokeValueByKeyPut router handler puts value in chaincode state with composite key, created with key parts ([]string)

func QueryKeysList

func QueryKeysList(c router.Context) (interface{}, error)

QueryKeysList router handler returns string slice with keys by prefix (object type)

func QueryStateGet

func QueryStateGet(c router.Context) (interface{}, error)

QueryStateGet router handler returns state entry by key ([]string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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