fabricclient

package
v0.0.0-...-6665de4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright SecureKey Technologies Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (

	// ConfigUserID ..
	ConfigUserID = configTreeNameFabricSDK + ".user.id"
)

Variables

This section is empty.

Functions

func AddExtraRetryableCodes

func AddExtraRetryableCodes(codes map[status.Group][]status.Code)

AddExtraRetryableCodes Add extra retryable codes that are not part of SDK's default, but are needed for our application

func EnrollMemberIfNecessary

func EnrollMemberIfNecessary(fabricSDK *fabsdk.FabricSDK, userID string) error

EnrollMemberIfNecessary ..

func GetDefaultOrganizationConfig

func GetDefaultOrganizationConfig(fabricSDK *fabsdk.FabricSDK) (string, *fabapi.OrganizationConfig, error)

GetDefaultOrganizationConfig ..

func SetupClientConfFile

func SetupClientConfFile() ([]byte, error)

SetupClientConfFile ..

Types

type CCResponse

type CCResponse struct {
	Payload     []byte
	FabricTxnID string
}

CCResponse ...

type Client

type Client interface {

	// InvokeCC invokes a chancode on the specified channel
	InvokeCC(channelID string, chainCodeID string, args []string, transientData map[string][]byte) (data *CCResponse, err error)

	// QueryCC queries a chaincode
	QueryCC(maxAttempts int, channelID string, chainCodeID string, args []string, transientData map[string][]byte) (data *CCResponse, err error)

	// QueryCCAtPeer query a chaincode from specified peer
	QueryCCAtPeer(maxAttempts int, channelID string, chainCodeID string, args []string, transientData map[string][]byte, peerURL string) (data *CCResponse, err error)

	// QueryCCAtMSP query a chaincode from specified MSP
	QueryCCAtMSP(maxAttempts int, channelID string, chainCodeID string, args []string, transientData map[string][]byte, MSPID string) (data *CCResponse, err error)

	// QueryCCAtOwnOrg query a chaincode from within one's own organziation
	QueryCCAtOwnOrg(maxAttempts int, channelID string, chainCodeID string, args []string, transientData map[string][]byte) (data *CCResponse, err error)

	// ChannelClient returns a channel client for the given channel id
	ChannelClient(channelID string) (*channel.Client, error)

	// ConsortiumChannelID return channel ID of consortium channel
	ConsortiumChannelID() string

	// OrgChannelID return channel ID of own org
	OrgChannelID() string

	// CloseChannelClient (logically) closes a channel client obtained from a previous ChannelClient() call
	CloseChannelClient(client *channel.Client)

	// EventTimeoutSeconds returns the configured or default timeout value in seconds for chaincode/transaction event
	EventTimeoutSeconds() int

	// NewChannelProvider returns a channel provider based on fabricSDK field of client
	NewChannelProvider(channelID string) context.ChannelProvider

	// Close closes this client
	Close()
}

Client ... *

  • The Client object captures settings for a participating member as a fabric client to the hyperledger network *

func NewClient

func NewClient() (Client, error)

NewClient ... *

  • Create a new instance of Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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