Dustin J. Mitchell
4d19ca7bdb
add server-side config --snapshot-{days,versions}
2021-10-10 01:28:05 +00:00
Dustin J. Mitchell
74aee49107
Merge pull request #297 from djmitche/versionid-nil
...
Replace NO_VERSION_ID with NIL_VERSION_ID
2021-10-09 21:14:43 -04:00
Dustin J. Mitchell
aaac1c3356
Use App::configure to set up actix
...
This avoids the need for the messy cache-control-header macro.
Otherwise, it has no effect.
2021-10-09 18:07:25 -04:00
Dustin J. Mitchell
536b88c8f4
Replace NO_VERSION_ID with NIL_VERSION_ID
...
The docs refer to this as the "nil version ID" so let's do the same.
This started out more ambitiously, to change this to `VersionId::NIL`,
but that required making VersionId a newtype and all of the implicit
conversions from VersionId to Uuid would have to be explicit. That
didn't seem wortht the trouble.
2021-10-09 17:59:09 -04:00
Dustin J. Mitchell
53d1f8dbc2
update get_child_version to distinguish gone and not-found
2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
bcef6bf392
remove redundant {..}
2021-10-01 22:18:24 -04:00
Dustin J. Mitchell
a143660124
Switch to pretty_assertions
2021-10-02 01:08:26 +00:00
Dustin J. Mitchell
217f3bf28a
Add cache-control headers to API responses
2021-09-15 22:32:35 +00:00
Dustin J. Mitchell
ebcf9527dc
refactor sync-server into a lib crate with a binary
2021-09-12 21:30:04 +00:00
Dustin J. Mitchell
373cef9d33
[breaking] Include /v1/ in the sync-server paths
...
This is an incompatible change to the sync-server protocol.
2021-05-14 12:51:24 -04:00
Dustin J. Mitchell
31378cb8d4
Include client key in a header, not the URL
...
Since this value is used both for identification and authentication, it
shouldn't be in the URL where it might be logged or otherwise
discovered.
2020-12-28 23:08:42 +00:00
Dustin J. Mitchell
92d629522b
rename client id -> client key
2020-12-28 21:32:59 +00:00
Dustin J. Mitchell
97a8a87c24
Merge pull request #64 from djmitche/issue57
...
Add RemoteServer to the taskchampion crate
2020-11-27 20:23:39 -05:00
Dustin J. Mitchell
2a37f090a5
Add RemoteServer to the taskchampion crate
2020-11-27 20:15:17 -05:00
Dustin J. Mitchell
3092a6bb7f
do not require taskchampion from sync-server
2020-11-27 20:08:54 -05:00
Dustin J. Mitchell
5b1b911bf7
Move add_version and get_child_version to server module
...
..and add some tests specifically for those functions, in the absence of
all the HTTP nonsense.
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
fb22b9686f
refactor sync server to use pluggable storage
...
..with a fixed implementation of the replica / server protocol logic.
There isn't much logic yet, and there's a lot of boilerplate to take
care of, so this looks a little lopsided, but I'm confident this is the
right structure for this code's future.
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
7472749fee
add tests for API methods
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
2457d8bc43
move types in crate::types to crate::server
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
e84871931f
Refactor HTTP implementation of API methods
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
a5c06008b3
use a trait object for the server, for dynamic dispatch
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
087333a227
refactor sync server into modules
2020-11-26 19:59:49 -05:00