stubwrapper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StubWrapper

type StubWrapper struct {
	Stub        shim.ChaincodeStubInterface
	WriteSet    map[string][]byte
	PvtWriteSet map[string]map[string][]byte
}

func (*StubWrapper) CreateCompositeKey

func (sw *StubWrapper) CreateCompositeKey(objectType string, attributes []string) (string, errors.ICCError)

func (*StubWrapper) DelPrivateData

func (sw *StubWrapper) DelPrivateData(collection, key string) errors.ICCError

func (*StubWrapper) DelState

func (sw *StubWrapper) DelState(key string) errors.ICCError

func (*StubWrapper) GetCommittedPrivateData

func (sw *StubWrapper) GetCommittedPrivateData(collection, key string) ([]byte, errors.ICCError)

func (*StubWrapper) GetCommittedState

func (sw *StubWrapper) GetCommittedState(key string) ([]byte, errors.ICCError)

func (*StubWrapper) GetHistoryForKey

func (sw *StubWrapper) GetHistoryForKey(key string) (shim.HistoryQueryIteratorInterface, errors.ICCError)

GetHistoryForKey does not return non-commited ledger states

func (*StubWrapper) GetMSPID

func (sw *StubWrapper) GetMSPID() (string, errors.ICCError)

GetMSPID wraps cid.GetMSPID allowing for automated testing

func (*StubWrapper) GetPrivateData

func (sw *StubWrapper) GetPrivateData(collection, key string) ([]byte, errors.ICCError)

func (*StubWrapper) GetPrivateDataHash

func (sw *StubWrapper) GetPrivateDataHash(collection, key string) ([]byte, errors.ICCError)

func (*StubWrapper) GetPrivateDataQueryResult

func (sw *StubWrapper) GetPrivateDataQueryResult(collection, query string) (shim.StateQueryIteratorInterface, errors.ICCError)

GetPrivateDataQueryResult does not return non-commited ledger states

func (*StubWrapper) GetQueryResult

func (sw *StubWrapper) GetQueryResult(query string) (shim.StateQueryIteratorInterface, errors.ICCError)

GetQueryResult does not return non-commited ledger states

func (*StubWrapper) GetQueryResultWithPagination

func (sw *StubWrapper) GetQueryResultWithPagination(query string, pageSize int32,
	bookmark string) (shim.StateQueryIteratorInterface, *pb.QueryResponseMetadata, errors.ICCError)

GetQueryResultWithPagination does not return non-commited ledger states

func (*StubWrapper) GetState

func (sw *StubWrapper) GetState(key string) ([]byte, errors.ICCError)

func (*StubWrapper) GetStateByPartialCompositeKey

func (sw *StubWrapper) GetStateByPartialCompositeKey(objectType string, keys []string) (shim.StateQueryIteratorInterface, errors.ICCError)

GetStateByPartialCompositeKey does not return non-commited ledger states

func (*StubWrapper) PutPrivateData

func (sw *StubWrapper) PutPrivateData(collection, key string, obj []byte) errors.ICCError

func (*StubWrapper) PutState

func (sw *StubWrapper) PutState(key string, obj []byte) errors.ICCError

func (*StubWrapper) SetEvent

func (sw *StubWrapper) SetEvent(name string, payload []byte) errors.ICCError

func (*StubWrapper) SplitCompositeKey

func (sw *StubWrapper) SplitCompositeKey(compositeKey string) (string, []string, errors.ICCError)

SplitCompositeKey returns composite keys

Jump to

Keyboard shortcuts

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