JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fucking whatever there you go

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨57c2ca5

⁨plugins/giterated-issues/src/value.rs⁩ - ⁨983⁩ bytes
Raw
1 use giterated_models::{user::User, value::GiteratedObjectValue};
2 use serde::{Deserialize, Serialize};
3
4 use crate::Issue;
5
6 #[derive(Clone, Debug, Serialize, Deserialize)]
7 pub struct CreationDate(pub String);
8
9 impl GiteratedObjectValue for CreationDate {
10 type Object = Issue;
11
12 fn value_name() -> &'static str {
13 "creation_date"
14 }
15 }
16
17 #[derive(Clone, Debug, Serialize, Deserialize)]
18 pub struct CommentCount(pub u32);
19
20 impl GiteratedObjectValue for CommentCount {
21 type Object = Issue;
22
23 fn value_name() -> &'static str {
24 "comment_count"
25 }
26 }
27
28 #[derive(Clone, Debug, Serialize, Deserialize)]
29 pub struct Name(pub String);
30
31 impl GiteratedObjectValue for Name {
32 type Object = Issue;
33
34 fn value_name() -> &'static str {
35 "name"
36 }
37 }
38
39 #[derive(Clone, Debug, Serialize, Deserialize)]
40 pub struct Author(pub User);
41
42 impl GiteratedObjectValue for Author {
43 type Object = Issue;
44
45 fn value_name() -> &'static str {
46 "owner"
47 }
48 }
49