helic-0.1.0.0: Clipboard Manager
Safe HaskellNone
LanguageHaskell2010

Helic.Net.Api

Description

HTTP API of the Daemon, Internal

Synopsis

Documentation

type Api = "event" :> (Get '[JSON] (Seq Event) :<|> (ReqBody '[JSON] Event :> PostCreated '[JSON] ())) Source #

The Servant API of the daemon, providing endpoints for getting all events and creating one.

receiveEvent :: Members [Events resource Event, Reader InstanceName] r => Event -> Sem r () Source #

Publish a received event unless it was sent by the network agent of this instance.

server :: Members [Events resource Event, AtomicState (Seq Event), Reader InstanceName] r => ServerT Api (Sem r) Source #

The server implementation.

defaultPort :: Int Source #

The default port, 9500.