Documentation ¶
Index ¶
- func EventPayloadIs(event *peer.ChaincodeEvent, target interface{}) interface{}
- func PayloadBytes(response peer.Response, expectedValue []byte) []byte
- func PayloadInt(response peer.Response, expectedValue int) int
- func PayloadIs(response peer.Response, target interface{}) interface{}
- func PayloadString(response peer.Response, expectedValue string) string
- func ResponseError(response peer.Response, errorSubstr ...interface{}) peer.Response
- func ResponseOk(response peer.Response, okSubstr ...string) peer.Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventPayloadIs ¶
func EventPayloadIs(event *peer.ChaincodeEvent, target interface{}) interface{}
EventPayloadIs expects peer.ChaincodeEvent payload can be marshalled to target interface{} and returns converted value
func PayloadBytes ¶ added in v0.3.0
PayloadBytes expects response is ok and compares response.Payload with expected value
func PayloadIs ¶
PayloadIs expects peer.Response payload can be marshalled to target interface{} and returns converted value
func PayloadString ¶
PayloadString expects payload content is string
func ResponseError ¶
ResponseError expects peer.Response has shim.ERROR status and message has errorSubstr prefix
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.