handlers

package
v0.0.0-...-f8be1bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(next http.Handler) http.Handler

AuthMiddleware is making sure the call is properly authenticated before sending the request to the handlers

func Identify

func Identify(w http.ResponseWriter, r *http.Request)

Identify is taking an identification to send it to the enabled integrations

func Page

func Page(w http.ResponseWriter, r *http.Request)

Page is taking a pageview to send it to the enabled integrations

func Track

func Track(w http.ResponseWriter, r *http.Request)

Track is taking an event to send it to the enabled integrations

Types

type FakeIntegration

type FakeIntegration struct {
}

FakeIntegration is the base of a fake integration, used for testing.

func (FakeIntegration) Enabled

func (fi FakeIntegration) Enabled() bool

Enabled returns wether or not the integration is enabled/configured

func (FakeIntegration) Identify

func (fi FakeIntegration) Identify(identification integrations.Identification) error

Identify is responsible of forwarding the identify call to the integration

func (FakeIntegration) Page

func (fi FakeIntegration) Page(page integrations.Page) error

Page forwards the page-view data to the integration

func (FakeIntegration) Track

func (fi FakeIntegration) Track(event integrations.Event) error

Track forwards the event to the integration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL