Documentation
¶
Index ¶
- type ActiveUsersSummaryRow
- type BigQuery
- type BigQueryOptions
- type Client
- func (c *Client) QueryActiveUsageSummary(ctx context.Context, spec FromToQuerySpec) (*[]ActiveUsersSummaryRow, error)
- func (c *Client) QuerySummary(ctx context.Context, userID string, creatorID string, spec QuerySpec) (*UsageSummaryRow, error)
- func (c *Client) QuerySummaryWithTimestep(ctx context.Context, userID string, creatorID string, spec QuerySpec) (*[]UsageSummaryRow, error)
- func (c *Client) QueryTotalSummary(ctx context.Context, spec FromToQuerySpec) (*[]TotalUsageSummaryRow, error)
- type ClientOptions
- type FromToQuerySpec
- type QueryFilter
- type QuerySpec
- type TotalUsageSummaryRow
- type UsageSummaryRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveUsersSummaryRow ¶ added in v0.8.0
type ActiveUsersSummaryRow struct {
UserID string `bigquery:"user_id" json:"userId"`
Email string `bigquery:"email" json:"email"`
From time.Time `bigquery:"interval_start_date" json:"from"`
To time.Time `bigquery:"interval_end_date" json:"to"`
DeliveryUsageMins float64 `bigquery:"delivery_usage_mins" json:"deliveryUsageMins"`
TotalUsageMins float64 `bigquery:"transcode_total_usage_mins" json:"totalUsageMins"`
StorageUsageMins float64 `bigquery:"storage_usage_mins" json:"storageUsageMins"`
}
type BigQuery ¶
type BigQuery interface {
QueryUsageSummary(ctx context.Context, userID string, creatorID string, spec QuerySpec) (*UsageSummaryRow, error)
QueryUsageSummaryWithTimestep(ctx context.Context, userID string, creatorID string, spec QuerySpec) (*[]UsageSummaryRow, error)
QueryTotalUsageSummary(ctx context.Context, spec FromToQuerySpec) (*[]TotalUsageSummaryRow, error)
QueryActiveUsersUsageSummary(ctx context.Context, spec FromToQuerySpec) (*[]ActiveUsersSummaryRow, error)
}
func NewBigQuery ¶
func NewBigQuery(opts BigQueryOptions) (BigQuery, error)
type BigQueryOptions ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ClientOptions) (*Client, error)
func (*Client) QueryActiveUsageSummary ¶ added in v0.8.0
func (c *Client) QueryActiveUsageSummary(ctx context.Context, spec FromToQuerySpec) (*[]ActiveUsersSummaryRow, error)
func (*Client) QuerySummary ¶
func (*Client) QuerySummaryWithTimestep ¶
func (*Client) QueryTotalSummary ¶ added in v0.8.0
func (c *Client) QueryTotalSummary(ctx context.Context, spec FromToQuerySpec) (*[]TotalUsageSummaryRow, error)
type ClientOptions ¶
type ClientOptions struct {
Livepeer livepeer.ClientOptions
BigQueryOptions
}
type FromToQuerySpec ¶ added in v0.8.0
type QueryFilter ¶
type TotalUsageSummaryRow ¶ added in v0.8.0
type TotalUsageSummaryRow struct {
DateTs time.Time `bigquery:"date_ts" json:"dateTs"`
DateS int64 `bigquery:"date_s" json:"dateS"`
WeekTs time.Time `bigquery:"week_ts" json:"weekTs"`
WeekS int64 `bigquery:"week_s" json:"weekS"`
VolumeEth float64 `bigquery:"volume_eth" json:"volumeEth"`
VolumeUsd float64 `bigquery:"volume_usd" json:"volumeUsd"`
FeeDerivedMinutes float64 `bigquery:"fee_derived_minutes" json:"feeDerivedMinutes"`
ParticipationRate float64 `bigquery:"participation_rate" json:"participationRate"`
Inflation float64 `bigquery:"inflation" json:"inflation"`
ActiveTranscoderCount int64 `bigquery:"active_transcoder_count" json:"activeTranscoderCount"`
DelegatorsCount int64 `bigquery:"delegators_count" json:"delegatorsCount"`
AveragePricePerPixel float64 `bigquery:"average_price_per_pixel" json:"averagePricePerPixel"`
AveragePixelPerMinute float64 `bigquery:"average_pixel_per_minute" json:"averagePixelPerMinute"`
}
type UsageSummaryRow ¶
Click to show internal directories.
Click to hide internal directories.