reports

package
v1.54.0-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAttributionCSV

func GenerateAttributionCSV(ctx context.Context, database string, start time.Time, end time.Time, output io.Writer) error

GenerateAttributionCSV creates a report with.

func ParseRange added in v0.29.0

func ParseRange(startArg, endArg string) (time.Time, time.Time, error)

ParseRange parses report date range arguments. If the dates are malformed or if the start date does not come before the end date, an error is returned. The end date is exclusive.

Types

type AttributionTotals added in v1.54.1

type AttributionTotals map[string]Total

AttributionTotals is a map of attribution totals per user agent.

func SumAttributionByUserAgent added in v1.54.1

func SumAttributionByUserAgent(rows []*attribution.BucketUsage, log *zap.Logger) AttributionTotals

SumAttributionByUserAgent sums all bucket attribution by the first entry in the user agent.

type Total added in v1.54.1

type Total struct {
	ByteHours    float64
	SegmentHours float64
	ObjectHours  float64
	BucketHours  float64
	BytesEgress  int64
}

Total is the total attributable usage for a user agent over a period of time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL