Documentation ¶
Index ¶
- type DB
- type Postgres
- func (pg *Postgres) GetMaxTradeBlockNumber() (int64, error)
- func (pg *Postgres) GetMaxTransferBlockNumber() (int64, error)
- func (pg *Postgres) GetTrades(fromBlock int64, limit uint64) ([]SolanaTradelogDB, error)
- func (pg *Postgres) GetTransfer(fromBlock int64, limit uint64) ([]SolanaTransferLogDb, error)
- type SolanaTradelogDB
- type SolanaTransferLogDb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func (*Postgres) GetMaxTradeBlockNumber ¶
func (*Postgres) GetMaxTransferBlockNumber ¶
func (*Postgres) GetTrades ¶
func (pg *Postgres) GetTrades(fromBlock int64, limit uint64) ([]SolanaTradelogDB, error)
func (*Postgres) GetTransfer ¶
func (pg *Postgres) GetTransfer(fromBlock int64, limit uint64) ([]SolanaTransferLogDb, error)
type SolanaTradelogDB ¶
type SolanaTradelogDB struct { BlockTimestamp time.Time `db:"block_timestamp"` BlockNumber uint64 `db:"block_number"` TxHash string `db:"tx_hash"` Sender string `db:"sender"` TokenInAddress string `db:"token_in_address"` TokenInAmount float64 `db:"token_in_amount"` TokenInUsdtRate float64 `db:"token_in_usdt_rate"` TokenOutAddress string `db:"token_out_address"` TokenOutAmount float64 `db:"token_out_amount"` TokenOutUsdtRate float64 `db:"token_out_usdt_rate"` SolUsdtRate float64 `db:"sol_usdt_rate"` Created time.Time `db:"created"` }
func (SolanaTradelogDB) Convert ¶
func (t SolanaTradelogDB) Convert() common.SolanaTradelog
type SolanaTransferLogDb ¶
type SolanaTransferLogDb struct { BlockTimestamp time.Time `db:"block_timestamp"` BlockNumber uint64 `db:"block_number"` TxHash string `db:"tx_hash"` FromAddress string `db:"from_address"` ToAddress string `db:"to_address"` TokenAddress string `db:"token_address"` TokenAmount float64 `db:"token_amount"` IsCexIn bool `db:"is_cex_in"` Created time.Time `db:"created"` }
func (SolanaTransferLogDb) Convert ¶
func (e SolanaTransferLogDb) Convert() common.SolanaTransferlog
Click to show internal directories.
Click to hide internal directories.