Commit Graph

129 Commits

Author SHA1 Message Date
Daniel Sockwell 5011abaf77 Add language and notification filters 2019-04-19 17:06:29 -04:00
Daniel Sockwell 4b39009556
Merge pull request #8 from tootsuite/fixup
Minor refactoring
2019-04-19 12:19:46 -04:00
Daniel Sockwell ff957bd407 Minor refactoring
Improved clarity, concision, and ergonomics of the codebase.
2019-04-19 12:16:03 -04:00
Daniel Sockwell 593a292af7
Merge pull request #7 from tootsuite/auth 2019-04-19 12:13:13 -04:00
Daniel Sockwell 6746514f9a Finish building out postgres auth 2019-04-18 19:02:29 -04:00
Daniel Sockwell debf01770e Complete header-based auth 2019-04-18 17:07:31 -04:00
Daniel Sockwell 13d9cf17f6 Connect to postgres for basic auth 2019-04-18 15:47:08 -04:00
Daniel Sockwell 8f320fc949 Merge branch 'logging'
Add Cargo.lock changes
2019-04-18 10:17:21 -04:00
Daniel Sockwell 65fded3eb1 Commit Cargo.lock
Cargo.lock should be tracked with version control for binaries but
I neglected to commit it in the previous commit.
2019-04-18 10:14:46 -04:00
Daniel Sockwell f929fdf138
Merge pull request #6 from tootsuite/logging
Add logging with `pretty_env_log`
2019-04-18 10:12:31 -04:00
Daniel Sockwell 9434260fa7 Add logging with `pretty_env_log`
This commit adds basic logging at both the `info` level (for establishing
a new stream) and at the `debug` level (for streaming JSON).
2019-04-18 10:10:01 -04:00
Daniel Sockwell f8565824fc
Merge pull request #4 from tootsuite/warp
Implement basic Server Sent Events with Warp
2019-04-18 08:52:14 -04:00
Daniel Sockwell 9fca39c746 Minor lints
Fix formatting/style points raised by Clippy and @sphinxc0re.
2019-04-16 08:21:19 -04:00
Daniel Sockwell 36f9d1d7c1 Add dependencies neccessary for SSE/Warp 2019-04-15 14:48:09 -04:00
Daniel Sockwell 23eaa4a270 Implement basic Server Sent Events with Warp
This commit rolls up several days of work that took place in a side repo
which was originally intended to be a test/proof-of-concept repo but
that grew into a full implementation.

This implementation switches to Warp as the framework for the primary
web server (in large part because Warp offers built-in support for
SSE and several other advantages).  This implementation relies on
a custom Redis interface built on Tokio (because the current Redis
Rust crate does not support asnyc PubSub).  Using a custom interface
should also be faster, since it does not contain logic for anything
other than pubsub—which is all we need.

Finally, I note that the SSE support is currently as feature-complete
as it is possible to be without having yet added the Postgress interface
this means that all of the endpoints are present and are accessible
on localhost.  However, none of the endpoints have authentication yet,
and the endpoints that should provide user-specific data (e.g.,
`/api/v1/streaming/user`) are currently hard-coded to provide data for
user 1 (the admin).  Other than those limitations, however, the SSE
implementation is feature complete.
2019-04-15 14:22:44 -04:00
Daniel Sockwell 36c2734c86
Merge pull request #1 from tootsuite/setup-housekeeping
Initial setup/housekeeping
2019-03-05 09:28:27 -05:00
Daniel Sockwell 4842475b18 Rustfmt all code
Revise all code to comply with rustfmt
2019-03-05 09:23:44 -05:00
Daniel Sockwell fffd3b6b4d Improve logging
Add more descriptive messages for the logging triggered by the
websocket server.
2019-03-05 09:19:38 -05:00
Daniel Sockwell 7a0b11e240 Add descriptive success messages
Improves the success messages from "OMG! It worked!" to a descriptive
string identifying which function was invoked.
2019-03-05 08:49:35 -05:00
Daniel Sockwell 083130682f Remove custom rustfmt rule
This commit removes the custom rustfmt rule (which specified a shorter
line length) so that the project conforms to idiomatic Rust formatting
standards.
2019-03-05 08:23:24 -05:00
Julian Laubstein bfec0327d6 Use redis environment for connection 2019-02-19 22:57:01 +01:00
Julian Laubstein dfafec963b Added structures for env variables 2019-02-19 20:29:32 +01:00
Julian Laubstein dcc0283078 Fixed cors and added health endpoint 2019-02-15 22:59:21 +01:00
Julian Laubstein 88492aac36 Lots of basic stuff 2019-02-15 10:22:35 +01:00
Julian Laubstein cd30353b30 Removed unused import 2019-02-11 21:02:22 +01:00
Julian Laubstein 524935c441 Added all routes as mock 2019-02-11 21:00:07 +01:00
Julian Laubstein 1339784112 Added all endpoints 2019-02-11 18:58:51 +01:00
Julian Laubstein 7caa714891 Initial project files 2019-02-11 09:45:14 +01:00
Julian Laubstein cb0d9a5517
Initial commit 2019-02-08 10:35:26 +01:00