mellon-web: A REST web service for Mellon controllers
The mellon-web
package wraps a mellon-core
controller in a REST
web service, making it possible to control physical access devices
from an HTTP client. The package includes both a WAI application
server, and native Haskell client bindings for the service.
Like the mellon-core
controller interface, the mellon-web
REST API
is quite simple. There are only 3 methods:
GET /time
returns the system time on the server. This is made available for diagnostic purposes, primarily to ensure the server has an accurate clock.GET /state
returns the controller's current state (eitherLocked
orUnlocked date
wheredate
is the UTC time at which the controller will automatically lock again).PUT /state
sets the controller's current state. Use this method to lock and unlock the controller.
For detailed documentation, the server includes a self-documenting Swagger spec.
Note that the mellon-web
server does not provide an authentication
mechanism! You should proxy it behind a secure, authenticating HTTPS
server such as Nginx.
[Skip to Readme]
Versions [faq] | 0.7.0.1, 0.7.0.3, 0.7.1.0, 0.7.1.1, 0.8.0.2, 0.8.0.3, 0.8.0.4, 0.8.0.5, 0.8.0.6, 0.8.0.7 |
---|---|
Change log | changelog.md |
Dependencies | aeson (>=0.11 && <1.3), aeson-pretty (==0.8.*), base (>=4.8 && <5), bytestring (==0.10.*), exceptions (>=0.8.0 && <1), fail (==4.9.*), hpio (>=0.8 && <1), http-client (>=0.4 && <0.6), http-client-tls (==0.3.*), http-types (>=0.9 && <0.13), lens (==4.*), lucid (==2.9.*), mellon-core, mellon-gpio, mellon-web, mtl (>=2.1.3 && <2.3), network, optparse-applicative (>=0.11.0 && <0.15), protolude (==0.2.*), semigroups (==0.18.*), servant (==0.13.*), servant-client (==0.13.*), servant-client-core (==0.13.*), servant-docs (>=0.10 && <0.12), servant-lucid (>=0.7 && <0.9), servant-server (==0.13.*), servant-swagger (==1.1.*), servant-swagger-ui (==0.2.*), swagger2 (>=2.1 && <2.3), text (==1.2.*), time (>=1.5 && <2), transformers (>=0.4.2 && <0.6), wai (==3.2.*), warp (==3.2.*) [details] |
License | BSD-3-Clause |
Copyright | Copyright (c) 2018, Quixoftic, LLC |
Author | Drew Hess <dhess-src@quixoftic.com> |
Maintainer | Drew Hess <dhess-src@quixoftic.com> |
Category | Web |
Home page | https://github.com/quixoftic/mellon#readme |
Bug tracker | https://github.com/quixoftic/mellon/issues |
Source repo | head: git clone https://github.com/quixoftic/mellon |
Uploaded | by dhess at 2018-04-03T23:12:13Z |
Distributions | NixOS:0.8.0.7 |
Executables | mock-mellon-server, mellon-schedule-unlock, gpio-mellon-server |
Downloads | 4721 total (7 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2018-04-14 [all 1 reports] |
Modules
[Index]
Flags
Name | Description | Default | Type |
---|---|---|---|
client-unlock-example | Build the unlock client example | Enabled | Manual |
enable-timing-sensitive-tests | Enable tests that are timing-sensitive (may fail on loaded machines like CI servers) | Disabled | Manual |
gpio-example | Build the GPIO server example | Enabled | Manual |
mock-example | Build the mock server example | Enabled | Manual |
test-doctests | Build doctests | Enabled | Manual |
test-hlint | Build hlint test | Disabled | Manual |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- mellon-web-0.8.0.7.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)