Documentation ¶
Index ¶
- Variables
- func AttachAddrVerifier(phs []TxPreHandler, v AddrVerifier)
- func BatchArgParser(ccn string, p map[string]txutil.TxArgParser) txutil.TxArgParser
- func EmptyAddrCredVerifier(la ListAddresses) *addrCredVerifier
- func GenerateTxArgParser(m map[string]*ChaincodeTx) map[string]tx.TxArgParser
- func NewAddrCredVerifier(la ListAddresses) *addrCredVerifier
- func NewAddrCredVerifierFromTemplate(la ListAddresses, tp TxPreHandler) *addrCredVerifier
- func NewAddrOrCredVerifier(la ListAddresses) addrOrCredVerifier
- type AddrCredInspector
- type AddrVerifier
- type ChaincodeTx
- type ClonableAddrVerifier
- type CollectiveTxs
- func (s CollectiveTxs) Invoke(stub shim.ChaincodeStubInterface, function string, args [][]byte, _ bool) ([]byte, error)
- func (s CollectiveTxs) Map() map[string]*ChaincodeTx
- func (s CollectiveTxs) Merge(ins ...CollectiveTxs) (CollectiveTxs, error)
- func (s CollectiveTxs) MustMerge(ins ...CollectiveTxs) CollectiveTxs
- type CollectiveTxs_InnerSupport
- type IsTxExpired
- type ListAddresses
- type MsgAddresses
- type TxAttrVerifier
- type TxHandler
- type TxMultiAttrVerifier
- type TxPostHandler
- type TxPreHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var Verifier_CheckCred = fmt.Errorf("Pass if credential can be verified")
Functions ¶
func AttachAddrVerifier ¶
func AttachAddrVerifier(phs []TxPreHandler, v AddrVerifier)
func BatchArgParser ¶
func BatchArgParser(ccn string, p map[string]txutil.TxArgParser) txutil.TxArgParser
func EmptyAddrCredVerifier ¶
func EmptyAddrCredVerifier(la ListAddresses) *addrCredVerifier
func GenerateTxArgParser ¶
func GenerateTxArgParser(m map[string]*ChaincodeTx) map[string]tx.TxArgParser
build tx arg parser from txhandler
func NewAddrCredVerifier ¶
func NewAddrCredVerifier(la ListAddresses) *addrCredVerifier
create default verifier
func NewAddrCredVerifierFromTemplate ¶
func NewAddrCredVerifierFromTemplate(la ListAddresses, tp TxPreHandler) *addrCredVerifier
func NewAddrOrCredVerifier ¶
func NewAddrOrCredVerifier(la ListAddresses) addrOrCredVerifier
Types ¶
type AddrCredInspector ¶
type AddrCredInspector interface {
AddVerifier(AddrVerifier) bool
}
type AddrVerifier ¶
type AddrVerifier interface { TxPreHandler Verify(*txutil.Address) error }
type ChaincodeTx ¶
type ChaincodeTx struct { Ccname string Handler TxHandler PreHandlers []TxPreHandler PostHandlers []TxPostHandler }
func (*ChaincodeTx) TxCall ¶
func (cci *ChaincodeTx) TxCall(stub shim.ChaincodeStubInterface, function string, args [][]byte) ([]byte, error)
type ClonableAddrVerifier ¶
type ClonableAddrVerifier interface {
Clone() AddrVerifier
}
type CollectiveTxs ¶
type CollectiveTxs map[string]*ChaincodeTx
func NewCollectiveTxs ¶
func NewCollectiveTxs() CollectiveTxs
func (CollectiveTxs) Invoke ¶
func (s CollectiveTxs) Invoke(stub shim.ChaincodeStubInterface, function string, args [][]byte, _ bool) ([]byte, error)
provide a simple chaincode interface ...
func (CollectiveTxs) Map ¶
func (s CollectiveTxs) Map() map[string]*ChaincodeTx
func (CollectiveTxs) Merge ¶
func (s CollectiveTxs) Merge(ins ...CollectiveTxs) (CollectiveTxs, error)
func (CollectiveTxs) MustMerge ¶
func (s CollectiveTxs) MustMerge(ins ...CollectiveTxs) CollectiveTxs
type CollectiveTxs_InnerSupport ¶
type CollectiveTxs_InnerSupport CollectiveTxs
func (CollectiveTxs_InnerSupport) Invoke ¶
func (itxh CollectiveTxs_InnerSupport) Invoke(stub shim.ChaincodeStubInterface, function string, args [][]byte, ro bool) ([]byte, error)
innerTx handler also provide a chaincode interface to handling inner calling
func (CollectiveTxs_InnerSupport) TxCall ¶
func (itxh CollectiveTxs_InnerSupport) TxCall(stub shim.ChaincodeStubInterface, function string, args [][]byte) ([]byte, error)
type IsTxExpired ¶
type IsTxExpired bool
func (IsTxExpired) PreHandling ¶
func (force IsTxExpired) PreHandling(_ shim.ChaincodeStubInterface, _ string, tx txutil.Parser) error
type ListAddresses ¶
it is safe to return nil for a mal-formed message and MUST return empty array if some expected addresses is not available (that is, even there is still some address can be returned, they MUST NOT shown)
type MsgAddresses ¶
type TxAttrVerifier ¶
func (TxAttrVerifier) PreHandling ¶
func (req TxAttrVerifier) PreHandling(stub shim.ChaincodeStubInterface, _ string, _ txutil.Parser) error
type TxHandler ¶
type TxHandler interface { Msg() proto.Message Call(shim.ChaincodeStubInterface, txutil.Parser) ([]byte, error) }
func BatchTxHandler ¶
func BatchTxHandler(hs map[string]*ChaincodeTx) TxHandler
type TxMultiAttrVerifier ¶
func (TxMultiAttrVerifier) PreHandling ¶
func (req TxMultiAttrVerifier) PreHandling(stub shim.ChaincodeStubInterface, _ string, _ txutil.Parser) error
type TxPostHandler ¶
type TxPreHandler ¶
Click to show internal directories.
Click to hide internal directories.