fabsdk

package
v0.0.0-...-c716174 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

**************************************************************

  • @file 程序文件名称
  • @brief 程序文件的功能
  • @author wsw
  • @version v1
  • @date 2021.12.20 *************************************************************

Package fabsdk /***************************************************************

**************************************************************

  • @file 程序文件名称
  • @brief 程序文件的功能
  • @author wsw
  • @version v1
  • @date 2021.12.20 *************************************************************

**************************************************************

  • @file 程序文件名称
  • @brief 程序文件的功能
  • @author wsw
  • @version v1
  • @date 2021.12.20 *************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chaincode

type Chaincode interface {
	// 打包链码
	PackageCC(cCName, cCVersion, cCpath string, chaincodeType string) (string, interface{}, string, error)

	// 安装链码
	InstallCC(ccName, ccVersion string, ret interface{}, orgsInfos []*models.PeerOrgInfo) (string, error)

	// 批准链码 "OutOf('1', 'AMSP.member', 'BMSP.member')"
	ApproveCC(packageID string, ccName, ccVersion string, sequence int64, chaincodePolicy string, isInit bool, channelID string, orgsInfos []*models.PeerOrgInfo) error

	// 提交链码 "OutOf('1', 'AMSP.member', 'BMSP.member')"
	CommitCC(ccName, ccVersion string, sequence int64, chaincodePolicy string, isInit bool, channelID string, orgsInfos []*models.PeerOrgInfo) error

	// 升级链码
	UpgradeCC(packageID string, ccName, ccVersion string, sequence int64, chaincodePolicy string, isInit bool, channelID string, orgsInfos []*models.PeerOrgInfo) error

	// 初始化链码
	InitCC(ccName string, channelID string, args []string, orgInfo *models.PeerOrgInfo) (string, error)

	// 调用链码
	InvokeCC(ccName string, channelID string, args []string, orgInfo *models.PeerOrgInfo) (string, error)

	// 查询链码
	QueryCC(ccName string, channelID string, args []string, orgInfo *models.PeerOrgInfo) (string, error)
}

type Channel

type Channel interface {
	// JoinChannel 加入通道
	JoinChannel(orgsInfos []*models.PeerOrgInfo, channelInfo *models.ChannelInfo, ordererOrgInfo *models.OrdererOrgInfo) error

	// CreateChannel 创建通道
	CreateChannel(orgsInfos []*models.PeerOrgInfo, ordererOrgInfo *models.OrdererOrgInfo, channelInfo *models.ChannelInfo) error
}

type FabSdk

type FabSdk interface {
	SetupFabricSDK(configFile string) (*fabsdk.FabricSDK, error)

	Close()
}

type Ledger

type Ledger interface {

	// 查询账本
	QueryLedger(channelID string, orgInfo *models.PeerOrgInfo) (interface{}, error)

	// 查询配置块
	QueryConfig(channelID string, orgInfo *models.PeerOrgInfo) (interface{}, error)

	// 查询最新块
	QueryBlock(channelID string, orgInfo *models.PeerOrgInfo, blockNum uint64) (interface{}, error)

	// 根据块高查询块
	QueryBlockByHash(channelID string, orgInfo *models.PeerOrgInfo, hash string) (interface{}, error)

	// 根据交易id查询块
	QueryBlockByTxId(channelID string, orgInfo *models.PeerOrgInfo, txid string) (interface{}, error)

	// 根据交易id查询交易
	QueryTx(channelID string, orgInfo *models.PeerOrgInfo, txID string) (interface{}, error)

	// 查询块高
	QueryBlockNum(channelID string, orgInfo *models.PeerOrgInfo) (uint64, error)
}

Directories

Path Synopsis
Package channelimpl /***************************************************************
Package channelimpl /***************************************************************
**************************************************************
**************************************************************
**************************************************************
**************************************************************
**************************************************************
**************************************************************
**************************************************************
**************************************************************

Jump to

Keyboard shortcuts

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