eventhttphandler

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

EventHandler is a http.Handler that servers the input events over http via wabsockets

func NewEventHandler

func NewEventHandler(inputEvents *pubsub.PubSub) *EventHandler

NewEventHandler creates an event habdler that subscribes from the inputEvents

func (*EventHandler) ServeHTTP

func (h *EventHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler

type GestureHandler

type GestureHandler struct {
	// contains filtered or unexported fields
}

GestureHandler is a http.Handler that detect touch gestures

func NewGestureHandler

func NewGestureHandler(inputEvents *pubsub.PubSub) *GestureHandler

NewGestureHandler creates an event habdler that subscribes from the inputEvents

func (*GestureHandler) ServeHTTP

func (h *GestureHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler

type SwipeDirection

type SwipeDirection string
const (
	SwipeLeft  SwipeDirection = "Swipe Left"
	SwipeRight SwipeDirection = "Swipe Right"
)

Jump to

Keyboard shortcuts

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