commit b13724535f01baec17ea38710a430ab51d703f45
parent 1bcc17bd5f823044936021baf3dace23bd4e0239
Author: Jackson G. Kaindume <seestem@merely.tech>
Date: Sun, 21 Aug 2022 14:32:50 +0200
add docs for accounts
Diffstat:
1 file changed, 37 insertions(+), 0 deletions(-)
diff --git a/doc/accounts.md b/doc/accounts.md
@@ -0,0 +1,37 @@
+# Accounts
+
+```rust
+pub struct Account {
+ /// The username of the user, also used as an unique identifier
+ pub username: String,
+ /// The password of the user
+ pub password: String,
+ /// The email address the user
+ pub email: Option<String>,
+}
+```
+
+## Mandatory Fields
+
+An `Account` contains two mandatory fields.
+
+### `username`
+
+Used as a user identifier.
+
+- cannot start with a underscore (_)
+- can only contain letters, numbers, and one underscore
+- can have only one (_) underscore
+
+
+### `password`
+
+Users master key.
+
+- should be at least 10 characters long
+
+## Optional Fields
+
+### `email`
+
+The email address the user.