Documentation
¶
Index ¶
- Constants
- type Bounced
- type Browser
- type BrowserVersion
- type Channel
- type City
- type Country
- type Day
- type Dimension
- type Duration
- type EntryPath
- type EntryTitle
- type Event
- type EventMeta
- type EventMetaFunction
- type EventMetaKey
- type EventMetaType
- type EventMetaValue
- type ExitPath
- type ExitTitle
- type Hostname
- type Hour
- type Language
- type Month
- type OS
- type OSVersion
- type PageViews
- type Path
- type Platform
- type Referrer
- type ReferrerIcon
- type ReferrerName
- type Region
- type ScreenClass
- type SessionID
- type SiteID
- type Start
- type Step
- type TagKey
- type TagValue
- type Tags
- type Time
- type Title
- type UTMCampaign
- type UTMContent
- type UTMMedium
- type UTMSource
- type UTMTerm
- type VisitorID
- type Week
- type Year
Constants ¶
const ( EventMetaTypeNone = EventMetaType(iota) EventMetaTypeFloat EventMetaTypeInt )
const ( EventMetaFunctionNone = EventMetaFunction(iota) EventMetaFunctionSum EventMetaFunctionAvg EventMetaFunctionMedian )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bounced ¶
type Bounced struct{}
Bounced is a Dimension.
func (Bounced) Expression ¶
Expression implements the Dimension interface.
type Browser ¶
type Browser struct{}
Browser is a Dimension.
func (Browser) Expression ¶
Expression implements the Dimension interface.
type BrowserVersion ¶
type BrowserVersion struct{}
BrowserVersion is a Dimension.
func (BrowserVersion) Args ¶
func (d BrowserVersion) Args() []any
Args implements the Dimension interface.
func (BrowserVersion) Column ¶
func (d BrowserVersion) Column(_ string) string
Column implements the Dimension interface.
func (BrowserVersion) Expression ¶
func (d BrowserVersion) Expression() string
Expression implements the Dimension interface.
func (BrowserVersion) ScanType ¶
func (d BrowserVersion) ScanType() any
ScanType implements the Metric interface.
func (BrowserVersion) Table ¶
func (d BrowserVersion) Table() []string
Table implements the Dimension interface.
type Channel ¶
type Channel struct{}
Channel is a Dimension.
func (Channel) Expression ¶
Expression implements the Dimension interface.
type City ¶
type City struct{}
City is a Dimension.
func (City) Expression ¶
Expression implements the Dimension interface.
type Country ¶
type Country struct{}
Country is a Dimension.
func (Country) Expression ¶
Expression implements the Dimension interface.
type Day ¶
type Day struct{}
Day is a Dimension.
func (Day) Expression ¶
Expression implements the Dimension interface.
type Dimension ¶
type Dimension interface {
// Table returns the valid database tables for the Dimension.
Table() []string
// Column returns the database column name for the given table for the Dimension.
// This also handles "joins" by potentially returning an entirely different column (like entry_path instead of path for bounces).
Column(string) string
// Expression returns the SQL expression for aggregation.
// If empty, the Column name will be used instead.
Expression() string
// Args returns optional arguments for the Expression.
Args() []any
// ScanType returns a pointer to the type the value for this Dimension scans into.
ScanType() any
}
Dimension is a field results are grouped by.
type Duration ¶
type Duration struct{}
Duration is a Dimension.
func (Duration) Expression ¶
Expression implements the Dimension interface.
type EntryPath ¶
type EntryPath struct{}
EntryPath is a Dimension.
func (EntryPath) Expression ¶
Expression implements the Dimension interface.
type EntryTitle ¶
type EntryTitle struct{}
EntryTitle is a Dimension.
func (EntryTitle) Column ¶
func (d EntryTitle) Column(_ string) string
Column implements the Dimension interface.
func (EntryTitle) Expression ¶
func (d EntryTitle) Expression() string
Expression implements the Dimension interface.
func (EntryTitle) ScanType ¶
func (d EntryTitle) ScanType() any
ScanType implements the Metric interface.
func (EntryTitle) Table ¶
func (d EntryTitle) Table() []string
Table implements the Dimension interface.
type Event ¶
type Event struct{}
Event is a Dimension.
func (Event) Expression ¶
Expression implements the Dimension interface.
type EventMeta ¶
type EventMeta struct {
// Path is the JSON path to extract the value.
Path string
// Type is the value type for casting.
Type EventMetaType
// Function is the function used for calculations.
Function EventMetaFunction
}
EventMeta is a Dimension.
func (EventMeta) Expression ¶
Expression implements the Dimension interface.
type EventMetaFunction ¶
type EventMetaFunction uint8
EventMetaFunction is the function used to calculate an event meta value.
type EventMetaKey ¶
type EventMetaKey struct{}
EventMetaKey is a Dimension. It's only really useful as a filter. The dimension will simply return the metadata column.
func (EventMetaKey) Args ¶
func (d EventMetaKey) Args() []any
Args implements the Dimension interface.
func (EventMetaKey) Column ¶
func (d EventMetaKey) Column(_ string) string
Column implements the Dimension interface.
func (EventMetaKey) Expression ¶
func (d EventMetaKey) Expression() string
Expression implements the Dimension interface.
func (EventMetaKey) ScanType ¶
func (d EventMetaKey) ScanType() any
ScanType implements the Metric interface.
func (EventMetaKey) Table ¶
func (d EventMetaKey) Table() []string
Table implements the Dimension interface.
type EventMetaType ¶
type EventMetaType uint8
EventMetaType is the cast type for an event meta value.
type EventMetaValue ¶
type EventMetaValue struct {
// Path is the JSON path to extract the value.
Path string
// Type is the value type for casting.
Type EventMetaType
}
EventMetaValue is a Dimension.
func (EventMetaValue) Args ¶
func (d EventMetaValue) Args() []any
Args implements the Dimension interface.
func (EventMetaValue) Column ¶
func (d EventMetaValue) Column(_ string) string
Column implements the Dimension interface.
func (EventMetaValue) Expression ¶
func (d EventMetaValue) Expression() string
Expression implements the Dimension interface.
func (EventMetaValue) ScanType ¶
func (d EventMetaValue) ScanType() any
ScanType implements the Metric interface.
func (EventMetaValue) Select ¶
func (d EventMetaValue) Select(path string) string
Select returns the SQL select expression applying any configured function or type cast.
func (EventMetaValue) Table ¶
func (d EventMetaValue) Table() []string
Table implements the Dimension interface.
type ExitPath ¶
type ExitPath struct{}
ExitPath is a Dimension.
func (ExitPath) Expression ¶
Expression implements the Dimension interface.
type ExitTitle ¶
type ExitTitle struct{}
ExitTitle is a Dimension.
func (ExitTitle) Expression ¶
Expression implements the Dimension interface.
type Hostname ¶
type Hostname struct{}
Hostname is a Dimension.
func (Hostname) Expression ¶
Expression implements the Dimension interface.
type Hour ¶
type Hour struct{}
Hour is a Dimension.
func (Hour) Expression ¶
Expression implements the Dimension interface.
type Language ¶
type Language struct{}
Language is a Dimension.
func (Language) Expression ¶
Expression implements the Dimension interface.
type Month ¶
type Month struct{}
Month is a Dimension.
func (Month) Expression ¶
Expression implements the Dimension interface.
type OS ¶
type OS struct{}
OS is a Dimension.
func (OS) Expression ¶
Expression implements the Dimension interface.
type OSVersion ¶
type OSVersion struct{}
OSVersion is a Dimension.
func (OSVersion) Expression ¶
Expression implements the Dimension interface.
type PageViews ¶
type PageViews struct{}
PageViews is a Dimension.
func (PageViews) Expression ¶
Expression implements the Dimension interface.
type Path ¶
type Path struct{}
Path is a Dimension.
func (Path) Expression ¶
Expression implements the Dimension interface.
type Platform ¶
type Platform struct{}
Platform is a Dimension.
func (Platform) Expression ¶
Expression implements the Dimension interface.
type Referrer ¶
type Referrer struct{}
Referrer is a Dimension.
func (Referrer) Expression ¶
Expression implements the Dimension interface.
type ReferrerIcon ¶
type ReferrerIcon struct{}
ReferrerIcon is a Dimension.
func (ReferrerIcon) Args ¶
func (d ReferrerIcon) Args() []any
Args implements the Dimension interface.
func (ReferrerIcon) Column ¶
func (d ReferrerIcon) Column(_ string) string
Column implements the Dimension interface.
func (ReferrerIcon) Expression ¶
func (d ReferrerIcon) Expression() string
Expression implements the Dimension interface.
func (ReferrerIcon) ScanType ¶
func (d ReferrerIcon) ScanType() any
ScanType implements the Metric interface.
func (ReferrerIcon) Table ¶
func (d ReferrerIcon) Table() []string
Table implements the Dimension interface.
type ReferrerName ¶
type ReferrerName struct{}
ReferrerName is a Dimension.
func (ReferrerName) Args ¶
func (d ReferrerName) Args() []any
Args implements the Dimension interface.
func (ReferrerName) Column ¶
func (d ReferrerName) Column(_ string) string
Column implements the Dimension interface.
func (ReferrerName) Expression ¶
func (d ReferrerName) Expression() string
Expression implements the Dimension interface.
func (ReferrerName) ScanType ¶
func (d ReferrerName) ScanType() any
ScanType implements the Metric interface.
func (ReferrerName) Table ¶
func (d ReferrerName) Table() []string
Table implements the Dimension interface.
type Region ¶
type Region struct{}
Region is a Dimension.
func (Region) Expression ¶
Expression implements the Dimension interface.
type ScreenClass ¶
type ScreenClass struct{}
ScreenClass is a Dimension.
func (ScreenClass) Args ¶
func (d ScreenClass) Args() []any
Args implements the Dimension interface.
func (ScreenClass) Column ¶
func (d ScreenClass) Column(_ string) string
Column implements the Dimension interface.
func (ScreenClass) Expression ¶
func (d ScreenClass) Expression() string
Expression implements the Dimension interface.
func (ScreenClass) ScanType ¶
func (d ScreenClass) ScanType() any
ScanType implements the Metric interface.
func (ScreenClass) Table ¶
func (d ScreenClass) Table() []string
Table implements the Dimension interface.
type SessionID ¶
type SessionID struct{}
SessionID is a Dimension.
func (SessionID) Expression ¶
Expression implements the Dimension interface.
type SiteID ¶
type SiteID struct{}
SiteID is a Dimension.
func (SiteID) Expression ¶
Expression implements the Dimension interface.
type Start ¶
type Start struct{}
Start is a Dimension.
func (Start) Expression ¶
Expression implements the Dimension interface.
type Step ¶
type Step struct {
Number int
}
Step is a Dimension.
func (Step) Expression ¶
Expression implements the Dimension interface.
type TagKey ¶
type TagKey struct{}
TagKey is a Dimension.
func (TagKey) Expression ¶
Expression implements the Dimension interface.
type TagValue ¶
type TagValue struct {
// Key is the map key to extract the value.
Key string
}
TagValue is a Dimension.
func (TagValue) Expression ¶
Expression implements the Dimension interface.
type Tags ¶
type Tags struct{}
Tags is a Dimension.
func (Tags) Expression ¶
Expression implements the Dimension interface.
type Time ¶
type Time struct{}
Time is a Dimension.
func (Time) Expression ¶
Expression implements the Dimension interface.
type Title ¶
type Title struct{}
Title is a Dimension.
func (Title) Expression ¶
Expression implements the Dimension interface.
type UTMCampaign ¶
type UTMCampaign struct{}
UTMCampaign is a Dimension.
func (UTMCampaign) Args ¶
func (d UTMCampaign) Args() []any
Args implements the Dimension interface.
func (UTMCampaign) Column ¶
func (d UTMCampaign) Column(_ string) string
Column implements the Dimension interface.
func (UTMCampaign) Expression ¶
func (d UTMCampaign) Expression() string
Expression implements the Dimension interface.
func (UTMCampaign) ScanType ¶
func (d UTMCampaign) ScanType() any
ScanType implements the Metric interface.
func (UTMCampaign) Table ¶
func (d UTMCampaign) Table() []string
Table implements the Dimension interface.
type UTMContent ¶
type UTMContent struct{}
UTMContent is a Dimension.
func (UTMContent) Column ¶
func (d UTMContent) Column(_ string) string
Column implements the Dimension interface.
func (UTMContent) Expression ¶
func (d UTMContent) Expression() string
Expression implements the Dimension interface.
func (UTMContent) ScanType ¶
func (d UTMContent) ScanType() any
ScanType implements the Metric interface.
func (UTMContent) Table ¶
func (d UTMContent) Table() []string
Table implements the Dimension interface.
type UTMMedium ¶
type UTMMedium struct{}
UTMMedium is a Dimension.
func (UTMMedium) Expression ¶
Expression implements the Dimension interface.
type UTMSource ¶
type UTMSource struct{}
UTMSource is a Dimension.
func (UTMSource) Expression ¶
Expression implements the Dimension interface.
type UTMTerm ¶
type UTMTerm struct{}
UTMTerm is a Dimension.
func (UTMTerm) Expression ¶
Expression implements the Dimension interface.
type VisitorID ¶
type VisitorID struct{}
VisitorID is a Dimension.
func (VisitorID) Expression ¶
Expression implements the Dimension interface.
type Week ¶
type Week struct{}
Week is a Dimension.
func (Week) Expression ¶
Expression implements the Dimension interface.
Source Files
¶
- bounced.go
- browser.go
- browser_version.go
- channel.go
- city.go
- country.go
- day.go
- dimension.go
- duration.go
- entry_path.go
- entry_title.go
- event.go
- event_meta.go
- event_meta_key.go
- event_meta_value.go
- exit_path.go
- exit_title.go
- hostname.go
- hour.go
- language.go
- month.go
- os.go
- os_version.go
- page_views.go
- path.go
- platform.go
- referrer.go
- referrer_icon.go
- referrer_name.go
- region.go
- screen_class.go
- session_id.go
- site_id.go
- start.go
- step.go
- tag_key.go
- tag_value.go
- tags.go
- time.go
- title.go
- utm_campaign.go
- utm_content.go
- utm_medium.go
- utm_source.go
- utm_term.go
- visitor_id.go
- week.go
- year.go