summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-04 00:49:49 -0700
committerBryan Newbold <bnewbold@robocracy.org>2022-11-04 00:49:49 -0700
commit6c5c1e84b3540e3a4da81334f34b4e53cc818f4d (patch)
tree140cd3963067c2e529dbee0fc3d2869adb9204e4 /adenosine-pds/src/models.rs
parented47a0bc0d1d6692c7c365bf33a69d8017129f96 (diff)
downloadadenosine-6c5c1e84b3540e3a4da81334f34b4e53cc818f4d.tar.gz
adenosine-6c5c1e84b3540e3a4da81334f34b4e53cc818f4d.zip
pds: more progress
Diffstat (limited to 'adenosine-pds/src/models.rs')
-rw-r--r--adenosine-pds/src/models.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/adenosine-pds/src/models.rs b/adenosine-pds/src/models.rs
index 8f855c5..9da6104 100644
--- a/adenosine-pds/src/models.rs
+++ b/adenosine-pds/src/models.rs
@@ -1,6 +1,23 @@
use serde;
#[allow(non_snake_case)]
+#[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)]
+pub struct AccountRequest {
+ pub email: String,
+ pub username: String,
+ pub password: String,
+ pub inviteCode: Option<String>,
+ pub recoveryKey: Option<String>,
+}
+
+#[allow(non_snake_case)]
+#[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)]
+pub struct SessionRequest {
+ pub username: String,
+ pub password: String,
+}
+
+#[allow(non_snake_case)]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct AtpSession {
pub did: String,
@@ -8,3 +25,13 @@ pub struct AtpSession {
pub accessJwt: String,
pub refreshJwt: String,
}
+
+#[allow(non_snake_case)]
+#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
+pub struct RepoDescribe {
+ pub name: String,
+ pub did: String,
+ pub didDoc: serde_json::Value,
+ pub collections: Vec<String>,
+ pub nameIsCorrect: bool,
+}