query

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(vm *goja.Runtime)

Types

type Duration

type Duration struct {
	Value time.Duration `json:"value"`
}

type Global added in v0.0.13

type Global struct {
	Visitors uint64 `json:"visitors,omitempty"`
	Views    uint64 `json:"views,omitempty"`
	Events   uint64 `json:"events,omitempty"`
	Visits   uint64 `json:"visits,omitempty"`
}

type Metrics

type Metrics struct {
	Visitors       *Select `json:"visitors,omitempty"`
	Views          *Select `json:"views,omitempty"`
	Events         *Select `json:"events,omitempty"`
	Visits         *Select `json:"visits,omitempty"`
	BounceRates    *Select `json:"bounceRates,omitempty"`
	VisitDurations *Select `json:"visitDurations,omitempty"`
}

func (*Metrics) Set

func (m *Metrics) Set(key string, sel *Select)

type MetricsResult

type MetricsResult struct {
	Visitors       map[string][]uint32 `json:"visitors,omitempty"`
	Views          map[string][]uint32 `json:"views,omitempty"`
	Events         map[string][]uint32 `json:"events,omitempty"`
	Visits         map[string][]uint32 `json:"visits,omitempty"`
	BounceRates    map[string][]uint32 `json:"bounceRates,omitempty"`
	VisitDurations map[string][]uint32 `json:"visitDurations,omitempty"`
}

type Props

type Props struct {
	Base           *Metrics `json:"base,omitempty"`
	Event          *Metrics `json:"event,omitempty"`
	Page           *Metrics `json:"page,omitempty"`
	EntryPage      *Metrics `json:"entryPage,omitempty"`
	ExitPage       *Metrics `json:"exitPage,omitempty"`
	Referrer       *Metrics `json:"referrer,omitempty"`
	UtmMedium      *Metrics `json:"utmMedium,omitempty"`
	UtmSource      *Metrics `json:"utmSource,omitempty"`
	UtmCampaign    *Metrics `json:"utmCampaign,omitempty"`
	UtmContent     *Metrics `json:"utmContent,omitempty"`
	UtmTerm        *Metrics `json:"utmTerm,omitempty"`
	UtmDevice      *Metrics `json:"UtmDevice,omitempty"`
	UtmBrowser     *Metrics `json:"utmBrowser,omitempty"`
	BrowserVersion *Metrics `json:"browserVersion,omitempty"`
	Os             *Metrics `json:"os,omitempty"`
	OsVersion      *Metrics `json:"osVersion,omitempty"`
	Country        *Metrics `json:"country,omitempty"`
	Region         *Metrics `json:"region,omitempty"`
	City           *Metrics `json:"city,omitempty"`
}

func (*Props) All

func (p *Props) All(f func(string, *Metrics))

func (*Props) Set

func (p *Props) Set(prop string, m *Metrics)

type PropsResult

type PropsResult struct {
	Base           *MetricsResult `json:"base,omitempty"`
	Event          *MetricsResult `json:"event,omitempty"`
	Page           *MetricsResult `json:"page,omitempty"`
	EntryPage      *MetricsResult `json:"entryPage,omitempty"`
	ExitPage       *MetricsResult `json:"exitPage,omitempty"`
	Referrer       *MetricsResult `json:"referrer,omitempty"`
	UtmMedium      *MetricsResult `json:"utmMedium,omitempty"`
	UtmSource      *MetricsResult `json:"utmSource,omitempty"`
	UtmCampaign    *MetricsResult `json:"utmCampaign,omitempty"`
	UtmContent     *MetricsResult `json:"utmContent,omitempty"`
	UtmTerm        *MetricsResult `json:"utmTerm,omitempty"`
	UtmDevice      *MetricsResult `json:"UtmDevice,omitempty"`
	UtmBrowser     *MetricsResult `json:"utmBrowser,omitempty"`
	BrowserVersion *MetricsResult `json:"browserVersion,omitempty"`
	Os             *MetricsResult `json:"os,omitempty"`
	OsVersion      *MetricsResult `json:"osVersion,omitempty"`
	Country        *MetricsResult `json:"country,omitempty"`
	Region         *MetricsResult `json:"region,omitempty"`
	City           *MetricsResult `json:"city,omitempty"`
}

type Query

type Query struct {
	Offset *Duration `json:"offset,omitempty"`
	Sum    bool      `json:"sum,omitempty"`
	Window *Duration `json:"window,omitempty"`
	Props  *Props    `json:"props,omitempty"`
}

type QueryResult

type QueryResult struct {
	Timestamps []int64     `json:"timestamps"`
	Props      PropsResult `json:"props"`
}

type Select

type Select struct {
	Exact *Value `json:"exact,omitempty"`
	Re    *Value `json:"re,omitempty"`
	Glob  *Value `json:"glob,omitempty"`
	// contains filtered or unexported fields
}

func (*Select) Equal

func (s *Select) Equal(o *Select) bool

func (*Select) Match

func (s *Select) Match(txt []byte) bool

type Value

type Value struct {
	Value string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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