diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-12 01:40:46 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-12 01:40:46 -0400 |
commit | e45e35125e623a8fb683a28f55ad96d42d01a1d0 (patch) | |
tree | ffdf2130cb2197bc3e0769b732dfb4fc933b4618 /src/protocol.rs | |
parent | 14b647f9d6dbb76960e6cad6f51531ea6a8dbf3a (diff) | |
download | rbw-e45e35125e623a8fb683a28f55ad96d42d01a1d0.tar.gz rbw-e45e35125e623a8fb683a28f55ad96d42d01a1d0.zip |
rename some stuff to be less confusing
Diffstat (limited to 'src/protocol.rs')
-rw-r--r-- | src/protocol.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/protocol.rs b/src/protocol.rs new file mode 100644 index 0000000..8d7cd69 --- /dev/null +++ b/src/protocol.rs @@ -0,0 +1,27 @@ +#[derive(serde::Serialize, serde::Deserialize, Debug)] +pub struct Request { + pub tty: Option<String>, + pub action: Action, +} + +#[derive(serde::Serialize, serde::Deserialize, Debug)] +#[serde(tag = "type")] +pub enum Action { + Login, + Unlock, + Lock, + Sync, + Decrypt { cipherstring: String }, + // add + // update + // remove + Quit, +} + +#[derive(serde::Serialize, serde::Deserialize, Debug)] +#[serde(tag = "type")] +pub enum Response { + Ack, + Error { error: String }, + Decrypt { plaintext: String }, +} |