Documentation
¶
Index ¶
- Constants
- type ActionEntity
- type AmountInCountry
- type AmountInTime
- type Browser
- type Device
- type Location
- type MetricCounterEntity
- type MetricDayCounterEntity
- type MetricMonthCounterEntity
- type MetricYearCounterEntity
- type MongoDate
- type OperatingSystem
- type Page
- type Plugins
- type Screen
- type SiteDayBrowserCounterEntity
- type SiteDayCountryCounterEntity
- type SiteMonthBrowserCounterEntity
- type SiteMonthCountryCounterEntity
- type SiteYearBrowserCounterEntity
- type SiteYearCountryCounterEntity
- type Visit
- type Visits
- func (v *Visits) GetByID(ID gocql.UUID) (*Visit, error)
- func (v *Visits) GetIDs() (IDs []*gocql.UUID)
- func (v *Visits) Length() int
- func (v *Visits) MapToDistributionByCountryCode() (amount []*AmountInCountry)
- func (v *Visits) MapToDistributionByTime() []*AmountInTime
- func (v *Visits) VisitsAverageDuration() time.Duration
- type Window
Constants ¶
View Source
const ( // MinVisitDuration represents minimal duration of single visit MinVisitDuration = 30 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionEntity ¶
type ActionEntity struct { ID gocql.UUID `cql:"id"` VisitID gocql.UUID `cql:"visit_id"` IP string `cql:"ip"` SiteID int64 `cql:"site_id"` Referrer string `cql:"referrer"` Language string `cql:"language"` BrowserName string `cql:"browser_name"` BrowserVersion string `cql:"browser_version"` BrowserMajorVersion string `cql:"browser_major_version"` BrowserUserAgent string `cql:"browser_user_agent"` BrowserPlatform string `cql:"browser_platform"` BrowserCookie bool `cql:"browser_cookie"` BrowserPluginJava bool `cql:"browser_plugin_java"` BrowserIsOnline bool `cql:"browser_is_online"` BrowserWindowWidth int64 `cql:"browser_window_width"` BrowserWindowHeight int64 `cql:"browser_window_height"` ScreenWidth int64 `cql:"screen_width"` ScreenHeight int64 `cql:"screen_height"` OperatingSystemName string `cql:"os_name"` OperatingSystemVersion string `cql:"os_version"` DeviceName string `cql:"device_name"` DeviceIsMobile bool `cql:"device_is_mobile"` DeviceIsTablet bool `cql:"device_is_tablet"` DeviceIsPhone bool `cql:"device_is_phone"` LocationCityName string `cql:"location_city_name"` LocationCityID uint `cql:"location_city_id"` LocationCountryName string `cql:"location_country_name"` LocationCountryCode string `cql:"location_country_code"` LocationCountryID uint `cql:"location_country_id"` LocationContinentName string `cql:"location_continent_name"` LocationContinentCode string `cql:"location_continent_code"` LocationContinentID uint `cql:"location_continent_id"` LocationLatitude float64 `cql:"location_latitude"` LocationLongitude float64 `cql:"location_longitude"` LocationMetroCode uint `cql:"location_metro_code"` LocationTime time.Time `cql:"location_time"` LocationTimezone string `cql:"location_timezone"` LocationPostalCode string `cql:"location_postal_code"` LocationIsAnonymousProxy bool `cql:"location_is_anonymous_proxy"` LocationIsSatelliteProvider bool `cql:"location_is_satellite_provider"` PageTitle string `cql:"page_title"` PageHost string `cql:"page_host"` PageURL string `cql:"page_url"` ServerTime time.Time `cql:"server_time"` ServerTimezone time.Location `cql:"server_timezone"` ClientTime time.Time `cql:"client_time"` ClientTimezone time.Location `cql:"client_timezone"` }
ActionEntity represents visit object stored in database.
type AmountInCountry ¶
type AmountInCountry struct { Amount int64 `json:"amount" cql:"amount"` CountryCode string `json:"countryCode" cql:"country_code"` }
AmountInCountry ...
type AmountInTime ¶
type AmountInTime struct { Amount int64 `json:"amount" cql:"amount"` DateTime time.Time `json:"dateTime" cql:"date_time"` }
AmountInTime ...
type Browser ¶
type Browser struct { Name string `json:"name" cql:"name"` Version string `json:"version" cql:"version"` MajorVersion string `json:"majorVersion" cql:"major_version"` UserAgent string `json:"userAgent" cql:"user_agent"` Platform string `json:"platform" cql:"platform"` Cookie bool `json:"cookie" cql:"cookie"` Plugins Plugins `json:"plugins" cql:"plugins"` IsOnline bool `json:"isOnline" cql:"is_online"` Window Window `json:"window" cql:"window"` }
Browser represents browser information.
type Device ¶
type Device struct { Name string `json:"name" cql:"name"` IsMobile bool `json:"isMobile" cql:"is_mobile"` IsTablet bool `json:"isTablet" cql:"is_tablet"` IsPhone bool `json:"isPhone" cql:"is_phone"` }
Device ...
type Location ¶
type Location struct { CityName string `json:"cityName"` CityID uint `json:"cityId"` CountryName string `json:"countryName"` CountryCode string `json:"countryCode"` CountryID uint `json:"countryId"` ContinentName string `json:"continentName"` ContinentCode string `json:"continentCode"` ContinentID uint `json:"continentId"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` MetroCode uint `json:"metroCode"` Timezone string `json:"timezone"` PostalCode string `json:"postalCode"` IsAnonymousProxy bool `json:"isAnonymousProxy"` IsSatelliteProvider bool `json:"isSatelliteProvider"` }
Location ...
func NewLocationFromGeoIP ¶
NewLocationFromGeoIP ...
type MetricCounterEntity ¶
type MetricCounterEntity struct { DimensionsNames string `json:"dimensionsNames"` DimensionsValues string `json:"dimensionsValues"` Count int64 `json:"count"` }
MetricCounterEntity ...
type MetricDayCounterEntity ¶
type MetricDayCounterEntity struct { MetricCounterEntity MadeAtDay int `json:"madeAtDay" cql:"made_at_day"` MadeAtMonth int `json:"madeAtMonth" cql:"made_at_month"` MadeAtYear int `json:"madeAtYear" cql:"made_at_year"` }
MetricDayCounterEntity ...
type MetricMonthCounterEntity ¶
type MetricMonthCounterEntity struct { MetricCounterEntity MadeAtDay int `json:"madeAtDay" cql:"made_at_day"` MadeAtYear int `json:"madeAtYear" cql:"made_at_month"` }
MetricMonthCounterEntity ...
type MetricYearCounterEntity ¶
type MetricYearCounterEntity struct { MetricCounterEntity MadeAtDay int `json:"madeAtDay"` }
MetricYearCounterEntity ...
type MongoDate ¶
type MongoDate struct { DateTime *time.Time `json:"dateTime" cql:"date_time"` Bucket []string `json:"bucket" cql:"bucket"` }
MongoDate ...
type OperatingSystem ¶
type Page ¶
type Page struct { Title string `json:"title" cql:"title"` Host string `json:"host" cql:"host"` URL string `json:"url" cql:"url"` }
Page represents page information
type SiteDayBrowserCounterEntity ¶
type SiteDayBrowserCounterEntity struct { SiteYearBrowserCounterEntity MadeAtMonth int `json:"madeAtMonth"` MadeAtDay int `json:"madeAtDay"` }
SiteDayBrowserCounter ...
type SiteDayCountryCounterEntity ¶
type SiteDayCountryCounterEntity struct { SiteYearCountryCounterEntity MadeAtMonth int `json:"madeAtMonth"` MadeAtDay int `json:"madeAtDay"` }
SiteDayCountryCounterEntity ...
type SiteMonthBrowserCounterEntity ¶
type SiteMonthBrowserCounterEntity struct { SiteYearBrowserCounterEntity MadeAtMonth int `json:"madeAtMonth"` }
SiteMonthBrowserCounterEntity ...
type SiteMonthCountryCounterEntity ¶
type SiteMonthCountryCounterEntity struct { SiteYearCountryCounterEntity MadeAtMonth int `json:"madeAtMonth"` }
SiteMonthCountryCounterEntity ...
type SiteYearBrowserCounterEntity ¶
type SiteYearBrowserCounterEntity struct { SiteID int64 `json:"siteId"` BrowserName string `json:"browserName"` BrowserVersion string `json:"browserVersion"` MadeAtYear int `json:"madeAtYear"` Count int64 `json:"count"` }
SiteYearBrowserCounter ...
type SiteYearCountryCounterEntity ¶
type SiteYearCountryCounterEntity struct { SiteID int64 `json:"siteId"` LocationCountryName string `json:"locationCountryName"` LocationCountryCode string `json:"locationCountryCode"` LocationCountryID int `json:"locationCountryID"` MadeAtYear int `json:"madeAtYear"` Count int64 `json:"count"` }
SiteYearCountryCounterEnity ...
type Visit ¶
type Visit struct { ID gocql.UUID `json:"id,omitempty" cql:"id"` IP string `json:"ip,omitempty" cql:"ip"` NbOfActions int64 `json:"nbOfActions,omitempty" cql:"nb_of_actions"` SiteID int64 `json:"siteId,omitempty" cql:"site_id"` Referrer string `json:"referrer,omitempty" cql:"referrer"` Language string `json:"language,omitempty" cql:"language"` Browser *Browser `json:"browser,omitempty" cql:"browser"` Screen *Screen `json:"screen,omitempty" cql:"screen"` OperatingSystem *OperatingSystem `json:"os,omitempty" cql:"os"` Device *Device `json:"device,omitempty" cql:"device"` Location *Location `json:"location,omitempty" cql:"location"` FirstPage *Page `json:"firstPage,omitempty" cql:"first_page"` LastPage *Page `json:"lastPage,omitempty" cql:"last_page"` FirstActionAt time.Time `json:"firstActionAt,omitempty" cql:"first_action_at"` LastActionAt time.Time `json:"lastActionAt,omitempty" cql:"last_action_at"` }
Visit ...
type Visits ¶
type Visits []*Visit
Visits ...
func (*Visits) MapToDistributionByCountryCode ¶
func (v *Visits) MapToDistributionByCountryCode() (amount []*AmountInCountry)
MapToDistributionByCountryCode ...
func (*Visits) MapToDistributionByTime ¶
func (v *Visits) MapToDistributionByTime() []*AmountInTime
MapToDistributionByTime ...
func (*Visits) VisitsAverageDuration ¶
VisitsAverageDuration ...
Click to show internal directories.
Click to hide internal directories.