Commit Graph

43 Commits

Author SHA1 Message Date
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
dbr
a4b67d9f4e Remove unused error variant 2021-09-04 13:29:03 +10:00
dbr/Ben
477bf9e328 Tweaks from code review
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
2021-09-04 12:05:30 +09:30
dbr
86deed3197 Remove unused Transaction from Txn
Also note about why StorageTxn isn't implemented
2021-06-16 11:22:17 +10:00
dbr
75f0447c7b Fix empty-dir problem with server also, and add tests 2021-06-15 22:09:54 +10:00
dbr
c3bc93f631 Clipplease 2021-06-15 22:02:32 +10:00
dbr
7c665c9a77 Clippy things 2021-05-28 20:41:03 +10:00
dbr
0f6323e2de Unused 2021-05-28 20:35:57 +10:00
dbr
aa2340965e Merge branch 'main' into sqlstore 2021-05-28 12:17:09 +10:00
dbr
baa6b59e39 Remove KvStorage 2021-05-28 12:10:18 +10:00
dbr
98f2ab51cb Functional sqlite backend
..but not too efficient, creating a new connection pretty much per-query
2021-05-28 12:09:36 +10:00
dbr
991b29da6c WIP 2021-05-21 15:52:07 +10: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
dbr
027225d2a3 More WIP.
Workaround for !Send SQLite causing problems as each get_txn creates a new transaction
2021-05-08 22:09:48 +10:00
dbr
7ff54ed0de WIP. Open new connection for each transaction as workaround 2021-05-07 22:24:55 +10:00
dbr
60ff0a8d11 Very WIP (i.e broken) start of SQLite storage in server 2021-04-29 16:00:22 +10:00
Dustin J. Mitchell
c8d6619d71 Replace tempfile with tempdir 2021-04-16 19:29:27 -04:00
Dustin J. Mitchell
fdeadfd981 Fix upper_case_acronyms lint 2021-03-29 13:26:02 +00:00
dbr
c04ece0e90 Fix one actual clippy lint: remove an unnecessary clone 2021-03-25 18:21:18 +11:00
dbr
4d9755c43b Replace 'failure' crate with anyhow+thiserror
Closes #148
2021-03-25 16:33:35 +11: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
e555af8895 add request logging 2020-12-28 00:25:26 +00:00
Dustin J. Mitchell
8989b0d2e3 Fix clippy warnings and make them all errors 2020-12-24 17:39:49 +00:00
Dustin J. Mitchell
81cee8d375 use CARGO_PKG_VERSION for version 2020-11-29 20:35:25 -05:00
Dustin J. Mitchell
8f361c28b7 remove unnecessary warning suppression 2020-11-29 20:34:43 -05:00
Dustin J. Mitchell
0a1ee470f7 use log and env_logger, and add some logging around sync 2020-11-29 18:18:28 -05:00
Dustin J. Mitchell
786d5b6a17 Implement actual on-disk storage for sync-server. 2020-11-29 17:41:28 -05:00
Dustin J. Mitchell
42d988d601 fix clippy warnings 2020-11-29 14:05:51 -05: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
2dae271851 build an in-memory sync server implementation 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
Dustin J. Mitchell
ca70d2c914 add cargo clippy to CI 2020-11-24 13:02:14 -05:00
Dustin J. Mitchell
779a331003 reorganize into separate crates
- taskchampion -- core implementation of a replica
 - taskchampion-cli -- command-line interface
 - taskchampion-sync-server -- server implementation (not much yet!)
2020-11-23 14:27:47 -05:00