Closes #4
This commit is contained in:
parent
17283a9d9b
commit
3f50c7654c
4 changed files with 83 additions and 12 deletions
src/config
|
@ -5,7 +5,7 @@ use serde_derive::{Deserialize, Serialize};
|
|||
|
||||
macro_rules! pub_struct {
|
||||
($name:ident {$($field:ident: $t:ty,)*}) => {
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
#[derive(Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub(crate) struct $name {
|
||||
$(pub(crate) $field: $t), *
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ impl Secrets {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
#[derive(Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub(crate) struct LemmyLogin {
|
||||
pub(crate) username: String,
|
||||
password: String
|
||||
|
@ -49,7 +49,7 @@ impl LemmyLogin {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
#[derive(Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub(crate) struct RedditLogin {
|
||||
pub(crate) app_id: String,
|
||||
app_secret: String,
|
||||
|
@ -94,7 +94,7 @@ pub_struct!(FeedCommunities {
|
|||
volume: LemmyCommunities,
|
||||
});
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
#[derive(Serialize, Deserialize, Clone, PartialEq, strum_macros::Display)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub(crate) enum LemmyCommunities {
|
||||
aobwebnovel,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue