Versions in this module Expand all Collapse all v1 v1.2.1 Nov 30, 2018 Changes in this version type Params + Offset int64 v1.2.0 Nov 20, 2018 Changes in this version + func HandleError(w http.ResponseWriter, r *http.Request, err error) + func HandlerFunc(fn Handler) http.HandlerFunc + func NotFoundHandler(box *packr.Box) http.Handler + type API struct + func New(db datastore.Datastore, secret string) *API + func (api *API) Authorize(next http.Handler) http.Handler + func (api *API) CreateSession(w http.ResponseWriter, r *http.Request) error + func (api *API) DeleteSession(w http.ResponseWriter, r *http.Request) error + func (api *API) DeleteSiteHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetAggregatedPageStatsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetAggregatedPageStatsPageviewsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetAggregatedReferrerStatsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetAggregatedReferrerStatsPageviewsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetAggregatedSiteStatsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetSession(w http.ResponseWriter, r *http.Request) error + func (api *API) GetSiteStatsHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetSiteStatsRealtimeHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) GetSitesHandler(w http.ResponseWriter, r *http.Request) error + func (api *API) Health(w http.ResponseWriter, _ *http.Request) error + func (api *API) Routes() *mux.Router + func (api *API) SaveSiteHandler(w http.ResponseWriter, r *http.Request) error + type Collector struct + Pageviews chan *models.Pageview + Store datastore.Datastore + func NewCollector(store datastore.Datastore) *Collector + func (c *Collector) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Handler func(w http.ResponseWriter, r *http.Request) error + func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Params struct + EndDate time.Time + Limit int64 + SiteID int64 + StartDate time.Time + func GetRequestParams(r *http.Request) *Params