Documentation
¶
Index ¶
- Constants
- func NewAction(cat, action string) event.Context
- func NewAlias(from, to string) event.Context
- func NewApp(n string) event.Context
- func NewBrowser(n string) event.Context
- func NewDeviceContext(id string) event.Context
- func NewOSContext(name string) event.Context
- type Action
- type Alias
- type App
- type Browser
- type Campaign
- type Connectivity
- type Device
- type Extra
- type Group
- type Library
- type Location
- type Network
- type OS
- type Page
- type Referrer
- type Screen
- type Session
- type Timing
- type Traits
- type User
- type Viewport
Constants ¶
View Source
const ContextAction event.ContextType = "action"
View Source
const ContextAlias event.ContextType = "alias"
View Source
const ContextApp event.ContextType = "app"
View Source
const ContextBrowser event.ContextType = "browser"
View Source
const ContextCampaign event.ContextType = "campaign"
View Source
const ContextConnectivity event.ContextType = "connectivity"
View Source
const ContextDevice event.ContextType = "device"
View Source
const ContextExtra event.ContextType = "extra"
View Source
const ContextGroup event.ContextType = "group"
View Source
const ContextLibrary event.ContextType = "library"
View Source
const ContextLocation event.ContextType = "location"
View Source
const ContextNetwork event.ContextType = "network"
View Source
const ContextOS event.ContextType = "os"
View Source
const ContextPage event.ContextType = "page"
View Source
const ContextReferrer event.ContextType = "referrer"
View Source
const ContextScreen event.ContextType = "screen"
View Source
const ContextSession event.ContextType = "session"
View Source
const ContextTiming event.ContextType = "timing"
View Source
const ContextUser event.ContextType = "user"
View Source
const ContextViewport event.ContextType = "viewport"
Variables ¶
This section is empty.
Functions ¶
func NewBrowser ¶
func NewDeviceContext ¶
func NewOSContext ¶
Types ¶
type Action ¶
type Action struct {
Category string `json:"category" structs:"category" mapstructure:"category"`
Action string `json:"action" structs:"action" mapstructure:"action"`
Label string `json:"label,omitempty" structs:"label,omitempty" mapstructure:"label,omitempty"`
Property string `json:"property,omitempty" structs:"property,omitempty" mapstructure:"property,omitempty"`
Value interface{} `json:"value,omitempty" structs:"value,omitempty" mapstructure:"value,omitempty"`
}
func (*Action) Type ¶
func (ctx *Action) Type() event.ContextType
type App ¶
type App struct {
Name string `json:"name" structs:"name" mapstructure:"name"`
Version string `json:"version,omitempty" structs:"version,omitempty" mapstructure:"version,omitempty"`
Build string `json:"build,omitempty" structs:"build,omitempty" mapstructure:"build,omitempty"`
Namespace string `json:"namespace,omitempty" structs:"namespace,omitempty" mapstructure:"namespace,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty" structs:"properties,omitempty" mapstructure:"properties,omitempty"`
}
func (*App) Type ¶
func (ctx *App) Type() event.ContextType
type Browser ¶
type Browser struct {
Name string `json:"name,omitempty" structs:"name,omitempty" mapstructure:"name,omitempty"`
Version string `json:"version,omitempty" structs:"version,omitempty" mapstructure:"version,omitempty"`
UserAgent string `json:"userAgent,omitempty" structs:"userAgent,omitempty" mapstructure:"userAgent,omitempty"`
}
func (*Browser) Type ¶
func (ctx *Browser) Type() event.ContextType
type Campaign ¶
type Campaign struct {
Name string `json:"name" structs:"name" mapstructure:"name"`
Source string `json:"source,omitempty" structs:"source,omitempty" mapstructure:"source,omitempty"`
Medium string `json:"medium,omitempty" structs:"medium,omitempty" mapstructure:"medium,omitempty"`
Term string `json:"term,omitempty" structs:"term,omitempty" mapstructure:"term,omitempty"`
Content string `json:"content,omitempty" structs:"content,omitempty" mapstructure:"content,omitempty"`
}
func (*Campaign) Type ¶
func (ctx *Campaign) Type() event.ContextType
type Connectivity ¶
type Connectivity struct {
Bluetooth bool `json:"bluetooth,omitempty" structs:"bluetooth,omitempty" mapstructure:"bluetooth,omitempty"`
Cellular bool `json:"cellular,omitempty" structs:"cellular,omitempty" mapstructure:"cellular,omitempty"`
WIFI bool `json:"wifi,omitempty" structs:"wifi,omitempty" mapstructure:"wifi,omitempty"`
Ethernet bool `json:"ethernet,omitempty" structs:"ethernet,omitempty" mapstructure:"ethernet,omitempty"`
Carrier string `json:"carrier,omitempty" structs:"carrier,omitempty" mapstructure:"carrier,omitempty"`
ISP string `json:"isp,omitempty" structs:"isp,omitempty" mapstructure:"isp,omitempty"`
}
func (*Connectivity) Interface ¶
func (ctx *Connectivity) Interface() interface{}
func (*Connectivity) Type ¶
func (ctx *Connectivity) Type() event.ContextType
func (*Connectivity) Validate ¶
func (ctx *Connectivity) Validate() bool
func (*Connectivity) Values ¶
func (ctx *Connectivity) Values() map[string]interface{}
type Device ¶
type Device struct {
ID string `json:"id,omitempty" structs:"id,omitempty" mapstructure:"id,omitempty"`
Manufacturer string `json:"manufacturer,omitempty" structs:"manufacturer,omitempty" mapstructure:"manufacturer,omitempty"`
Model string `json:"model,omitempty" structs:"model,omitempty" mapstructure:"model,omitempty"`
Name string `json:"name,omitempty" structs:"name,omitempty" mapstructure:"name,omitempty"`
Kind string `json:"type,omitempty" structs:"type,omitempty" mapstructure:"type,omitempty"`
Version string `json:"version,omitempty" structs:"version,omitempty" mapstructure:"version,omitempty"`
Mobile bool `json:"mobile,omitempty" structs:"mobile,omitempty" mapstructure:"mobile,omitempty"`
Tablet bool `json:"tablet,omitempty" structs:"tablet,omitempty" mapstructure:"tablet,omitempty"`
Desktop bool `json:"desktop,omitempty" structs:"desktop,omitempty" mapstructure:"desktop,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty" structs:"properties,omitempty" mapstructure:"properties,omitempty"`
}
func (*Device) Type ¶
func (ctx *Device) Type() event.ContextType
type Extra ¶
type Extra map[string]interface{}
func (*Extra) Type ¶
func (ctx *Extra) Type() event.ContextType
type Group ¶
type Group struct {
ID string `json:"id,omitempty" structs:"id,omitempty" mapstructure:"id,omitempty"`
Name string `json:"name,omitempty" structs:"name,omitempty" mapstructure:"name,omitempty"`
}
func (*Group) Type ¶
func (ctx *Group) Type() event.ContextType
type Library ¶
type Library struct {
Name string `json:"name" structs:"name" mapstructure:"name"`
Version string `json:"version,omitempty" structs:"version,omitempty" mapstructure:"version,omitempty"`
}
func (*Library) Type ¶
func (ctx *Library) Type() event.ContextType
type Location ¶
type Location struct {
Street string `json:"street,omitempty" structs:"street,omitempty" mapstructure:"street,omitempty"`
City string `json:"city,omitempty" structs:"city,omitempty" mapstructure:"city,omitempty"`
State string `json:"state,omitempty" structs:"state,omitempty" mapstructure:"state,omitempty"`
PostalCode string `json:"postalCode,omitempty" structs:"postalCode,omitempty" mapstructure:"postalCode,omitempty"`
Region string `json:"region,omitempty" structs:"region,omitempty" mapstructure:"region,omitempty"`
Locale string `json:"locale,omitempty" structs:"locale,omitempty" mapstructure:"locale,omitempty"`
Country string `json:"country,omitempty" structs:"country,omitempty" mapstructure:"country,omitempty"`
Longitude float64 `json:"longitude,omitempty" structs:"longitude,omitempty" mapstructure:"longitude,omitempty"`
Latitude float64 `json:"latitude,omitempty" structs:"latitude,omitempty" mapstructure:"latitude,omitempty"`
Timezone string `json:"timezone,omitempty" structs:"timezone,omitempty" mapstructure:"timezone,omitempty"`
}
func (*Location) Type ¶
func (ctx *Location) Type() event.ContextType
type Network ¶
type Network struct {
IP net.IP `json:"ip,omitempty" structs:"ip,omitempty" mapstructure:"ip,omitempty"`
UserAgent string `json:"userAgent,omitempty" structs:"userAgent,omitempty" mapstructure:"userAgent,omitempty"`
}
func NewNetwork ¶
func (*Network) MarshalJSON ¶
func (*Network) Type ¶
func (ctx *Network) Type() event.ContextType
func (*Network) UnmarshalJSON ¶
type OS ¶
type OS struct {
Name string `json:"name" structs:"name" mapstructure:"name"`
Family string `json:"family,omitempty" structs:"family,omitempty" mapstructure:"family,omitempty"`
Platform string `json:"platform,omitempty" structs:"platform,omitempty" mapstructure:"platform,omitempty"`
Version string `json:"version,omitempty" structs:"version,omitempty" mapstructure:"version,omitempty"`
}
func (*OS) Type ¶
func (ctx *OS) Type() event.ContextType
type Page ¶
type Page struct {
Hash string `json:"hash,omitempty" structs:"hash,omitempty" mapstructure:"hash,omitempty"`
Path string `json:"path,omitempty" structs:"path,omitempty" mapstructure:"path,omitempty"`
Referrer string `json:"referrer,omitempty" structs:"referrer,omitempty" mapstructure:"referrer,omitempty"`
Search string `json:"search,omitempty" structs:"search,omitempty" mapstructure:"search,omitempty"`
Title string `json:"title,omitempty" structs:"title,omitempty" mapstructure:"title,omitempty"`
Hostname string `json:"hostname" structs:"hostname" mapstructure:"hostname"`
}
func (*Page) Type ¶
func (ctx *Page) Type() event.ContextType
type Referrer ¶
type Referrer struct {
RefType string `json:"type,omitempty" structs:"type,omitempty" mapstructure:"type,omitempty"`
Name string `json:"name,omitempty" structs:"name,omitempty" mapstructure:"name,omitempty"`
Hostname string `json:"hostname,omitempty" structs:"hostname,omitempty" mapstructure:"hostname,omitempty"`
Link string `json:"link,omitempty" structs:"link,omitempty" mapstructure:"link,omitempty"`
}
func (*Referrer) Type ¶
func (ctx *Referrer) Type() event.ContextType
type Screen ¶
type Screen struct {
Name string `json:"name" structs:"name" mapstructure:"name"`
Category string `json:"category,omitempty" structs:"category,omitempty" mapstructure:"category,omitempty"`
}
func (*Screen) Type ¶
func (ctx *Screen) Type() event.ContextType
type Session ¶
type Session struct {
ID string `json:"id" structs:"id" mapstructure:"id"`
}
func (*Session) Type ¶
func (ctx *Session) Type() event.ContextType
type Timing ¶
type Timing struct {
Category string `json:"category,omitempty" structs:"category,omitempty" mapstructure:"category,omitempty"`
Label string `json:"label,omitempty" structs:"label,omitempty" mapstructure:"label,omitempty"`
Unit string `json:"unit,omitempty" structs:"unit,omitempty" mapstructure:"unit,omitempty"`
Variable string `json:"variable,omitempty" structs:"variable,omitempty" mapstructure:"variable,omitempty"`
Value float64 `json:"value,omitempty" structs:"value,omitempty" mapstructure:"value,omitempty"`
}
func (*Timing) Type ¶
func (ctx *Timing) Type() event.ContextType
type Traits ¶
type Traits struct {
Age int `json:"age,omitempty" structs:"age,omitempty" mapstructure:"age,omitempty"`
Birthday string `json:"birthday,omitempty" structs:"birthday,omitempty" mapstructure:"birthday,omitempty"`
Description string `json:"description,omitempty" structs:"description,omitempty" mapstructure:"description,omitempty"`
Email string `json:"email,omitempty" structs:"email,omitempty" mapstructure:"email,omitempty"`
FirstName string `json:"firstName,omitempty" structs:"firstName,omitempty" mapstructure:"firstName,omitempty"`
LastName string `json:"lastName,omitempty" structs:"lastName,omitempty" mapstructure:"lastName,omitempty"`
Gender string `json:"gender,omitempty" structs:"gender,omitempty" mapstructure:"gender,omitempty"`
Phone string `json:"phone,omitempty" structs:"phone,omitempty" mapstructure:"phone,omitempty"`
Title string `json:"title,omitempty" structs:"title,omitempty" mapstructure:"title,omitempty"`
Username string `json:"username,omitempty" structs:"username,omitempty" mapstructure:"username,omitempty"`
Website string `json:"website,omitempty" structs:"website,omitempty" mapstructure:"website,omitempty"`
Extra map[string]interface{} `json:"extra,omitempty" structs:"extra,omitempty" mapstructure:"extra,omitempty"`
}
type User ¶
type User struct {
UserID string `json:"userID" structs:"userID" mapstructure:"userID"`
AnonID string `json:"anonID" structs:"anonID" mapstructure:"anonID"`
Name string `json:"name,omitempty" structs:"name,omitempty" mapstructure:"name,omitempty"`
Traits Traits `json:"traits,omitempty" structs:"traits,omitempty" mapstructure:"traits,omitempty"`
}
func (*User) Type ¶
func (ctx *User) Type() event.ContextType
type Viewport ¶
type Viewport struct {
Density int `json:"density,omitempty" structs:"density,omitempty" mapstructure:"density,omitempty"`
Width int `json:"width,omitempty" structs:"width,omitempty" mapstructure:"width,omitempty"`
Height int `json:"height,omitempty" structs:"height,omitempty" mapstructure:"height,omitempty"`
}
func (*Viewport) Type ¶
func (ctx *Viewport) Type() event.ContextType
Click to show internal directories.
Click to hide internal directories.