Documentation ¶
Index ¶
- func DeleteBlocksBeforeEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) error
- func DeleteGlobalSharesBeforeEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) error
- func DeleteMinerSharesBeforeEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) error
- func DeleteRawBlocksBeforeTime(q dbcl.Querier, chain string, timestamp time.Time) error
- func DeleteWorkerSharesBeforeEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) error
- func GetBlockMaxEndTime(q dbcl.Querier, chain string, period int) (time.Time, error)
- func GetBlocksAverageSlow(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (float64, error)
- func GetEarningMaxEndTime(q dbcl.Querier, chain string, period int) (time.Time, error)
- func GetGlobalEarningsAverage(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (float64, error)
- func GetGlobalSharesAverage(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (float64, error)
- func GetMinerEarningsAverage(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (map[uint64]float64, error)
- func GetMinerSharesAverage(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (map[uint64]float64, error)
- func GetPriceMaxTimestamp(q dbcl.Querier, chain string) (time.Time, error)
- func GetRawBlockMaxHashByHeight(q dbcl.Querier, chain string) (string, error)
- func GetRawBlockMaxHeight(q dbcl.Querier, chain string) (uint64, error)
- func GetRawBlockMaxTimestamp(q dbcl.Querier, chain string) (time.Time, error)
- func GetRawBlockMaxTimestampBeforeTime(q dbcl.Querier, chain string, timestamp time.Time) (time.Time, error)
- func GetWorkerSharesAverage(q dbcl.Querier, timestamp time.Time, chain string, period int, ...) (map[uint64]float64, error)
- func InsertBlocks(q dbcl.Querier, objects ...*Block) error
- func InsertFinalBlocks(q dbcl.Querier, objects ...*Block) error
- func InsertFinalGlobalShares(q dbcl.Querier, objects ...*Share) error
- func InsertFinalMinerShares(q dbcl.Querier, objects ...*Share) error
- func InsertFinalWorkerShares(q dbcl.Querier, objects ...*Share) error
- func InsertGlobalEarnings(q dbcl.Querier, objects ...*Earning) error
- func InsertGlobalShares(q dbcl.Querier, objects ...*Share) error
- func InsertMinerEarnings(q dbcl.Querier, objects ...*Earning) error
- func InsertMinerShares(q dbcl.Querier, objects ...*Share) error
- func InsertPartialBlocks(q dbcl.Querier, objects ...*Block) error
- func InsertPartialGlobalShares(q dbcl.Querier, objects ...*Share) error
- func InsertPartialMinerShares(q dbcl.Querier, objects ...*Share) error
- func InsertPartialWorkerShares(q dbcl.Querier, objects ...*Share) error
- func InsertPrices(q dbcl.Querier, objects ...*Price) error
- func InsertRawBlocks(q dbcl.Querier, objects ...*RawBlock) error
- func InsertWorkerShares(q dbcl.Querier, objects ...*Share) error
- func New(args map[string]string) (*dbcl.Client, error)
- type Block
- func GetBlocks(q dbcl.Querier, chain string, period int) ([]*Block, error)
- func GetBlocksAdjustedEmission(q dbcl.Querier, period int) ([]*Block, error)
- func GetBlocksAdjustedValue(q dbcl.Querier, period int) ([]*Block, error)
- func GetBlocksProfitability(q dbcl.Querier, period int) ([]*Block, error)
- func GetBlocksSingleMetric(q dbcl.Querier, metric string, period int) ([]*Block, error)
- func GetBlocksWithProfitabilityLast(q dbcl.Querier, period int) ([]*Block, error)
- func GetPendingBlocksAtEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) ([]*Block, error)
- func GetRawBlockRollup(q dbcl.Querier, chain string, start, end time.Time) (*Block, error)
- type Earning
- type Price
- type RawBlock
- type Share
- func GetGlobalShares(q dbcl.Querier, chain string, period int) ([]*Share, error)
- func GetGlobalSharesLast(q dbcl.Querier, period int) ([]*Share, error)
- func GetGlobalSharesSingleMetric(q dbcl.Querier, metric string, period int) ([]*Share, error)
- func GetMinerShares(q dbcl.Querier, minerIDs []uint64, chain string, period int) ([]*Share, error)
- func GetMinerSharesByEndTime(q dbcl.Querier, timestamp time.Time, minerIDs []uint64, chain string, ...) ([]*Share, error)
- func GetMinerSharesSingleMetric(q dbcl.Querier, minerIDs []uint64, metric string, period int) ([]*Share, error)
- func GetMinersSharesLast(q dbcl.Querier, minerIDs []uint64, period int) ([]*Share, error)
- func GetMinersSharesSum(q dbcl.Querier, minerIDs []uint64, period int, duration time.Duration) ([]*Share, error)
- func GetPendingGlobalSharesByEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) ([]*Share, error)
- func GetPendingMinerSharesByEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) ([]*Share, error)
- func GetPendingWorkerSharesByEndTime(q dbcl.Querier, timestamp time.Time, chain string, period int) ([]*Share, error)
- func GetWorkerShares(q dbcl.Querier, workerID uint64, chain string, period int) ([]*Share, error)
- func GetWorkerSharesAllChainsByEndTime(q dbcl.Querier, timestamp time.Time, workerIDs []uint64, period int) ([]*Share, error)
- func GetWorkerSharesLast(q dbcl.Querier, workerID uint64, period int) ([]*Share, error)
- func GetWorkerSharesSingleMetric(q dbcl.Querier, workerID uint64, metric string, period int) ([]*Share, error)
- func GetWorkerSharesSum(q dbcl.Querier, workerIDs []uint64, period int, duration time.Duration) ([]*Share, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockMaxEndTime ¶
func GetBlocksAverageSlow ¶
func GetEarningMaxEndTime ¶
func GetGlobalSharesAverage ¶
func GetMinerEarningsAverage ¶
func GetMinerSharesAverage ¶
func GetPriceMaxTimestamp ¶
func GetRawBlockMaxTimestamp ¶
func GetWorkerSharesAverage ¶
func InsertFinalGlobalShares ¶
func InsertFinalWorkerShares ¶
Types ¶
type Block ¶
type Block struct { ChainID string `db:"chain_id"` Value float64 `db:"value"` Difficulty float64 `db:"difficulty"` BlockTime float64 `db:"block_time"` Hashrate float64 `db:"hashrate"` UncleRate float64 `db:"uncle_rate"` Profitability float64 `db:"profitability"` AvgProfitability float64 `db:"avg_profitability"` // columns not present in the table, // only helpful for summary query and miner // profitability estimates ProfitabilityUSD float64 `db:"profitability_usd"` AvgProfitabilityUSD float64 `db:"avg_profitability_usd"` ProfitabilityBTC float64 `db:"profitability_btc"` AvgProfitabilityBTC float64 `db:"avg_profitability_btc"` ProfitabilityETH float64 `db:"profitability_eth"` AvgProfitabilityETH float64 `db:"avg_profitability_eth"` Pending bool `db:"pending"` Count uint64 `db:"count"` UncleCount uint64 `db:"uncle_count"` TxCount uint64 `db:"tx_count"` Period int `db:"period"` StartTime time.Time `db:"start_time"` EndTime time.Time `db:"end_time"` }
func GetBlocksAdjustedValue ¶
func GetBlocksProfitability ¶
func GetBlocksSingleMetric ¶
type Earning ¶
type Earning struct { ChainID string `db:"chain_id"` MinerID *uint64 `db:"miner_id"` Value float64 `db:"value"` AvgValue float64 `db:"avg_value"` Pending bool `db:"pending"` Count uint64 `db:"count"` Period int `db:"period"` StartTime time.Time `db:"start_time"` EndTime time.Time `db:"end_time"` }
type Share ¶
type Share struct {}
func GetGlobalShares ¶
func GetMinerShares ¶
func GetMinerSharesByEndTime ¶
func GetMinersSharesLast ¶
func GetMinersSharesSum ¶
func GetWorkerShares ¶
func GetWorkerSharesLast ¶
Click to show internal directories.
Click to hide internal directories.