part of the base for the payload structures

This commit is contained in:
shockrahwow 2019-11-04 12:18:14 -08:00
parent 8c9d9e3379
commit adb4697a17
4 changed files with 32 additions and 0 deletions

View File

@ -8,3 +8,8 @@ edition = "2018"
[dependencies]
rocket = "0.4.2"
[dependencies.rocket_contrib]
version = "0.4.2"
default-features = false
features = ["json"]

0
server/src/payload.rs Normal file
View File

View File

@ -0,0 +1,15 @@
#[derive(serialize)]
struct TextMessage {
// Not all of these fields are going to necessarily be filled
// More specifically the server field
body: String,
client: Client,
date: String,
server: ServerTag,
}
#[derive(serialize)]
struct MessageChunk {
messages: Vector<TextMessage>,
channel: Channel,
}

View File

@ -0,0 +1,12 @@
use std::vec::{Vector};
#[derive(serialize)]
struct GETTextChannel {
// only 100 messages per channel that we ask for
messages: MessageChunk,
}
struct Server {
domain: String, // Unique identifier for us
name: String, // Custom display name for the meme
}