Documentation ¶
Index ¶
- 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
- 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
- type Handler
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleError ¶
func HandleError(w http.ResponseWriter, r *http.Request, err error)
HandleError handles errors
func HandlerFunc ¶
func HandlerFunc(fn Handler) http.HandlerFunc
HandlerFunc takes a custom Handler func and converts it to http.HandlerFunc
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateSession ¶
URL: POST /api/session
func (*API) DeleteSession ¶
URL: DELETE /api/session
func (*API) DeleteSiteHandler ¶
DELETE /api/sites/{id}
func (*API) GetAggregatedPageStatsHandler ¶
URL: /api/sites/{id:[0-9]+}/stats/pages/agg
func (*API) GetAggregatedPageStatsPageviewsHandler ¶
func (*API) GetAggregatedReferrerStatsHandler ¶
func (*API) GetAggregatedReferrerStatsPageviewsHandler ¶
func (*API) GetAggregatedSiteStatsHandler ¶
URL: /api/sites/{id:[0-9]+}/stats/site/agg
func (*API) GetSession ¶
GET /api/session
func (*API) GetSiteStatsHandler ¶
URL: /api/sites/{id:[0-9]+}/stats/site
func (*API) GetSiteStatsRealtimeHandler ¶
URL: /api/sites/{id:[0-9]+}/stats/site/realtime
func (*API) GetSitesHandler ¶
GET /api/sites
func (*API) SaveSiteHandler ¶
POST /api/sites POST /api/sites/{id}
type Collector ¶
type Collector struct { Store datastore.Datastore Pageviews chan *models.Pageview // contains filtered or unexported fields }
func NewCollector ¶
type Handler ¶
type Handler func(w http.ResponseWriter, r *http.Request) error
Handler is our custom HTTP handler with error returns
type Params ¶
Params defines the commonly used API parameters
func GetRequestParams ¶
GetRequestParams parses the query parameters and returns commonly used API parameters, with defaults
Click to show internal directories.
Click to hide internal directories.