Documentation ¶
Index ¶
- func ExtractFileContent(fileSelectorValue interface{}) ([]byte, error)
- func GetActivityInputSchema(ctx activity.Context, name string) (string, error)
- func GetSettings(connector map[string]interface{}) (map[string]interface{}, error)
- func ReadFile(filePath string) ([]byte, error)
- func Subst(path string) string
- type ConnectorSpec
- type FabricClient
- type ParameterIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFileContent ¶
ExtractFileContent returns content of a fileselector field
func GetActivityInputSchema ¶
GetActivityInputSchema returns schema of an activity input attribute
func GetSettings ¶
GetSettings returns map of parameter values of a connector
Types ¶
type ConnectorSpec ¶
type ConnectorSpec struct { Name string NetworkConfig []byte EntityMatchers []byte OrgName string UserName string ChannelID string TimeoutMillis int Endpoints []string }
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 ParameterIndex ¶
type ParameterIndex struct { Name string JSONType string // contains filtered or unexported fields }
ParameterIndex stores transaction parameters and its location in raw JSON schema string start and end location is used to sort the parameter list to match the parameter order in schema
func OrderedParameters ¶
func OrderedParameters(schemaData []byte) ([]ParameterIndex, error)
OrderedParameters returns parameters of a JSON schema object sorted by their position in schema definition This is necessary because Golang JSON parser does not maintain the sequence of object parameters.