Documentation ¶
Overview ¶
Package vat is Verifiable Autogen Tx package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerSlice ¶
type HandlerSlice []string
HandlerSlice the handler slice type
func (HandlerSlice) Less ¶
func (hs HandlerSlice) Less(i, j int) bool
Less return true if element j is less than element i
type VATHandler ¶
type VATHandler struct { HandlerList HandlerSlice Handlers map[string]VATInterface // map[module]map[method]bool WhiteList map[string]map[string]bool // contains filtered or unexported fields }
VATHandler define the VAT handler struct
func (*VATHandler) MustVAT ¶
func (vh *VATHandler) MustVAT(module, method string) bool
MustVAT check if the given module and method in whitelist
func (*VATHandler) RegisterHandler ¶
func (vh *VATHandler) RegisterHandler(name string, handler VATInterface, whiteList map[string]bool)
RegisterHandler add new handler into VATHandler
func (*VATHandler) Remove ¶
func (vh *VATHandler) Remove(name string)
Remove delete handler of given name
type VATInterface ¶
type VATInterface interface { GetVerifiableAutogenTx(blockHeight int64, maxCount int, timestamp int64) ([]*pb.Transaction, error) GetVATWhiteList() map[string]bool }
VATInterface define the VAT interface
Click to show internal directories.
Click to hide internal directories.