Documentation
¶
Index ¶
- Constants
- func NewActionService(s *store.Store) *actionManager
- func NewAppService(s *store.Store) *appManager
- func NewCachedSessionService(s *store.Store, c *cache.Cache) *cachedSessionManager
- func NewDeviceService(s *store.Store) *deviceManager
- func NewEventAggregate(s *store.Store) *evtAggregate
- func NewEventQuery(q *ent.EventQuery, qs ...QueryEvent)
- func NewEventService(s *store.Store) *eventManager
- func NewGroupService(c *ent.GroupClient) *groupManager
- func NewSessionService(s *store.Store) *sessionManager
- func NewUserService(s *store.Store) *userManager
- type Action
- type ActionManager
- type ActionReader
- type ActionWriter
- type App
- type AppManager
- type AppReader
- type AppReporter
- type AppWriter
- type Campaign
- type CreateActionEdge
- type CreateEventEdge
- type Device
- type DeviceManager
- type DeviceReader
- type DeviceReporter
- type DeviceWriter
- type Event
- type EventAggregate
- type EventManager
- type EventQuery
- type EventQueryBuild
- type EventReader
- type EventTransaction
- type EventWriter
- type Group
- type GroupManager
- type GroupReader
- type GroupWriter
- type PageStats
- type QueryEvent
- type QueryParams
- type ReferrerStats
- type ScannableQuery
- type ScannableQueryBuild
- type Session
- type SessionManager
- type SessionReader
- type SessionReporter
- type SessionWriter
- type SiteStats
- type UpdateActionEdge
- type UpdateEventEdge
- type User
- type UserManager
- type UserReader
- type UserReporter
- type UserWriter
Constants ¶
View Source
const ( DefaultLimit = 10 DefaultOffset = 0 )
Variables ¶
This section is empty.
Functions ¶
func NewActionService ¶
func NewAppService ¶
func NewCachedSessionService ¶
func NewDeviceService ¶
func NewEventAggregate ¶
func NewEventQuery ¶
func NewEventQuery(q *ent.EventQuery, qs ...QueryEvent)
func NewEventService ¶
func NewGroupService ¶
func NewGroupService(c *ent.GroupClient) *groupManager
func NewSessionService ¶
func NewUserService ¶
Types ¶
type Action ¶
type ActionManager ¶
type ActionManager interface {
// contains filtered or unexported methods
}
type ActionReader ¶
type ActionWriter ¶
type ActionWriter interface { Create(*Action, ...CreateActionEdge) error Update(*Action, ...UpdateActionEdge) error Delete(*Action) error }
type AppManager ¶
type AppManager interface {
// contains filtered or unexported methods
}
type AppReporter ¶
type AppReporter interface { AppReader }
type CreateActionEdge ¶
type CreateActionEdge func(*ent.ActionCreate)
func ActionWithEventEdge ¶
func ActionWithEventEdge(id uuid.UUID) CreateActionEdge
type CreateEventEdge ¶
type CreateEventEdge func(c *ent.EventCreate)
type Device ¶
type Device struct { ID string `json:"id"` Manufacturer string `json:"manufacturer"` Model string `json:"model"` Name string `json:"name"` Type string `json:"type"` Version string `json:"version"` Mobile bool `json:"mobile"` Tablet bool `json:"tablet"` Desktop bool `json:"desktop"` Properties map[string]interface{} `json:"properties"` }
type DeviceManager ¶
type DeviceManager interface {
// contains filtered or unexported methods
}
type DeviceReader ¶
type DeviceReporter ¶
type DeviceReporter interface { DeviceReader }
type DeviceWriter ¶
type Event ¶
type Event struct { ID uuid.UUID `json:"id"` TrackingID string `json:"trackingID"` UserID string `json:"userID"` GroupID int `json:"groupID"` SessionID uuid.UUID `json:"sessionID"` DeviceID string `json:"deviceID"` Anonymous bool `json:"anonymous"` NonInteractive bool `json:"nonInteractive"` Type string `json:"type"` Channel string `json:"channel"` Platform string `json:"platform"` Timestamp time.Time `json:"timestamp"` }
type EventAggregate ¶
type EventAggregate interface { Count(...QueryEvent) (int, error) GroupBy(ScannableQueryBuild, interface{}, ...QueryEvent) error }
type EventManager ¶
type EventManager interface {
// contains filtered or unexported methods
}
type EventQueryBuild ¶
type EventQueryBuild func(q *ent.EventQuery, qs ...QueryEvent)
type EventReader ¶
type EventReader interface { List(QueryParams) ([]*Event, error) Get(id uuid.UUID) (*Event, error) Query(...QueryEvent) ([]*Event, error) }
type EventTransaction ¶
func NewEventTransaction ¶
func NewEventTransaction(s *store.Store) EventTransaction
type EventWriter ¶
type EventWriter interface { Create(*Event, ...CreateEventEdge) error Update(*Event, ...UpdateEventEdge) error Delete(*Event) error }
type GroupManager ¶
type GroupManager interface {
// contains filtered or unexported methods
}
type GroupReader ¶
type GroupWriter ¶
type PageStats ¶
type PageStats struct { New bool `db:"-" json:"-"` SiteID int64 `db:"site_id" json:"-"` HostnameID int64 `db:"hostname_id" json:"-"` PathnameID int64 `db:"pathname_id" json:"-"` Hostname string `db:"hostname"` Pathname string `db:"pathname"` Pageviews int64 `db:"pageviews"` Visitors int64 `db:"visitors"` Entries int64 `db:"entries"` BounceRate float64 `db:"bounce_rate"` AvgDuration float64 `db:"avg_duration"` KnownDurations int64 `db:"known_durations"` Date time.Time `db:"ts" json:",omitempty"` }
type QueryEvent ¶
type QueryEvent func(q *ent.EventQuery)
func EventHasAction ¶
func EventHasAction() QueryEvent
func EventLimit ¶
func EventLimit(l int) QueryEvent
func EventOffset ¶
func EventOffset(o int) QueryEvent
func EventTimeAfter ¶
func EventTimeAfter(t time.Time) QueryEvent
func EventTimeBefore ¶
func EventTimeBefore(t time.Time) QueryEvent
type QueryParams ¶
type QueryParams struct { DeviceIDs []string `json:"cid" query:"cid"` SessionIDs []uuid.UUID `json:"sid" query:"sid"` UserIDs []uuid.UUID `json:"uid" query:"uid"` GroupIDs []int `json:"gid" query:"gid"` Offset int `json:"offset" query:"offset"` Limit int `json:"limit" query:"limit"` Start int `json:"start" query:"start"` End int `json:"end" query:"end"` Params map[string]string `json:"params" query:"params"` }
func (QueryParams) QueryEvent ¶
func (qp QueryParams) QueryEvent() []QueryEvent
type ReferrerStats ¶
type ReferrerStats struct { New bool `db:"-" json:"-"` SiteID int64 `db:"site_id" json:"-"` HostnameID int64 `db:"hostname_id" json:"-"` PathnameID int64 `db:"pathname_id" json:"-"` Hostname string `db:"hostname"` Pathname string `db:"pathname"` Group string `db:"groupname"` Visitors int64 `db:"visitors"` Pageviews int64 `db:"pageviews"` BounceRate float64 `db:"bounce_rate"` AvgDuration float64 `db:"avg_duration"` KnownDurations int64 `db:"known_durations"` Date time.Time `db:"ts" json:",omitempty"` }
type ScannableQuery ¶
func TopActionCategories ¶
func TopActionCategories(q *ent.EventQuery, qs ...QueryEvent) ScannableQuery
type ScannableQueryBuild ¶
type ScannableQueryBuild func(q *ent.EventQuery, qs ...QueryEvent) ScannableQuery
type SessionManager ¶
type SessionManager interface {
// contains filtered or unexported methods
}
type SessionReader ¶
type SessionReporter ¶
type SessionReporter interface { SessionReader }
type SessionWriter ¶
type SiteStats ¶
type SiteStats struct { New bool `db:"-" json:"-" ` SiteID int64 `db:"site_id" json:"-"` Visitors int64 `db:"visitors"` Pageviews int64 `db:"pageviews"` Sessions int64 `db:"sessions"` BounceRate float64 `db:"bounce_rate"` AvgDuration float64 `db:"avg_duration"` KnownDurations int64 `db:"known_durations" json:",omitempty"` Date time.Time `db:"ts" json:",omitempty"` }
func (*SiteStats) FormattedDuration ¶
type UpdateActionEdge ¶
type UpdateActionEdge func(*ent.ActionUpdate)
type UpdateEventEdge ¶
type UpdateEventEdge func(c *ent.EventUpdate)
type User ¶
type User struct { ID string `json:"id"` Anonymous bool `json:"anonymous"` Name string `json:"name"` Title string `json:"title"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Username string `json:"username"` Age int `json:"age"` Birthday time.Time `json:"birthday"` Gender string `json:"gender"` Phone string `json:"phone"` Website string `json:"website"` Extra map[string]interface{} `json:"extra"` }
type UserManager ¶
type UserManager interface {
// contains filtered or unexported methods
}
type UserReader ¶
type UserReporter ¶
type UserReporter interface { UserReader }
Click to show internal directories.
Click to hide internal directories.