transfer

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountTxsGinRegister

func AccountTxsGinRegister(r *gin.Engine)

AccountTxsGinRegister 注册accountTxs

func DbClear

func DbClear(driveName string, db *sql.DB) error

DbClear 数据库清除

func DbInit

func DbInit(driveName string, db *sql.DB) error

DbInit 数据库结构初始化

func TransferGin

func TransferGin() gin.HandlerFunc

Types

type SearchOpt

type SearchOpt struct {
	Coin string
}

type Transfer added in v0.0.4

type Transfer struct {
	ChainID  string
	Height   int64
	Hash     string
	Sender   string
	Reciever string
	Coin     string
	Amount   string
	Time     time.Time
}

type TransferType

type TransferType int
const (
	Sender TransferType = iota
	Reciever
)

func (TransferType) String

func (ut TransferType) String() string

type TxTransfer

type TxTransfer struct {
	ID       int64        `json:"id"`       // id
	ChainID  string       `json:"chain_id"` // chain_id
	Height   int64        `json:"height"`   // height
	Hash     string       `json:"hash"`     // hash
	Address  string       `json:"address"`  // address
	Coin     string       `json:"coin"`     // coin
	Amount   string       `json:"amount"`   // amount
	Type     TransferType `json:"type"`     // type
	TxStatus string       `json:"txStatus"`
	Time     time.Time    `json:"time"` // time
}

func ListByAddress

func ListByAddress(chainId, address string, offset, limint int, opt *SearchOpt) ([]*TxTransfer, error)

type TxTransferPlugin

type TxTransferPlugin struct{}

func (TxTransferPlugin) DbClear

func (ttp TxTransferPlugin) DbClear(driveName string, db *sql.DB) error

func (TxTransferPlugin) DbInit

func (ttp TxTransferPlugin) DbInit(driveName string, db *sql.DB) error

func (TxTransferPlugin) Doctor added in v0.0.3

func (ttp TxTransferPlugin) Doctor() error

func (TxTransferPlugin) Parse

func (ttp TxTransferPlugin) Parse(blockHeader types.BlockHeader, itx qbasetxs.ITx) (typeName string, hit bool, err error)

func (TxTransferPlugin) RegisterGin

func (ttp TxTransferPlugin) RegisterGin(r *gin.Engine)

func (TxTransferPlugin) Type

func (ttp TxTransferPlugin) Type() string

Jump to

Keyboard shortcuts

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