kvexecutor

package
v0.0.0-...-579b097 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVData

type KVData struct {
	Collection string `json:"collection"` // optional
	Key        string `json:"key"`        // required
	Value      string `json:"value"`      // required for read, ignored for write
}

KVData contains the data to read/write a key. Key is required. Value is required for write and ignored for read. When Collection is empty string "", it will read/write state data. When Collection is not empty string "", it will read/write private data in the collection.

type KVExecutor

type KVExecutor struct{}

KVExecutor is a chaincode implementation that takes a KVData array as read parameter and a KVData array as write parameter, and then calls GetXXX/PutXXX methods to read and write state/collection data. Both input params should be marshalled json data and then base64 encoded.

func (*KVExecutor) Init

Init initializes chaincode ===========================

func (*KVExecutor) Invoke

Invoke - Our entry point for Invocations ========================================

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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