Documentation ¶
Index ¶
- Variables
- func Build(transID, txID int64, contractMeta std.ContractMeta) (*std.BuildResult, error)
- func Get(transID, txID int64, key string) ([]byte, error)
- func GetBlock(req map[string]interface{}) (result interface{}, err error)
- func SdbBuild(req map[string]interface{}) (result interface{}, err error)
- func SdbGet(req map[string]interface{}) (result interface{}, err error)
- func SdbSet(req map[string]interface{}) (result interface{}, err error)
- func Set(transID, txID int64, data map[string][]byte) (*bool, error)
- func SetLogger(l log.Logger)
- func SetSdbCallback(getFunc GetCallback, setFunc SetCallback, buildCallback BuildCallback)
- func Tx(txHash string) (result string, err error)
- type Adapter
- func (ad *Adapter) Commit(transID int64)
- func (ad *Adapter) Health() *types.Health
- func (ad *Adapter) Init(log log.Logger, rpcPort int)
- func (ad *Adapter) InitOrUpdateSMC(transId, txId int64, header types2.Header, contractAddr, owner types.Address, ...) (result *types.Response)
- func (ad *Adapter) InvokeTx(blockHeader types2.Header, transID, txID int64, sender types.Address, ...) *types.Response
- func (ad *Adapter) Mine(transId, txId int64, header types2.Header, contractAddr, owner types.Address) (result *types.Response)
- func (ad *Adapter) Rollback(transID int64)
- func (ad *Adapter) RollbackTx(transID, txID int64)
- type BuildCallback
- type GetCallback
- type SetCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var Routes = map[string]socket.CallBackFunc{ "get": SdbGet, "set": SdbSet, "build": SdbBuild, "block": GetBlock, }
Functions ¶
func Build ¶
func Build(transID, txID int64, contractMeta std.ContractMeta) (*std.BuildResult, error)
Build build contract and save to sdb
func SetSdbCallback ¶
func SetSdbCallback(getFunc GetCallback, setFunc SetCallback, buildCallback BuildCallback)
SetSdbCallback set sdb callback
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter objact of adapter
func (*Adapter) InitOrUpdateSMC ¶
func (ad *Adapter) InitOrUpdateSMC(transId, txId int64, header types2.Header, contractAddr, owner types.Address, isUpgarde bool) (result *types.Response)
InitSMC init or upgrade chain for smart contact
func (*Adapter) InvokeTx ¶
func (ad *Adapter) InvokeTx( blockHeader types2.Header, transID, txID int64, sender types.Address, tx types.Transaction, publicKey types.PubKey, txHash types.Hash, blockHash types.Hash) *types.Response
InvokeTx calls invokermgr's invoke function
func (*Adapter) Mine ¶
func (ad *Adapter) Mine(transId, txId int64, header types2.Header, contractAddr, owner types.Address) (result *types.Response)
InitSMC mining for smart contact
func (*Adapter) RollbackTx ¶
RollbackTx rollback transaction
type BuildCallback ¶
type BuildCallback func(int64, int64, std.ContractMeta) (*std.BuildResult, error)
BuildCallback callback of build()
type GetCallback ¶
GetCallback callback of get()
Click to show internal directories.
Click to hide internal directories.