sdkprovider

package
v0.0.0-...-7fe3f82 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabSdkProvider

type FabSdkProvider struct {
	Sdk      *fabsdk.FabricSDK
	Orgs     []*OrgInstance
	Orderers []*OrdererInstance
}

func NewFabSdkProvider

func NewFabSdkProvider() (*FabSdkProvider, error)

func (*FabSdkProvider) CreateChannel

func (f *FabSdkProvider) CreateChannel(channelID string) (helpers.TransactionID, pb.StatusCode, error)

func (*FabSdkProvider) InstallCC

func (f *FabSdkProvider) InstallCC(ccID, ccVersion, ccPath string) (pb.StatusCode, error)

func (*FabSdkProvider) InstantiateCC

func (f *FabSdkProvider) InstantiateCC(channelID, ccID, ccVersion, ccPath, ccPolicy string, args [][]byte) (helpers.TransactionID, pb.StatusCode, error)

func (*FabSdkProvider) InvokeCC

func (f *FabSdkProvider) InvokeCC(channelID, ccID, function string, args [][]byte) ([]byte, helpers.TransactionID, pb.StatusCode, error)

func (*FabSdkProvider) JoinChannel

func (f *FabSdkProvider) JoinChannel(channelID string) (pb.StatusCode, error)

func (*FabSdkProvider) QueryCC

func (f *FabSdkProvider) QueryCC(channelID, ccID, function string, args [][]byte) ([]byte, pb.StatusCode, error)

func (*FabSdkProvider) UpgradeCC

func (f *FabSdkProvider) UpgradeCC(channelID, ccID, ccVersion, ccPath, ccPolicy string, args [][]byte) (helpers.TransactionID, pb.StatusCode, error)

type OrdererInstance

type OrdererInstance struct {
	Config      *helpers.OrderderInfo
	AdminClient *resmgmt.Client
}

type OrgInstance

type OrgInstance struct {
	Config      *helpers.OrgInfo
	AdminClient *resmgmt.Client
	MspClient   *mspclient.Client
	Peers       []fab.Peer
}

type SdkProvider

type SdkProvider interface {
	CreateChannel(channelID string) (TransactionID, pb.StatusCode, error)
	JoinChannel(channelID string) (pb.StatusCode, error)
	InstallCC(ccID, ccVersion, ccPath string) (pb.StatusCode, error)
	InstantiateCC(channelID, ccID, ccVersion, ccPath, ccPolicy string, args [][]byte) (TransactionID, pb.StatusCode, error)
	UpgradeCC(channelID, ccID, ccVersion, ccPath, ccPolicy string, args [][]byte) (TransactionID, pb.StatusCode, error)
	InvokeCC(channelID, ccID, function string, args [][]byte) ([]byte, TransactionID, pb.StatusCode, error)
	QueryCC(channelID, ccID, function string, args [][]byte) ([]byte, pb.StatusCode, error)
}

Jump to

Keyboard shortcuts

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