Documentation ¶
Index ¶
- Constants
- type Aggregate
- type DaySnapshot
- type Page
- type PlausibletTime
- type Results
- type SiteTokenPair
- type Source
- type StatsRepo
- type StatsRepoResty
- func (r *StatsRepoResty) LoadAggregate(period string) (Aggregate, error)
- func (r *StatsRepoResty) LoadRealtime() (int, error)
- func (r *StatsRepoResty) LoadTimeSeries(period string) ([]DaySnapshot, error)
- func (r *StatsRepoResty) LoadTopPages(period string) ([]Page, error)
- func (r *StatsRepoResty) LoadTopSources(period string) ([]Source, error)
- type Valuer
Constants ¶
View Source
const ( PropertyPeriodSevenDay = "7d" PropertyPeriodThirtyDay = "30d" PropertyPeriodSixMo = "6mo" PropertyPeriodTwelveMo = "12mo" PropertyPeriodMonth = "month" PropertyPeridoDay = "day" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaySnapshot ¶
type DaySnapshot struct { Date PlausibletTime `json:"date"` Visitors int `json:"visitors"` }
type PlausibletTime ¶
func (PlausibletTime) MarshalJSON ¶
func (t PlausibletTime) MarshalJSON() ([]byte, error)
func (*PlausibletTime) UnmarshalJSON ¶
func (t *PlausibletTime) UnmarshalJSON(b []byte) error
type SiteTokenPair ¶
func NewSiteTokenPair ¶
func NewSiteTokenPair(siteID, token string) SiteTokenPair
type StatsRepo ¶
type StatsRepo interface { LoadTopSources(period string) ([]Source, error) LoadTopPages(period string) ([]Page, error) LoadTimeSeries(period string) ([]DaySnapshot, error) LoadAggregate(period string) (Aggregate, error) LoadRealtime() (int, error) }
func NewStatsRepoResty ¶
func NewStatsRepoResty(pair SiteTokenPair) StatsRepo
type StatsRepoResty ¶
type StatsRepoResty struct {
// contains filtered or unexported fields
}
func (*StatsRepoResty) LoadAggregate ¶
func (r *StatsRepoResty) LoadAggregate(period string) (Aggregate, error)
func (*StatsRepoResty) LoadRealtime ¶
func (r *StatsRepoResty) LoadRealtime() (int, error)
func (*StatsRepoResty) LoadTimeSeries ¶
func (r *StatsRepoResty) LoadTimeSeries(period string) ([]DaySnapshot, error)
func (*StatsRepoResty) LoadTopPages ¶
func (r *StatsRepoResty) LoadTopPages(period string) ([]Page, error)
func (*StatsRepoResty) LoadTopSources ¶
func (r *StatsRepoResty) LoadTopSources(period string) ([]Source, error)
Click to show internal directories.
Click to hide internal directories.