Documentation ¶
Index ¶
- Constants
- type FabricBlock
- type FabricClient
- func (f *FabricClient) Close()
- func (f *FabricClient) CreateChannel(channelTx string) error
- func (f *FabricClient) InstallChaincode(chaincodeId, chaincodePath, version string) error
- func (f *FabricClient) InstantiateChaincode(chaincodeId, chaincodePath, version string, policy string, args [][]byte) ([]byte, error)
- func (f *FabricClient) InvokeChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)
- func (f *FabricClient) InvokeChaincodeWithEvent(chaincodeId, fcn string, args [][]byte) ([]byte, error)
- func (f *FabricClient) JoinChannel() error
- func (f *FabricClient) QueryBlock(height uint64) (*FabricBlock, error)
- func (f *FabricClient) QueryBlockByHash(hash []byte) (*FabricBlock, error)
- func (f *FabricClient) QueryBlockByTxid(txid string) (*FabricBlock, error)
- func (f *FabricClient) QueryChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)
- func (f *FabricClient) QueryLedger() (*fab.BlockchainInfoResponse, error)
- func (f *FabricClient) Setup() error
- func (f *FabricClient) UpdateChannel(anchorsTx []string) error
- func (f *FabricClient) UpgradeChaincode(chaincodeId, chaincodePath, version string, policy string, args [][]byte) ([]byte, error)
- type FabricTransaction
- type FabricTransactionAction
- type FabricTransactionActionRWSet
Constants ¶
View Source
const ( Admin = "Admin" User = "User1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FabricBlock ¶
type FabricBlock struct { Number uint64 `json:"number"` CurrentBlockHash string `json:"currentBlockHash"` PreviousBlockHash string `json:"previousBlockHash"` Transactions []FabricTransaction `json:"transactions"` }
type FabricClient ¶
type FabricClient struct { ConnectionFile []byte OrdererDomain string Orgs []string OrgAdmin string UserName string ChannelId string GoPath string // contains filtered or unexported fields }
func NewFabricClient ¶
func NewFabricClient(connectionFile []byte, channelId string, orgs []string, orderer string) *FabricClient
func (*FabricClient) Close ¶
func (f *FabricClient) Close()
func (*FabricClient) CreateChannel ¶
func (f *FabricClient) CreateChannel(channelTx string) error
func (*FabricClient) InstallChaincode ¶
func (f *FabricClient) InstallChaincode(chaincodeId, chaincodePath, version string) error
func (*FabricClient) InstantiateChaincode ¶
func (*FabricClient) InvokeChaincode ¶
func (f *FabricClient) InvokeChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)
func (*FabricClient) InvokeChaincodeWithEvent ¶
func (f *FabricClient) InvokeChaincodeWithEvent(chaincodeId, fcn string, args [][]byte) ([]byte, error)
func (*FabricClient) JoinChannel ¶
func (f *FabricClient) JoinChannel() error
func (*FabricClient) QueryBlock ¶
func (f *FabricClient) QueryBlock(height uint64) (*FabricBlock, error)
func (*FabricClient) QueryBlockByHash ¶
func (f *FabricClient) QueryBlockByHash(hash []byte) (*FabricBlock, error)
func (*FabricClient) QueryBlockByTxid ¶
func (f *FabricClient) QueryBlockByTxid(txid string) (*FabricBlock, error)
func (*FabricClient) QueryChaincode ¶
func (f *FabricClient) QueryChaincode(chaincodeId, fcn string, args [][]byte) ([]byte, error)
func (*FabricClient) QueryLedger ¶
func (f *FabricClient) QueryLedger() (*fab.BlockchainInfoResponse, error)
func (*FabricClient) Setup ¶
func (f *FabricClient) Setup() error
func (*FabricClient) UpdateChannel ¶
func (f *FabricClient) UpdateChannel(anchorsTx []string) error
func (*FabricClient) UpgradeChaincode ¶
type FabricTransaction ¶
type FabricTransaction struct { No int64 `json:"no"` Status string `json:"status"` Txid string `json:"txid"` Channel string `json:"channel"` Type string `json:"type"` Subject string `json:"subject"` Config string `json:"config"` Timestamp int64 `json:"timestamp"` Actions []FabricTransactionAction `json:"actions"` }
type FabricTransactionAction ¶
type FabricTransactionAction struct { Endorsers []string `json:"endorsers"` RWSet []FabricTransactionActionRWSet `json:"rwSet"` }
Click to show internal directories.
Click to hide internal directories.