Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSDK ¶
type GoSDK struct {
// contains filtered or unexported fields
}
GoSDK implement for sdk base on fabric-go-sdk
func NewSDK ¶
func NewSDK(configPath string, userCtx UserContext) (*GoSDK, error)
NewSDK return new GoSDK
func (*GoSDK) Excute ¶
Excute chaincode execution func (s *GoSDK) Excute(channelID, chaincode, fcn string, args [][]byte) RspMsg {
func (*GoSDK) Query ¶
Query chaincode query func (s *GoSDK) Query(channelID, chaincode, fcn string, args [][]byte) RspMsg {
func (*GoSDK) RegisterEvent ¶
RegisterEvent register chaincode event
func (*GoSDK) UnRegisterEvent ¶
UnRegisterEvent chaincode event unresgitered
type LedgerQueryer ¶
type LedgerQueryer interface { QueryBlock() QueryFirstBlock() QueryConfigBlock() QueryChainInfo() }
LedgerQueryer fabric ledger queryer,block、chain info .etc
type Request ¶
type Request struct { Channel string Chaincode string Fcn string Args [][]byte TransientMap map[string][]byte }
Request params for chaincode api
type ResourceManager ¶
type ResourceManager interface { CreateChannel() UpdateChannel() JoinChannel() InstallChaincode() InstantiateChaincode() UpgradeChaincode() LedgerQueryer }
ResourceManager fabric resource manager,channel、chaincode etc.
type TxHandler ¶
type TxHandler interface { // Excute(channel, chaincode, fcn string, args [][]byte) RspMsg Excute(req Request) RspMsg // Query(channel, chaincode, fcn string, args [][]byte) RspMsg Query(req Request) RspMsg RegisterEvent(channel, ccName, event string) (<-chan *Event, error) UnRegisterEvent(channel, ccName, event string) error }
TxHandler fabric transaction handler
type UserContext ¶
UserContext user context for the sdk
Click to show internal directories.
Click to hide internal directories.