Documentation ¶
Index ¶
- Variables
- func InitializeNetwork(config, matcher []byte)
- func New(ctx activity.InitContext) (activity.Activity, error)
- func ReadFile(filePath string) ([]byte, error)
- func Subst(path string) string
- type Activity
- type Attribute
- type ConnectorSpec
- type FabricClient
- type Input
- type OrgFilter
- type Output
- type Settings
Constants ¶
This section is empty.
Variables ¶
View Source
var EntityMatcher []byte
EntityMatcher is the content of fabric local entity matcher file
View Source
var NetworkConfig []byte
NetworkConfig is the content of fabric network config file
Functions ¶
func InitializeNetwork ¶
func InitializeNetwork(config, matcher []byte)
InitializeNetwork can be called to initialize Fabric network config
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
Activity fabric request activity struct
type ConnectorSpec ¶
type ConnectorSpec struct { Name string NetworkConfig []byte EntityMatchers []byte OrgName string UserName string ChannelID string TimeoutMillis int Endpoints []string UserOrgOnly bool }
ConnectorSpec contains configuration parameters of a Fabric connector
type FabricClient ¶
type FabricClient struct {
// contains filtered or unexported fields
}
FabricClient holds fabric client pointers for chaincode invocations.
func NewFabricClient ¶
func NewFabricClient(config ConnectorSpec) (*FabricClient, error)
NewFabricClient returns a new or cached fabric client
func (*FabricClient) ExecuteChaincode ¶
func (c *FabricClient) ExecuteChaincode(ccID, fcn string, args [][]byte, transient map[string][]byte) ([]byte, int, error)
ExecuteChaincode sends invocation request to Fabric network
func (*FabricClient) QueryChaincode ¶
func (c *FabricClient) QueryChaincode(ccID, fcn string, args [][]byte, transient map[string][]byte) ([]byte, int, error)
QueryChaincode sends query request to Fabric network
type Input ¶
type Input struct { OrgName string `md:"orgName"` UserName string `md:"userName,required"` Parameters map[string]interface{} `md:"parameters"` Transient map[string]interface{} `md:"transient"` TimeoutMillis int `md:"timeoutMillis"` Endpoints []string `md:"endpoints"` }
Input of the activity
type OrgFilter ¶ added in v0.0.4
type OrgFilter struct {
MSPID string
}
OrgFilter implements TargetFilter interface for target peers
type Output ¶
type Output struct { Code int `md:"code"` Message string `md:"message"` Result interface{} `md:"result"` }
Output of the activity
type Settings ¶
type Settings struct { ConnectionName string `md:"connectionName,required"` ChannelID string `md:"channelID,required"` ChaincodeID string `md:"chaincodeID,required"` TransactionName string `md:"transactionName,required"` Arguments []*Attribute `md:"arguments"` RequestType string `md:"requestType,required"` UserOrgOnly bool `md:"userOrgOnly"` }
Settings of the activity
Click to show internal directories.
Click to hide internal directories.