fabrequest

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new Activity

Types

type Activity

type Activity struct {
}

Activity fabric request activity struct

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

type Input

type Input struct {
	FabricConnector map[string]interface{} `md:"connectionName,required"`
	RequestType     string                 `md:"requestType,required"`
	OrgName         string                 `md:"orgName"`
	UserName        string                 `md:"userName,required"`
	ChaincodeID     string                 `md:"chaincodeID,required"`
	TransactionName string                 `md:"transactionName,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

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

FromMap sets activity input values from a map

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

ToMap converts activity input to a map

type Output

type Output struct {
	Code    int         `md:"code"`
	Message string      `md:"message"`
	Result  interface{} `md:"result"`
}

Output of the activity

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

FromMap sets activity output values from a map

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

ToMap converts activity output to a map

type Settings

type Settings struct {
}

Settings of the activity

Jump to

Keyboard shortcuts

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