So. Much. Work.
parent: tbd commit: b05f964
1 | use ; |
2 | |
3 | use Error; |
4 | use ; |
5 | use |
6 | , | PluginInitializationState
7 | , |
8 | HostVTable, InitializationVTable, |
9 | ; |
10 | use PluginStackBuilder; |
11 | use |
12 | create_issue_request, edit_issue_request, issue_get_setting_contents, issue_get_setting_name, |
13 | issue_post_comment_request, issue_set_setting_contents, issue_set_setting_name, |
14 | issue_value_author, issue_value_comment_count, issue_value_creation_date, query_issues_request, |
15 | ; |
16 | use ; |
17 | use ; |
18 | use PgPool; |
19 | use ; |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | /// An issue, defined by the repository which owns it and its index. |
28 | /// |
29 | /// # Textual Format |
30 | /// An issue's textual format is defined as: |
31 | /// |
32 | /// `@{index: u32}:{repository: Repository}` |
33 | |
34 | |
35 | pub repository: Repository, |
36 | pub id: u32, |
37 | |
38 | |
39 | |
40 | |
41 | f.write_str |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | "issue" |
48 | |
49 | |
50 | |
51 | self.repository.home_uri |
52 | |
53 | |
54 | |
55 | Ok |
56 | |
57 | |
58 | |
59 | |
60 | type Err = IssueParseError; |
61 | |
62 | |
63 | let = s.split_once .ok_or_else?; |
64 | |
65 | let id: u32 = index.parse .map_err?; |
66 | let repository = from_str .map_err?; |
67 | |
68 | Ok |
69 | |
70 | |
71 | |
72 | |
73 | |
74 | ; |
75 | |
76 | static INIT_VTABLE: = new; |
77 | |
78 | |
79 | pub extern "C" |
80 | const PLUGIN_NAME: &str = "Giterated [Issues]"; |
81 | const PLUGIN_VERSION: &str = "0.1.0"; |
82 | |
83 | FFIPluginMeta |
84 | name: PLUGIN_NAME.as_ptr, |
85 | name_len: PLUGIN_NAME.len, |
86 | version: PLUGIN_VERSION.as_ptr, |
87 | version_len: PLUGIN_VERSION.len, |
88 | |
89 | |
90 | |
91 | |
92 | pub extern "C" |
93 | println!; |
94 | |
95 | |
96 | |
97 | pub extern "C" |
98 | INIT_VTABLE.set .unwrap; |
99 | println!; |
100 | |
101 | |
102 | |
103 | pub extern "C" |
104 | // tracing_subscriber::fmt() |
105 | // .pretty() |
106 | // .with_thread_names(true) |
107 | // .with_max_level(Level::TRACE) |
108 | // .init(); |
109 | |
110 | PluginState |
111 | inner: Box into_raw, |
112 | |
113 | |
114 | |
115 | |
116 | pub extern "C" |
117 | state: *mut PluginInitializationState, |
118 | *mut PluginInitializationState |
119 | // let _guard: tracing::span::EnteredSpan = trace_span!("initialize_registration").entered(); |
120 | let init_vtable = INIT_VTABLE.get .unwrap; |
121 | |
122 | let plugin_state = ; |
123 | |
124 | let mut builder = new; |
125 | |
126 | builder.; |
127 | |
128 | builder |
129 | .object_setting |
130 | .object_setting; |
131 | |
132 | builder.; |
133 | |
134 | builder |
135 | .value |
136 | .value |
137 | .value |
138 | .value; |
139 | |
140 | builder |
141 | .operation_handler |
142 | .operation_handler |
143 | .operation_handler |
144 | .operation_handler; |
145 | |
146 | state |
147 | |
148 | |
149 | |
150 | |
151 | pub pool: PgPool, |
152 | |
153 |