Documentation ¶
Index ¶
- func DeleteBalanceInputsByRound(q dbcl.Querier, roundID uint64) error
- func DeleteBalanceOutputsByID(q dbcl.Querier, ids ...uint64) error
- func GetBalanceInputMinTimestamp(q dbcl.Querier, chain string) (time.Time, error)
- func GetImmatureBalanceInputSumByChain(q dbcl.Querier, chain string) (*big.Int, error)
- func GetMinerAddress(q dbcl.Querier, minerID uint64) (string, error)
- func GetMinerIDByChainAddress(q dbcl.Querier, chain, address string) (uint64, error)
- func GetNodeURLsByChain(q dbcl.Querier, chain string, mainnet bool) ([]string, error)
- func GetPayoutsByMinerIDsCount(q dbcl.Querier, minerIDs []uint64) (uint64, error)
- func GetPayoutsCount(q dbcl.Querier) (uint64, error)
- func GetPendingBalanceInputSumByChain(q dbcl.Querier, chain string) (*big.Int, error)
- func GetRoundLuckByChain(q dbcl.Querier, chain string, solo bool, duration time.Duration) (float64, error)
- func GetRoundsByChainCount(q dbcl.Querier, chain string) (uint64, error)
- func GetRoundsByMinerIDsCount(q dbcl.Querier, minerIDs []uint64) (uint64, error)
- func GetRoundsCount(q dbcl.Querier) (uint64, error)
- func GetSumUnspentUTXOValueByChain(q dbcl.Querier, chainID string) (*big.Int, error)
- func GetUnconfirmedPayoutSum(q dbcl.Querier, chain string) (*big.Int, error)
- func GetUnconfirmedTransactionSum(q dbcl.Querier, chainID string) (*big.Int, error)
- func GetUnpaidBalanceOutputSumByChain(q dbcl.Querier, chain string) (*big.Int, error)
- func GetUnspentTransactionCount(q dbcl.Querier, chainID string) (uint64, error)
- func GetWorkerCountByMinerIDs(q dbcl.Querier, minerIDs []uint64) (uint64, uint64, error)
- func GetWorkerID(q dbcl.Querier, minerID uint64, name string) (uint64, error)
- func InsertAddBalanceSums(q dbcl.Querier, objects ...*BalanceSum) error
- func InsertBalanceInputs(q dbcl.Querier, objects ...*BalanceInput) error
- func InsertBalanceOutput(q dbcl.Querier, obj *BalanceOutput) (uint64, error)
- func InsertBalanceOutputs(q dbcl.Querier, objects ...*BalanceOutput) error
- func InsertExchangeBatch(q dbcl.Querier, obj *ExchangeBatch) (uint64, error)
- func InsertExchangeDeposit(q dbcl.Querier, obj *ExchangeDeposit) (uint64, error)
- func InsertExchangeInputs(q dbcl.Querier, objects ...*ExchangeInput) error
- func InsertExchangeTrades(q dbcl.Querier, objects ...*ExchangeTrade) error
- func InsertExchangeWithdrawal(q dbcl.Querier, obj *ExchangeWithdrawal) (uint64, error)
- func InsertIPAddresses(q dbcl.Querier, objects ...*IPAddress) error
- func InsertMiner(q dbcl.Querier, obj *Miner) (uint64, error)
- func InsertNode(q dbcl.Querier, obj *Node) (uint64, error)
- func InsertPayout(q dbcl.Querier, obj *Payout) (uint64, error)
- func InsertRound(q dbcl.Querier, obj *Round) (uint64, error)
- func InsertShares(q dbcl.Querier, objects ...*Share) error
- func InsertSubtractBalanceSums(q dbcl.Querier, objects ...*BalanceSum) error
- func InsertTransaction(q dbcl.Querier, obj *Transaction) (uint64, error)
- func InsertUTXO(q dbcl.Querier, obj *UTXO) (uint64, error)
- func InsertUTXOs(q dbcl.Querier, objects ...*UTXO) error
- func InsertWorker(q dbcl.Querier, obj *Worker) (uint64, error)
- func New(args map[string]string) (*dbcl.Client, error)
- func UpdateBalanceInput(q dbcl.Querier, obj *BalanceInput, updateCols []string) error
- func UpdateBalanceInputsSetMatureByRound(q dbcl.Querier, roundID uint64) error
- func UpdateBalanceOutput(q dbcl.Querier, obj *BalanceOutput, updateCols []string) error
- func UpdateBalanceOutputsSetMatureByRound(q dbcl.Querier, roundID uint64) error
- func UpdateExchangeBatch(q dbcl.Querier, obj *ExchangeBatch, updateCols []string) error
- func UpdateExchangeDeposit(q dbcl.Querier, obj *ExchangeDeposit, updateCols []string) error
- func UpdateExchangeTrade(q dbcl.Querier, obj *ExchangeTrade, updateCols []string) error
- func UpdateExchangeWithdrawal(q dbcl.Querier, obj *ExchangeWithdrawal, updateCols []string) error
- func UpdateMiner(q dbcl.Querier, obj *Miner, updateCols []string) error
- func UpdateNode(q dbcl.Querier, obj *Node, updateCols []string) error
- func UpdatePayout(q dbcl.Querier, obj *Payout, updateCols []string) error
- func UpdateRound(q dbcl.Querier, obj *Round, updateCols []string) error
- func UpdateTransaction(q dbcl.Querier, obj *Transaction, updateCols []string) error
- func UpdateUTXO(q dbcl.Querier, obj *UTXO, updateCols []string) error
- func UpdateUTXOByTxID(q dbcl.Querier, obj *UTXO, updateCols []string) error
- func UpdateWorker(q dbcl.Querier, obj *Worker, updateCols []string) error
- func UpdateWorkerSetActive(q dbcl.Querier) error
- func UpdateWorkerSetInactive(q dbcl.Querier, workerIDs []uint64) error
- type BalanceInput
- func GetBalanceInputSumFromRange(q dbcl.Querier, chain string, startTime, endTime time.Time) ([]*BalanceInput, error)
- func GetBalanceInputsByBatch(q dbcl.Querier, batchID uint64) ([]*BalanceInput, error)
- func GetBalanceInputsByRound(q dbcl.Querier, roundID uint64) ([]*BalanceInput, error)
- func GetPayoutBalanceInputSums(q dbcl.Querier, payoutIDs []uint64) ([]*BalanceInput, error)
- func GetPendingBalanceInputsSumWithoutBatch(q dbcl.Querier) ([]*BalanceInput, error)
- func GetPendingBalanceInputsWithoutBatch(q dbcl.Querier) ([]*BalanceInput, error)
- type BalanceOutput
- func GetBalanceOutputsByBatch(q dbcl.Querier, batchID uint64) ([]*BalanceOutput, error)
- func GetBalanceOutputsByPayout(q dbcl.Querier, payoutID uint64) ([]*BalanceOutput, error)
- func GetBalanceOutputsByPayoutTransaction(q dbcl.Querier, transactionID uint64) ([]*BalanceOutput, error)
- func GetRandomBalanceOutputAboveValue(q dbcl.Querier, chain, value string) (*BalanceOutput, error)
- func GetUnpaidBalanceOutputsByMiner(q dbcl.Querier, minerID uint64, chain string) ([]*BalanceOutput, error)
- type BalanceSum
- type Chain
- type ExchangeBatch
- type ExchangeDeposit
- type ExchangeInput
- type ExchangeTrade
- func GetExchangeTradeByPathAndStage(q dbcl.Querier, batchID uint64, path, stage int) (*ExchangeTrade, error)
- func GetExchangeTrades(q dbcl.Querier, batchID uint64) ([]*ExchangeTrade, error)
- func GetExchangeTradesByStage(q dbcl.Querier, batchID uint64, stage int) ([]*ExchangeTrade, error)
- func GetFinalExchangeTrades(q dbcl.Querier, batchID uint64) ([]*ExchangeTrade, error)
- type ExchangeWithdrawal
- type IPAddress
- type Miner
- func GetMiner(q dbcl.Querier, id uint64) (*Miner, error)
- func GetMiners(q dbcl.Querier, ids []uint64) ([]*Miner, error)
- func GetMinersWithBalanceAboveThresholdByChain(q dbcl.Querier, chain, threshold string) ([]*Miner, error)
- func GetMinersWithLastShares(q dbcl.Querier, minerIDs []uint64) ([]*Miner, error)
- func GetRecipients(q dbcl.Querier) ([]*Miner, error)
- type Node
- type Payout
- type Round
- func GetImmatureRoundsByChain(q dbcl.Querier, chain string, maxHeight uint64) ([]*Round, error)
- func GetPendingRoundsByChain(q dbcl.Querier, chain string, maxHeight uint64) ([]*Round, error)
- func GetRound(q dbcl.Querier, id uint64) (*Round, error)
- func GetRounds(q dbcl.Querier, page, size uint64) ([]*Round, error)
- func GetRoundsByChain(q dbcl.Querier, chain string, page, size uint64) ([]*Round, error)
- func GetRoundsByMinerIDs(q dbcl.Querier, minerIDs []uint64, page, size uint64) ([]*Round, error)
- func GetUnspentRoundsByChain(q dbcl.Querier, chain string) ([]*Round, error)
- type Share
- type Transaction
- func GetTransaction(q dbcl.Querier, id uint64) (*Transaction, error)
- func GetTransactionByTxID(q dbcl.Querier, txid string) (*Transaction, error)
- func GetUnconfirmedTransactions(q dbcl.Querier, chainID string) ([]*Transaction, error)
- func GetUnspentTransactions(q dbcl.Querier, chainID string) ([]*Transaction, error)
- type UTXO
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNodeURLsByChain ¶
func GetRoundLuckByChain ¶
func GetRoundsByChainCount ¶
func GetUnconfirmedPayoutSum ¶
func InsertAddBalanceSums ¶
func InsertAddBalanceSums(q dbcl.Querier, objects ...*BalanceSum) error
func InsertBalanceInputs ¶
func InsertBalanceInputs(q dbcl.Querier, objects ...*BalanceInput) error
func InsertBalanceOutput ¶
func InsertBalanceOutput(q dbcl.Querier, obj *BalanceOutput) (uint64, error)
func InsertBalanceOutputs ¶
func InsertBalanceOutputs(q dbcl.Querier, objects ...*BalanceOutput) error
func InsertExchangeBatch ¶
func InsertExchangeBatch(q dbcl.Querier, obj *ExchangeBatch) (uint64, error)
func InsertExchangeDeposit ¶
func InsertExchangeDeposit(q dbcl.Querier, obj *ExchangeDeposit) (uint64, error)
func InsertExchangeInputs ¶
func InsertExchangeInputs(q dbcl.Querier, objects ...*ExchangeInput) error
func InsertExchangeTrades ¶
func InsertExchangeTrades(q dbcl.Querier, objects ...*ExchangeTrade) error
func InsertExchangeWithdrawal ¶
func InsertExchangeWithdrawal(q dbcl.Querier, obj *ExchangeWithdrawal) (uint64, error)
func InsertSubtractBalanceSums ¶
func InsertSubtractBalanceSums(q dbcl.Querier, objects ...*BalanceSum) error
func InsertTransaction ¶
func InsertTransaction(q dbcl.Querier, obj *Transaction) (uint64, error)
func UpdateBalanceInput ¶
func UpdateBalanceInput(q dbcl.Querier, obj *BalanceInput, updateCols []string) error
func UpdateBalanceOutput ¶
func UpdateBalanceOutput(q dbcl.Querier, obj *BalanceOutput, updateCols []string) error
func UpdateExchangeBatch ¶
func UpdateExchangeBatch(q dbcl.Querier, obj *ExchangeBatch, updateCols []string) error
func UpdateExchangeDeposit ¶
func UpdateExchangeDeposit(q dbcl.Querier, obj *ExchangeDeposit, updateCols []string) error
func UpdateExchangeTrade ¶
func UpdateExchangeTrade(q dbcl.Querier, obj *ExchangeTrade, updateCols []string) error
func UpdateExchangeWithdrawal ¶
func UpdateExchangeWithdrawal(q dbcl.Querier, obj *ExchangeWithdrawal, updateCols []string) error
func UpdateTransaction ¶
func UpdateTransaction(q dbcl.Querier, obj *Transaction, updateCols []string) error
func UpdateWorkerSetActive ¶
Types ¶
type BalanceInput ¶
type BalanceInput struct { ID uint64 `db:"id"` RoundID uint64 `db:"round_id"` ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` OutChainID string `db:"out_chain_id"` BalanceOutputID *uint64 `db:"balance_output_id"` BatchID *uint64 `db:"batch_id"` // column not present in table, helpful for balance input // sum query for each payout PayoutID uint64 `db:"payout_id"` Value dbcl.NullBigInt `db:"value"` PoolFees dbcl.NullBigInt `db:"pool_fees"` Mature bool `db:"mature"` Pending bool `db:"pending"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetBalanceInputsByBatch ¶
func GetBalanceInputsByBatch(q dbcl.Querier, batchID uint64) ([]*BalanceInput, error)
func GetBalanceInputsByRound ¶
func GetBalanceInputsByRound(q dbcl.Querier, roundID uint64) ([]*BalanceInput, error)
func GetPayoutBalanceInputSums ¶
func GetPayoutBalanceInputSums( q dbcl.Querier, payoutIDs []uint64, ) ([]*BalanceInput, error)
func GetPendingBalanceInputsSumWithoutBatch ¶
func GetPendingBalanceInputsSumWithoutBatch(q dbcl.Querier) ([]*BalanceInput, error)
func GetPendingBalanceInputsWithoutBatch ¶
func GetPendingBalanceInputsWithoutBatch(q dbcl.Querier) ([]*BalanceInput, error)
type BalanceOutput ¶
type BalanceOutput struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` InBatchID *uint64 `db:"in_batch_id"` InDepositID *uint64 `db:"in_deposit_id"` InPayoutID *uint64 `db:"in_payout_id"` OutPayoutID *uint64 `db:"out_payout_id"` OutMergeTransactionID *uint64 `db:"out_merge_transaction_id"` Value dbcl.NullBigInt `db:"value"` PoolFees dbcl.NullBigInt `db:"pool_fees"` ExchangeFees dbcl.NullBigInt `db:"exchange_fees"` TxFees dbcl.NullBigInt `db:"tx_fees"` Mature bool `db:"mature"` Spent bool `db:"spent"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetBalanceOutputsByBatch ¶
func GetBalanceOutputsByBatch(q dbcl.Querier, batchID uint64) ([]*BalanceOutput, error)
func GetBalanceOutputsByPayout ¶
func GetBalanceOutputsByPayout( q dbcl.Querier, payoutID uint64, ) ([]*BalanceOutput, error)
func GetBalanceOutputsByPayoutTransaction ¶
func GetBalanceOutputsByPayoutTransaction( q dbcl.Querier, transactionID uint64, ) ([]*BalanceOutput, error)
func GetRandomBalanceOutputAboveValue ¶
func GetRandomBalanceOutputAboveValue( q dbcl.Querier, chain, value string, ) (*BalanceOutput, error)
type BalanceSum ¶
type BalanceSum struct { ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` ImmatureValue dbcl.NullBigInt `db:"immature_value"` MatureValue dbcl.NullBigInt `db:"mature_value"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetBalanceSumsByMinerIDs ¶
func GetBalanceSumsByMinerIDs( q dbcl.Querier, minerIDs []uint64, ) ([]*BalanceSum, error)
type ExchangeBatch ¶
type ExchangeBatch struct { ID uint64 `db:"id"` ExchangeID int `db:"exchange_id"` Status int `db:"status"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` CompletedAt *time.Time `db:"completed_at"` }
func GetActiveExchangeBatches ¶
func GetActiveExchangeBatches(q dbcl.Querier, exchangeID uint64) ([]*ExchangeBatch, error)
func GetExchangeBatch ¶
func GetExchangeBatch(q dbcl.Querier, batchID uint64) (*ExchangeBatch, error)
type ExchangeDeposit ¶
type ExchangeDeposit struct { ID uint64 `db:"id"` BatchID uint64 `db:"batch_id"` ChainID string `db:"chain_id"` NetworkID string `db:"network_id"` TransactionID *uint64 `db:"transaction_id"` DepositTxID string `db:"deposit_txid"` ExchangeTxID *string `db:"exchange_txid"` ExchangeDepositID *string `db:"exchange_deposit_id"` Value dbcl.NullBigInt `db:"value"` Fees dbcl.NullBigInt `db:"fees"` Registered bool `db:"registered"` Confirmed bool `db:"confirmed"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetExchangeDeposits ¶
func GetExchangeDeposits(q dbcl.Querier, batchID uint64) ([]*ExchangeDeposit, error)
func GetUnregisteredExchangeDepositsByChain ¶
func GetUnregisteredExchangeDepositsByChain(q dbcl.Querier, chain string) ([]*ExchangeDeposit, error)
type ExchangeInput ¶
type ExchangeInput struct { ID uint64 `db:"id"` BatchID uint64 `db:"batch_id"` InChainID string `db:"in_chain_id"` OutChainID string `db:"out_chain_id"` Value dbcl.NullBigInt `db:"value"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetExchangeInputs ¶
func GetExchangeInputs(q dbcl.Querier, batchID uint64) ([]*ExchangeInput, error)
type ExchangeTrade ¶
type ExchangeTrade struct { ID uint64 `db:"id"` BatchID uint64 `db:"batch_id"` PathID int `db:"path_id"` StageID int `db:"stage_id"` StepID int `db:"step_id"` IsMarketOrder bool `db:"is_market_order"` TradeStrategy int `db:"trade_strategy"` ExchangeTradeID *string `db:"exchange_trade_id"` InitialChainID string `db:"initial_chain_id"` FromChainID string `db:"from_chain_id"` ToChainID string `db:"to_chain_id"` Market string `db:"market"` Direction int `db:"direction"` Value dbcl.NullBigInt `db:"value"` Proceeds dbcl.NullBigInt `db:"proceeds"` TradeFees dbcl.NullBigInt `db:"trade_fees"` CumulativeDepositFees dbcl.NullBigInt `db:"cumulative_deposit_fees"` CumulativeTradeFees dbcl.NullBigInt `db:"cumulative_trade_fees"` OrderPrice *float64 `db:"order_price"` FillPrice *float64 `db:"fill_price"` CumulativeFillPrice *float64 `db:"cumulative_fill_price"` Slippage *float64 `db:"slippage"` Initiated bool `db:"initiated"` Confirmed bool `db:"confirmed"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetExchangeTrades ¶
func GetExchangeTrades(q dbcl.Querier, batchID uint64) ([]*ExchangeTrade, error)
func GetFinalExchangeTrades ¶
func GetFinalExchangeTrades(q dbcl.Querier, batchID uint64) ([]*ExchangeTrade, error)
type ExchangeWithdrawal ¶
type ExchangeWithdrawal struct { ID uint64 `db:"id"` BatchID uint64 `db:"batch_id"` ChainID string `db:"chain_id"` NetworkID string `db:"network_id"` ExchangeTxID *string `db:"exchange_txid"` ExchangeWithdrawalID string `db:"exchange_withdrawal_id"` Value dbcl.NullBigInt `db:"value"` DepositFees dbcl.NullBigInt `db:"deposit_fees"` TradeFees dbcl.NullBigInt `db:"trade_fees"` WithdrawalFees dbcl.NullBigInt `db:"withdrawal_fees"` CumulativeFees dbcl.NullBigInt `db:"cumulative_fees"` Confirmed bool `db:"confirmed"` Spent bool `db:"spent"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetExchangeWithdrawals ¶
func GetExchangeWithdrawals(q dbcl.Querier, batchID uint64) ([]*ExchangeWithdrawal, error)
type IPAddress ¶
type IPAddress struct { ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` WorkerID uint64 `db:"worker_id"` IPAddress string `db:"ip_address"` Active bool `db:"active"` Expired bool `db:"expired"` LastDifficulty *float64 `db:"last_difficulty"` RoundTripTime *float64 `db:"rtt"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
type Miner ¶
type Miner struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` Address string `db:"address"` Email *string `db:"email"` Threshold dbcl.NullBigInt `db:"threshold"` Active bool `db:"active"` EnabledWorkerNotifications bool `db:"enabled_worker_notifications"` EnabledPayoutNotifications bool `db:"enabled_payout_notifications"` RecipientFeePercent *uint64 `db:"recipient_fee_percent"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` // helpful for a specific join query (GetActiveWorkers) LastShare time.Time `db:"last_share"` }
func GetMinersWithLastShares ¶
type Node ¶
type Node struct { URL string `db:"url"` ChainID string `db:"chain_id"` Region string `db:"region"` Version *string `db:"version"` Mainnet bool `db:"mainnet"` Enabled bool `db:"enabled"` Backup bool `db:"backup"` Active bool `db:"active"` Synced bool `db:"synced"` Height *uint64 `db:"height"` NeedsBackup bool `db:"needs_backup"` PendingBackup bool `db:"pending_backup"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` DownAt *time.Time `db:"down_at"` BackupAt *time.Time `db:"backup_at"` }
type Payout ¶
type Payout struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` Address string `db:"address"` TransactionID *uint64 `db:"transaction_id"` TxID string `db:"txid"` Height *uint64 `db:"height"` Value dbcl.NullBigInt `db:"value"` FeeBalance dbcl.NullBigInt `db:"fee_balance"` PoolFees dbcl.NullBigInt `db:"pool_fees"` ExchangeFees dbcl.NullBigInt `db:"exchange_fees"` TxFees dbcl.NullBigInt `db:"tx_fees"` Pending bool `db:"pending"` Confirmed bool `db:"confirmed"` Failed bool `db:"failed"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetPayoutsByMinerIDs ¶
type Round ¶
type Round struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` MinerID uint64 `db:"miner_id"` // column not present in the table, only // helpful for a specific join query (GetRounds) Miner *string `db:"miner"` Solo bool `db:"solo"` Height uint64 `db:"height"` UncleHeight *uint64 `db:"uncle_height"` EpochHeight *uint64 `db:"epoch_height"` Hash string `db:"hash"` Nonce *uint64 `db:"nonce"` MixDigest *string `db:"mix_digest"` Solution *string `db:"solution"` CoinbaseTxID *string `db:"coinbase_txid"` Value dbcl.NullBigInt `db:"value"` Difficulty uint64 `db:"difficulty"` Luck float64 `db:"luck"` // column not present in the table, only helpful for // a specific join query (GetRoundsByMiner) MinerValue dbcl.NullBigInt `db:"miner_value"` Pending bool `db:"pending"` Uncle bool `db:"uncle"` Orphan bool `db:"orphan"` Mature bool `db:"mature"` Spent bool `db:"spent"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetPendingRoundsByChain ¶
func GetRoundsByChain ¶
func GetRoundsByMinerIDs ¶
type Transaction ¶
type Transaction struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` Type int `db:"type"` TxID string `db:"txid"` TxHex string `db:"tx_hex"` Height *uint64 `db:"height"` Value dbcl.NullBigInt `db:"value"` Fee dbcl.NullBigInt `db:"fee"` FeeBalance dbcl.NullBigInt `db:"fee_balance"` Remainder dbcl.NullBigInt `db:"remainder"` RemainderIdx uint32 `db:"remainder_idx"` Spent bool `db:"spent"` Confirmed bool `db:"confirmed"` Failed bool `db:"failed"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetTransaction ¶
func GetTransaction(q dbcl.Querier, id uint64) (*Transaction, error)
func GetTransactionByTxID ¶
func GetTransactionByTxID(q dbcl.Querier, txid string) (*Transaction, error)
func GetUnconfirmedTransactions ¶
func GetUnconfirmedTransactions(q dbcl.Querier, chainID string) ([]*Transaction, error)
func GetUnspentTransactions ¶
func GetUnspentTransactions(q dbcl.Querier, chainID string) ([]*Transaction, error)
type UTXO ¶
type UTXO struct { ID uint64 `db:"id"` ChainID string `db:"chain_id"` TransactionID *uint64 `db:"transaction_id"` Value dbcl.NullBigInt `db:"value"` TxID string `db:"txid"` Index uint32 `db:"idx"` Active bool `db:"active"` Spent bool `db:"spent"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
func GetUTXOsByTransactionID ¶
type Worker ¶
type Worker struct { ID uint64 `db:"id"` MinerID uint64 `db:"miner_id"` Name string `db:"name"` Active bool `db:"active"` Notified bool `db:"notified"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` // column not present in the table, only // helpful for a specific join query (GetWorkersByMinerID) LastDifficulty *float64 `db:"last_difficulty"` }
func GetWorkersByMinerID ¶
Click to show internal directories.
Click to hide internal directories.