Help us shape the future of Go! Take the 2026 Go Developer Survey

debug

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 5 Imported by: 0

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