memcached

This commit is contained in:
2021-05-02 03:07:08 +02:00
parent 3f52f00da3
commit 6159e2b67f
5 changed files with 200 additions and 46 deletions

View File

@@ -7,14 +7,19 @@ pub struct Note {
pub contents: String,
pub password: bool,
pub views: Option<u8>,
pub expiration: Option<u16>,
pub expiration: Option<u64>,
}
#[derive(Serialize, Deserialize, Clone)]
pub struct PubNote {
pub struct NoteInfo {
pub password: bool,
}
#[derive(Serialize, Deserialize, Clone)]
pub struct NotePublic {
pub contents: String,
}
pub fn generate_id() -> String {
let mut id: [u8; 64] = [0; 64];
let sr = ring::rand::SystemRandom::new();