Documentation ¶
Index ¶
- Constants
- type NodeSource
- type Server
- func (s *Server) AddNodeSource(source *NodeSource) error
- func (s *Server) AddNodeSourceList(sources []*NodeSource) error
- func (s *Server) Error(c *gin.Context, path string, err string)
- func (s *Server) GetActiveNodes(c *gin.Context)
- func (s *Server) GetActiveNodesFromDB() ([]string, error)
- func (s *Server) PushBlockTask(c *gin.Context)
- func (s *Server) PushReceiptTask(c *gin.Context)
- func (s *Server) PushReceiptsTask(c *gin.Context)
- func (s *Server) PushSyncTxTask(c *gin.Context)
- func (s *Server) PushTxTask(c *gin.Context)
- func (s *Server) PushTxsTask(c *gin.Context)
- func (s *Server) QueryTxFromCh(blockChain int64, txHash string) (*Tx, error)
- func (s *Server) Success(c *gin.Context, resp interface{}, path string)
- type Tx
Constants ¶
View Source
const ( SUCCESS = 0 FAIL = 1 )
View Source
const ( NodeInfoTable = "node_info" NodeSourceTable = "node_source" NodeTaskTable = "node_task_%v" )
View Source
const (
TimeFormat = "2006-01-02 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeSource ¶
type NodeSource struct { Id int64 `json:"id" gorm:"column:id"` BlockChain int64 `json:"blockChain" gorm:"column:block_chain"` // 公链code TxHash string `json:"txHash" gorm:"column:tx_hash"` BlockHash string `json:"blockHash" gorm:"column:block_hash"` BlockNumber string `json:"blockNumber" gorm:"column:block_number"` SourceType int `json:"sourceType" gorm:"column:source_type"` // 任务类型 1: 交易 2:区块 3.收据 CreateTime time.Time `json:"createTime" gorm:"column:create_time"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddNodeSource ¶
func (s *Server) AddNodeSource(source *NodeSource) error
func (*Server) AddNodeSourceList ¶
func (s *Server) AddNodeSourceList(sources []*NodeSource) error
func (*Server) GetActiveNodes ¶
func (*Server) GetActiveNodesFromDB ¶
func (*Server) PushBlockTask ¶
func (*Server) PushReceiptTask ¶
func (*Server) PushReceiptsTask ¶
func (*Server) PushSyncTxTask ¶
func (*Server) PushTxTask ¶
func (*Server) PushTxsTask ¶
func (*Server) QueryTxFromCh ¶
type Tx ¶
type Tx struct { Id int64 `json:"id" gorm:"column:id"` TxHash string `json:"hash" gorm:"column:hash"` TxTime string `json:"txTime" gorm:"column:tx_time"` TxStatus string `json:"txStatus" gorm:"column:tx_status"` BlockNumber string `json:"blockNumber" gorm:"column:block_number"` FromAddr string `json:"from" gorm:"column:from_addr"` ToAddr string `json:"to" gorm:"column:to_addr"` Value string `json:"value" gorm:"column:value"` Fee string `json:"fee" gorm:"column:fee"` GasPrice string `json:"gasPrice" gorm:"column:gas_price"` MaxPrice string `json:"maxFeePerGas" gorm:"column:max_fee_per_gas"` GasLimit string `json:"gas" gorm:"column:gas"` GasUsed string `json:"gasUsed" gorm:"column:gas_used"` BaseFee string `json:"baseFeePerGas" gorm:"column:base_fee_per_gas"` PriorityFee string `json:"maxPriorityFeePerGas" gorm:"column:max_priority_fee_per_gas"` InputData string `json:"input" gorm:"column:input_data"` BlockHash string `json:"blockHash" gorm:"column:block_hash"` TransactionIndex string `json:"transactionIndex" gorm:"column:transaction_index"` Type string `json:"type" gorm:"column:tx_type"` }
Click to show internal directories.
Click to hide internal directories.