Documentation ¶
Index ¶
- type ArticleContent
- type ArticleStats
- type LoyaltyStats
- type MobileSeries
- type PlatformStats
- type QuickStats
- type QuickStatsResp
- type QuickStatsRespStats
- type QuickStatsSnapshot
- type Recent
- type RecentResp
- type RecentSnapshot
- type Referrers
- type ReferrersSnapshot
- type Snapshot
- type TopArticle
- type TopGeo
- type TopGeoResp
- type TopGeoSnapshot
- type TopPages
- type TopPagesSnapshot
- type TopPagesSnapshotDocument
- type Traffic
- type TrafficSeriesIn
- type TrafficSeriesSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleContent ¶
type ArticleContent struct { Path string `json:"path"` Sections []string `json:"sections"` Stats *ArticleStats `json: "stats"` Title string `json:"title"` Authors []string `json:"authors"` }
type ArticleStats ¶
type ArticleStats struct { Visits int `json:"visits"` Loyalty LoyaltyStats `json:"loyalty"` }
type LoyaltyStats ¶
type MobileSeries ¶
type MobileSeries struct { Id bson.ObjectId `bson:"_id,omitempty"` Date time.Time `bson:"date"` StartTime time.Time `bson:"startTime"` Series []int `bson:"series"` }
func (*MobileSeries) AddSeriesValue ¶
func (m *MobileSeries) AddSeriesValue(value int)
func (MobileSeries) Save ¶
func (m MobileSeries) Save(session *mgo.Session)
type PlatformStats ¶
type QuickStats ¶
type QuickStats struct { Source string `bson:source` Visits int `bson:"visits"` Links int `bson:"links"` Direct int `bson:"direct"` Search int `bson:"search"` Social int `bson:"social"` Recirc int `bson:"recirc"` Article int `bson:"article"` PlatformEngaged PlatformStats `json:"platform_engaged"bson:"platform_engaged"` Loyalty LoyaltyStats `bson:"loyalty"` }
type QuickStatsResp ¶
type QuickStatsResp struct {
Data *QuickStatsRespStats `bson:"data"`
}
type QuickStatsRespStats ¶
type QuickStatsRespStats struct {
Stats *QuickStats `bson:"stats"`
}
type QuickStatsSnapshot ¶
type QuickStatsSnapshot struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Stats []*QuickStats `bson:"stats"` }
func (QuickStatsSnapshot) Save ¶
func (q QuickStatsSnapshot) Save(session *mgo.Session)
Snapshot interface
type RecentResp ¶
type RecentSnapshot ¶
type RecentSnapshot struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Recents []*RecentResp `bson:"recents"` }
func (RecentSnapshot) Save ¶
func (r RecentSnapshot) Save(session *mgo.Session)
type ReferrersSnapshot ¶
type ReferrersSnapshot struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Referrers []*Referrers `bson:"referrers"` }
func (ReferrersSnapshot) Save ¶
func (r ReferrersSnapshot) Save(session *mgo.Session)
type TopArticle ¶
type TopArticle struct { Id bson.ObjectId `bson:"_id,omitempty"` ArticleId int `bson:"article_id"` Headline string `bson:"headline"` Url string `bson:"url"` Authors []string `bson:"authors"` Source string `bson:"source"` Sections []string `bson:"sections"` Visits int `bson:"visits"` Loyalty LoyaltyStats `json:"loyalty"` }
type TopGeoResp ¶
type TopGeoResp struct {
Geo TopGeo `bson:"geo:"`
}
type TopGeoSnapshot ¶
type TopGeoSnapshot struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Cities []*TopGeo `bson:"cities"` }
func (TopGeoSnapshot) Save ¶
func (t TopGeoSnapshot) Save(session *mgo.Session)
type TopPages ¶
type TopPages struct { Site string Pages []*ArticleContent `json:"pages"` }
* DATA COMING IN
type TopPagesSnapshot ¶
type TopPagesSnapshot struct { Document TopPagesSnapshotDocument Articles []*m.Article }
Because toppages saves articles in addition to a Snapshot, need a second storage container for the snapshot alone
func (TopPagesSnapshot) Save ¶
func (t TopPagesSnapshot) Save(session *mgo.Session)
type TopPagesSnapshotDocument ¶
type TopPagesSnapshotDocument struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Articles []*TopArticle `bson:"articles"` }
* DATA GOING OUT
type TrafficSeriesIn ¶
type TrafficSeriesIn struct { Series *struct { People []int `json:"people"` } `json:"series"` }
func (*TrafficSeriesIn) Visits ¶
func (his *TrafficSeriesIn) Visits() []int
type TrafficSeriesSnapshot ¶
type TrafficSeriesSnapshot struct { Id bson.ObjectId `bson:"_id,omitempty"` Created_at time.Time `bson:"created_at"` Start int `bson:"start"` End int `bson:"end"` Frequency int `bson:"frequency"` Traffic []*Traffic `bson:"sites"` }
func (TrafficSeriesSnapshot) Save ¶
func (h TrafficSeriesSnapshot) Save(session *mgo.Session)
Click to show internal directories.
Click to hide internal directories.