itsi-server 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,368 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "1.1.3"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "bindgen"
16
+ version = "0.69.5"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
19
+ dependencies = [
20
+ "bitflags",
21
+ "cexpr",
22
+ "clang-sys",
23
+ "itertools",
24
+ "lazy_static",
25
+ "lazycell",
26
+ "proc-macro2",
27
+ "quote",
28
+ "regex",
29
+ "rustc-hash",
30
+ "shlex",
31
+ "syn",
32
+ ]
33
+
34
+ [[package]]
35
+ name = "bitflags"
36
+ version = "2.8.0"
37
+ source = "registry+https://github.com/rust-lang/crates.io-index"
38
+ checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
39
+
40
+ [[package]]
41
+ name = "cexpr"
42
+ version = "0.6.0"
43
+ source = "registry+https://github.com/rust-lang/crates.io-index"
44
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
45
+ dependencies = [
46
+ "nom",
47
+ ]
48
+
49
+ [[package]]
50
+ name = "cfg-if"
51
+ version = "1.0.0"
52
+ source = "registry+https://github.com/rust-lang/crates.io-index"
53
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
54
+
55
+ [[package]]
56
+ name = "clang-sys"
57
+ version = "1.8.1"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
60
+ dependencies = [
61
+ "glob",
62
+ "libc",
63
+ "libloading",
64
+ ]
65
+
66
+ [[package]]
67
+ name = "either"
68
+ version = "1.14.0"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
71
+
72
+ [[package]]
73
+ name = "glob"
74
+ version = "0.3.2"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
77
+
78
+ [[package]]
79
+ name = "itertools"
80
+ version = "0.12.1"
81
+ source = "registry+https://github.com/rust-lang/crates.io-index"
82
+ checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
83
+ dependencies = [
84
+ "either",
85
+ ]
86
+
87
+ [[package]]
88
+ name = "itsi_error"
89
+ version = "0.1.0"
90
+ dependencies = [
91
+ "magnus",
92
+ "thiserror",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "lazy_static"
97
+ version = "1.5.0"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
100
+
101
+ [[package]]
102
+ name = "lazycell"
103
+ version = "1.3.0"
104
+ source = "registry+https://github.com/rust-lang/crates.io-index"
105
+ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
106
+
107
+ [[package]]
108
+ name = "libc"
109
+ version = "0.2.170"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
112
+
113
+ [[package]]
114
+ name = "libloading"
115
+ version = "0.8.6"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
118
+ dependencies = [
119
+ "cfg-if",
120
+ "windows-targets",
121
+ ]
122
+
123
+ [[package]]
124
+ name = "magnus"
125
+ version = "0.6.4"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "b1597ef40aa8c36be098249e82c9a20cf7199278ac1c1a1a995eeead6a184479"
128
+ dependencies = [
129
+ "magnus-macros",
130
+ "rb-sys",
131
+ "rb-sys-env",
132
+ "seq-macro",
133
+ ]
134
+
135
+ [[package]]
136
+ name = "magnus-macros"
137
+ version = "0.6.0"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
140
+ dependencies = [
141
+ "proc-macro2",
142
+ "quote",
143
+ "syn",
144
+ ]
145
+
146
+ [[package]]
147
+ name = "memchr"
148
+ version = "2.7.4"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
151
+
152
+ [[package]]
153
+ name = "minimal-lexical"
154
+ version = "0.2.1"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
157
+
158
+ [[package]]
159
+ name = "nom"
160
+ version = "7.1.3"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
163
+ dependencies = [
164
+ "memchr",
165
+ "minimal-lexical",
166
+ ]
167
+
168
+ [[package]]
169
+ name = "proc-macro2"
170
+ version = "1.0.93"
171
+ source = "registry+https://github.com/rust-lang/crates.io-index"
172
+ checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
173
+ dependencies = [
174
+ "unicode-ident",
175
+ ]
176
+
177
+ [[package]]
178
+ name = "quote"
179
+ version = "1.0.38"
180
+ source = "registry+https://github.com/rust-lang/crates.io-index"
181
+ checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
182
+ dependencies = [
183
+ "proc-macro2",
184
+ ]
185
+
186
+ [[package]]
187
+ name = "rb-sys"
188
+ version = "0.9.110"
189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
190
+ checksum = "56cf964f8e44115e50009921ea3d3791b6f74d1ae6d6ed37114fbe03a1cd7308"
191
+ dependencies = [
192
+ "rb-sys-build",
193
+ ]
194
+
195
+ [[package]]
196
+ name = "rb-sys-build"
197
+ version = "0.9.110"
198
+ source = "registry+https://github.com/rust-lang/crates.io-index"
199
+ checksum = "161480347f56473107d4135643b6b1909331eec61445e113b256708a28b691c5"
200
+ dependencies = [
201
+ "bindgen",
202
+ "lazy_static",
203
+ "proc-macro2",
204
+ "quote",
205
+ "regex",
206
+ "shell-words",
207
+ "syn",
208
+ ]
209
+
210
+ [[package]]
211
+ name = "rb-sys-env"
212
+ version = "0.1.2"
213
+ source = "registry+https://github.com/rust-lang/crates.io-index"
214
+ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
215
+
216
+ [[package]]
217
+ name = "regex"
218
+ version = "1.11.1"
219
+ source = "registry+https://github.com/rust-lang/crates.io-index"
220
+ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
221
+ dependencies = [
222
+ "aho-corasick",
223
+ "memchr",
224
+ "regex-automata",
225
+ "regex-syntax",
226
+ ]
227
+
228
+ [[package]]
229
+ name = "regex-automata"
230
+ version = "0.4.9"
231
+ source = "registry+https://github.com/rust-lang/crates.io-index"
232
+ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
233
+ dependencies = [
234
+ "aho-corasick",
235
+ "memchr",
236
+ "regex-syntax",
237
+ ]
238
+
239
+ [[package]]
240
+ name = "regex-syntax"
241
+ version = "0.8.5"
242
+ source = "registry+https://github.com/rust-lang/crates.io-index"
243
+ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
244
+
245
+ [[package]]
246
+ name = "rustc-hash"
247
+ version = "1.1.0"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
250
+
251
+ [[package]]
252
+ name = "seq-macro"
253
+ version = "0.3.5"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
256
+
257
+ [[package]]
258
+ name = "shell-words"
259
+ version = "1.1.0"
260
+ source = "registry+https://github.com/rust-lang/crates.io-index"
261
+ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
262
+
263
+ [[package]]
264
+ name = "shlex"
265
+ version = "1.3.0"
266
+ source = "registry+https://github.com/rust-lang/crates.io-index"
267
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
268
+
269
+ [[package]]
270
+ name = "syn"
271
+ version = "2.0.98"
272
+ source = "registry+https://github.com/rust-lang/crates.io-index"
273
+ checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
274
+ dependencies = [
275
+ "proc-macro2",
276
+ "quote",
277
+ "unicode-ident",
278
+ ]
279
+
280
+ [[package]]
281
+ name = "thiserror"
282
+ version = "2.0.11"
283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
284
+ checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
285
+ dependencies = [
286
+ "thiserror-impl",
287
+ ]
288
+
289
+ [[package]]
290
+ name = "thiserror-impl"
291
+ version = "2.0.11"
292
+ source = "registry+https://github.com/rust-lang/crates.io-index"
293
+ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
294
+ dependencies = [
295
+ "proc-macro2",
296
+ "quote",
297
+ "syn",
298
+ ]
299
+
300
+ [[package]]
301
+ name = "unicode-ident"
302
+ version = "1.0.17"
303
+ source = "registry+https://github.com/rust-lang/crates.io-index"
304
+ checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
305
+
306
+ [[package]]
307
+ name = "windows-targets"
308
+ version = "0.52.6"
309
+ source = "registry+https://github.com/rust-lang/crates.io-index"
310
+ checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
311
+ dependencies = [
312
+ "windows_aarch64_gnullvm",
313
+ "windows_aarch64_msvc",
314
+ "windows_i686_gnu",
315
+ "windows_i686_gnullvm",
316
+ "windows_i686_msvc",
317
+ "windows_x86_64_gnu",
318
+ "windows_x86_64_gnullvm",
319
+ "windows_x86_64_msvc",
320
+ ]
321
+
322
+ [[package]]
323
+ name = "windows_aarch64_gnullvm"
324
+ version = "0.52.6"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
327
+
328
+ [[package]]
329
+ name = "windows_aarch64_msvc"
330
+ version = "0.52.6"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
333
+
334
+ [[package]]
335
+ name = "windows_i686_gnu"
336
+ version = "0.52.6"
337
+ source = "registry+https://github.com/rust-lang/crates.io-index"
338
+ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
339
+
340
+ [[package]]
341
+ name = "windows_i686_gnullvm"
342
+ version = "0.52.6"
343
+ source = "registry+https://github.com/rust-lang/crates.io-index"
344
+ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
345
+
346
+ [[package]]
347
+ name = "windows_i686_msvc"
348
+ version = "0.52.6"
349
+ source = "registry+https://github.com/rust-lang/crates.io-index"
350
+ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
351
+
352
+ [[package]]
353
+ name = "windows_x86_64_gnu"
354
+ version = "0.52.6"
355
+ source = "registry+https://github.com/rust-lang/crates.io-index"
356
+ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
357
+
358
+ [[package]]
359
+ name = "windows_x86_64_gnullvm"
360
+ version = "0.52.6"
361
+ source = "registry+https://github.com/rust-lang/crates.io-index"
362
+ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
363
+
364
+ [[package]]
365
+ name = "windows_x86_64_msvc"
366
+ version = "0.52.6"
367
+ source = "registry+https://github.com/rust-lang/crates.io-index"
368
+ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
@@ -0,0 +1,9 @@
1
+ [package]
2
+ name = "itsi_error"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+
6
+ [dependencies]
7
+ thiserror = "2.0.11"
8
+ magnus = { version = "0.7.1" }
9
+ rcgen = "0.13.2"
@@ -0,0 +1,49 @@
1
+ use thiserror::Error;
2
+
3
+ pub type Result<T> = std::result::Result<T, ItsiError>;
4
+
5
+ #[derive(Error, Debug)]
6
+ pub enum ItsiError {
7
+ #[error("Invalid input")]
8
+ InvalidInput(String),
9
+ #[error("Internal server error")]
10
+ InternalServerError,
11
+ #[error("Unsupported protocol")]
12
+ UnsupportedProtocol(String),
13
+ #[error("Argument error")]
14
+ ArgumentError(String),
15
+ #[error("Jump")]
16
+ Jump(String),
17
+ }
18
+
19
+ impl From<ItsiError> for magnus::Error {
20
+ fn from(err: ItsiError) -> Self {
21
+ magnus::Error::new(magnus::exception::runtime_error(), err.to_string())
22
+ }
23
+ }
24
+
25
+ impl From<std::io::Error> for ItsiError {
26
+ fn from(err: std::io::Error) -> Self {
27
+ ItsiError::ArgumentError(err.to_string())
28
+ }
29
+ }
30
+
31
+ impl From<rcgen::Error> for ItsiError {
32
+ fn from(err: rcgen::Error) -> Self {
33
+ ItsiError::ArgumentError(err.to_string())
34
+ }
35
+ }
36
+
37
+ impl From<magnus::Error> for ItsiError {
38
+ fn from(err: magnus::Error) -> Self {
39
+ match err.error_type() {
40
+ magnus::error::ErrorType::Jump(tag) => ItsiError::Jump(tag.to_string()),
41
+ magnus::error::ErrorType::Error(_exception_class, cow) => {
42
+ ItsiError::ArgumentError(cow.to_string())
43
+ }
44
+ magnus::error::ErrorType::Exception(exception) => {
45
+ ItsiError::ArgumentError(exception.to_string())
46
+ }
47
+ }
48
+ }
49
+ }