Documentation
¶
Index ¶
- func NewEndorseView(chaincode, function string, args ...interface{}) *endorseChaincodeView
- func NewInvokeView(chaincode, function string, args ...interface{}) *invokeChaincodeView
- func NewQueryView(chaincode, function string, args ...interface{}) *queryChaincodeView
- type Chaincode
- type Endorse
- type Event
- type EventCallback
- type InvokeCall
- type ListenToEventsView
- type Query
- type RegisterChaincodeCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEndorseView ¶
func NewEndorseView(chaincode, function string, args ...interface{}) *endorseChaincodeView
func NewInvokeView ¶
func NewInvokeView(chaincode, function string, args ...interface{}) *invokeChaincodeView
func NewQueryView ¶
func NewQueryView(chaincode, function string, args ...interface{}) *queryChaincodeView
Types ¶
type Endorse ¶
type Endorse interface { WithInvokerIdentity(identity view.Identity) Endorse WithTransientEntry(k string, v interface{}) error WithEndorsersByMSPIDs(ds ...string) WithEndorsersFromMyOrg() WithTxID(txID fabric.TxID) Endorse Call() (*fabric.Envelope, error) WithNumRetries(retries uint) WithRetrySleep(sleep time.Duration) }
type EventCallback ¶
EventCallback is used to parse the received events. It takes in input the generated event and return a boolean and an error. If the boolean is true, no more events are passed to this callback function. If an error occurred, no more events are passed as well.
type InvokeCall ¶
type InvokeCall struct { InvokerIdentity view.Identity Network string Channel string ChaincodePath string ChaincodeName string ChaincodeVersion string TransientMap map[string]interface{} EndorsersMSPIDs []string EndorsersFromMyOrg bool Function string Args []interface{} MatchEndorsementPolicy bool SetNumRetries bool NumRetries uint SetRetrySleep bool RetrySleep time.Duration TxID fabric.TxID }
type ListenToEventsView ¶ added in v0.4.0
type ListenToEventsView struct {
*RegisterChaincodeCall
}
func NewListenToEventsView ¶
func NewListenToEventsView(chaincode string, callBack EventCallback) *ListenToEventsView
NewListenToEventsView register a listener for the events generated by the passed chaincode and call the passed callback when an event is caught.
func NewListenToEventsViewWithContext ¶ added in v0.4.0
func NewListenToEventsViewWithContext(context context.Context, chaincode string, callBack EventCallback) *ListenToEventsView
func (*ListenToEventsView) Call ¶ added in v0.4.0
func (r *ListenToEventsView) Call(context view.Context) (interface{}, error)
func (*ListenToEventsView) RegisterChaincodeEvents ¶ added in v0.4.0
func (r *ListenToEventsView) RegisterChaincodeEvents(viewContext view.Context) error
type Query ¶
type Query interface { WithInvokerIdentity(identity view.Identity) Query WithTransientEntry(k string, v interface{}) error WithEndorsersByMSPIDs(ds ...string) WithEndorsersFromMyOrg() WithMatchEndorsementPolicy() Call() ([]byte, error) WithNumRetries(retries uint) WithRetrySleep(sleep time.Duration) }
Click to show internal directories.
Click to hide internal directories.