-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the server into three crates (#56)
This will make it easier to build variations on the server, or embed it into larger projects.
- Loading branch information
Showing
22 changed files
with
1,243 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,11 +62,24 @@ jobs: | |
override: true | ||
minimal: true | ||
|
||
- uses: actions-rs/[email protected] | ||
- name: taskchampion-sync-server | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: rustdoc | ||
args: -p taskchampion-sync-server --all-features -- -Z unstable-options --check -Dwarnings | ||
|
||
- name: taskchampion-sync-server-core | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: rustdoc | ||
args: -p taskchampion-sync-server-core --all-features -- -Z unstable-options --check -Dwarnings | ||
|
||
- name: taskchampion-sync-server-storage-sqlite | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: rustdoc | ||
args: -p taskchampion-sync-server-storage-sqlite --all-features -- -Z unstable-options --check -Dwarnings | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
name: "Formatting" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[package] | ||
name = "taskchampion-sync-server" | ||
version = "0.4.1" | ||
authors = ["Dustin J. Mitchell <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"core", | ||
"server", | ||
"sqlite", | ||
] | ||
|
||
[dependencies] | ||
[workspace.dependencies] | ||
uuid = { version = "^1.11.0", features = ["serde", "v4"] } | ||
actix-web = "^4.9.0" | ||
anyhow = "1.0" | ||
|
@@ -18,8 +19,6 @@ log = "^0.4.17" | |
env_logger = "^0.11.5" | ||
rusqlite = { version = "0.32", features = ["bundled"] } | ||
chrono = { version = "^0.4.38", features = ["serde"] } | ||
|
||
[dev-dependencies] | ||
actix-rt = "2" | ||
tempfile = "3" | ||
pretty_assertions = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "taskchampion-sync-server-core" | ||
version = "0.4.1" | ||
authors = ["Dustin J. Mitchell <[email protected]>"] | ||
edition = "2021" | ||
|
||
[dependencies] | ||
uuid.workspace = true | ||
anyhow.workspace = true | ||
log.workspace = true | ||
env_logger.workspace = true | ||
chrono.workspace = true | ||
|
||
[dev-dependencies] | ||
pretty_assertions.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# taskchampion-sync-server-core | ||
|
||
This crate implements the core logic of the taskchampion sync protocol. | ||
|
||
This should be considered a reference implementation, with [the protocol | ||
documentation](https://gothenburgbitfactory.org/taskchampion/sync-protocol.html). | ||
representing the authoritative definition of the protocol. Other | ||
implementations are encouraged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//! This crate implements the core logic of the taskchampion sync protocol. | ||
//! | ||
//! This should be considered a reference implementation, with [the protocol | ||
//! documentation](https://gothenburgbitfactory.org/taskchampion/sync-protocol.html). representing | ||
//! the authoritative definition of the protocol. Other implementations are encouraged. | ||
//! | ||
//! This crate uses an abstract storage backend. Note that this does not implement the | ||
//! HTTP-specific portions of the protocol, nor provide any storage implementations. | ||
//! | ||
//! ## API Methods | ||
//! | ||
//! The following API methods are implemented. These methods are documented in more detail in | ||
//! the protocol documentation. | ||
//! | ||
//! * [`add_version`] | ||
//! * [`get_child_version`] | ||
//! * [`add_snapshot`] | ||
//! * [`get_snapshot`] | ||
//! | ||
//! Each API method takes: | ||
//! | ||
//! * [`StorageTxn`] to access storage. Methods which modify storage will commit the transaction before returning. | ||
//! * [`ServerConfig`] providing basic configuration for the server's behavior. | ||
//! * `client_id` and a [`Client`] providing the client metadata. | ||
mod inmemory; | ||
mod server; | ||
mod storage; | ||
|
||
pub use inmemory::*; | ||
pub use server::*; | ||
pub use storage::*; |
Oops, something went wrong.