Wolfgang Bumiller
27c8106d7b
bump proxmox-async to 0.4.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:22:59 +02:00
Dominik Csapak
9471ba9969
proxmox-async: add SenderWriter helper
...
this wraps around a tokio Sender for Vec<u8>, but implements a blocking
write. We can use thas as an adapter for something that only takes a
writer, and can read from it asynchonously
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:05:14 +02:00
Thomas Lamprecht
4cdeee64dc
sys: make acl constants rustfmt safe
...
there's not much better one can do here..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 17:39:31 +02:00
Thomas Lamprecht
0a651e00a9
sys: rust fmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 17:39:31 +02:00
Thomas Lamprecht
3a3dd296cc
schema: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:42:09 +02:00
Thomas Lamprecht
ae9d6e255c
lang: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:41:44 +02:00
Thomas Lamprecht
0eeb0dd17c
http: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:41:21 +02:00
Thomas Lamprecht
05cad8926b
router: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:40:39 +02:00
Thomas Lamprecht
0ec1c684ae
shared memory: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:37:38 +02:00
Thomas Lamprecht
6f8173f67a
tfa: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:34:41 +02:00
Thomas Lamprecht
4554034d32
time: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:34:04 +02:00
Thomas Lamprecht
800cf63a8a
uuid: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:34:01 +02:00
Thomas Lamprecht
d3b387f1a7
update gitignore
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:29:03 +02:00
Wolfgang Bumiller
f04eb949d1
tfa: serde tools: improve variance and dropck
...
`FoldSeqVisitor` doesn't actually own a `T` and therefore
cannot drop a `T`, we only use it via the `Fn(&mut Out, T)`,
so use `fn(T)` in the `PhantomData` to keep `T`
contravariant.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-22 12:31:54 +01:00
Wolfgang Bumiller
6221d86c64
schema: add another test case
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-09 14:29:53 +01:00
Wolfgang Bumiller
d7283d5aeb
schema: don't accept unterminated quoted strings
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-09 13:41:09 +01:00
Wolfgang Bumiller
cdf4326e43
schema: factor out string verify fn and improve docs
...
We'll need to name the type when we add more perl bindings.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 14:51:16 +01:00
Wolfgang Bumiller
6e4a912bea
bump schema to 1.3.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 09:47:40 +01:00
Wolfgang Bumiller
1e0c04a4ba
drop param_bail test
...
it's not actually testing anything useful
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 09:44:51 +01:00
Dominik Csapak
7c7e99dca1
proxmox-schema: add convenience macros for ParameterError
...
with two variants:
(expr, expr) => assumes that the second is an 'Error'
(expr, (tt)+) => passes the tt through anyhow::format_err
also added tests
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-03-04 09:43:01 +01:00
Wolfgang Bumiller
ec5ff23d70
make property_string module public
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-01 14:57:45 +01:00
Wolfgang Bumiller
fca5218749
schema: add const fn unwrap_*_schema/format methods
...
'unwrap_' because they will panic and as `const fn` since
panic in const fn is now possible
Note that const evaluation will only be triggered when
actually used in const context, so to ensure *compile time*
checks, use something like this:
const FOO_SCHEMA: &AllOfSchema =
SomeType::API_SCHEMA.unwrap_all_of_schema();
then_use(FOO_SCHEMA);
or to use the list of enum values of an enum string type
with compile time checks:
const LIST: &'static [EnumEntry] =
AnEnumStringType::API_SCHEMA
.unwrap_string_schema()
.unwrap_format()
.unwrap_enum_format();
for values in LIST {
...
}
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-22 09:35:06 +01:00
Wolfgang Bumiller
98811ba9f1
bump proxmox-metrics to 0.1.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-22 09:00:39 +01:00
Wolfgang Bumiller
77ea32cc5a
metrics: bump async dep to 0.4
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-22 08:59:37 +01:00
Wolfgang Bumiller
1e75baecb0
bump proxmox-async to 0.4.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:20:13 +01:00
Wolfgang Bumiller
04b3bdb6cd
proxmox-compression: update d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:17:01 +01:00
Dominik Csapak
b8bf6a5c81
split out compression code into new crate 'proxmox-compression'
...
this removes quite a bit of dependecies of proxmox-async
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[set proxmox-lang dep to 1.1]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 14:10:53 +01:00
Wolfgang Bumiller
d663ff328a
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:49:48 +01:00
Wolfgang Bumiller
57d052af36
workspace: set proxmox-lang dep version to 1.1
...
to ensure the error macros are available
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:45:46 +01:00
Wolfgang Bumiller
d8ecb87358
bump proxmox-lang to 1.1.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:45:10 +01:00
Wolfgang Bumiller
fc4e02a34f
lang: remove io_assert
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:41:59 +01:00
Dominik Csapak
d4b4115400
move io error helpers to proxmox-lang
...
this removes proxmox_sys as a dependecy for proxmox-async
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:35:14 +01:00
Wolfgang Bumiller
46580ee3e9
bump proxmox-schema to 1.2.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-17 12:06:15 +01:00
Wolfgang Bumiller
46541feecf
support quoted strings in property strings
...
This allows free form text to exist within property strings,
quoted, like:
key="A value with \"quotes, also commas",key2=value2
or also:
"the value for a default_key",key2=value2
And drop ';' as a key=value separator since those are meant
for arrays inside property strings...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-17 09:36:43 +01:00
Wolfgang Bumiller
39eac6280f
schema: FromIterator lifetime fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-14 11:20:48 +01:00
Wolfgang Bumiller
c43ac0a64c
schema: impl FromIterator for ParameterError
...
for where we also have Extend impls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-14 09:46:20 +01:00
Wolfgang Bumiller
706d966c87
schema: bump edition to 2021
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-14 09:45:38 +01:00
Wolfgang Bumiller
ae0ee80f43
bump proxmox-schema to 1.2.0-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:08:30 +01:00
Wolfgang Bumiller
8a60e6c8d0
schema: rustfmt
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:05:05 +01:00
Wolfgang Bumiller
a5ba444a5b
schema: ParameterError convenience
...
for ease of use implement these traits for ParameterError:
* From<(&str, Error)>
* From<(String, Error)>
* Extend<(String, Error)>
* Extend<(&str, Error)>
* IntoIterator<Item = (String, Error)>
and add the following methods:
* fn into_inner(self) -> Vec<(String, Error)>;
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 14:01:57 +01:00
Wolfgang Bumiller
70142e607d
proxmox-http: drop 'mut' on specialized request methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Wolfgang Bumiller
86f3c90763
proxmox-tfa: fully deserialize TfaChallenge
...
otherwise clients cannot use this...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Wolfgang Bumiller
e5a43afe10
proxmox-tfa: make TfaChallenge members public
...
rust based *clients* may want/need access to it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Fabian Grünbichler
9ba2092d1b
proxmox-async: rustfmt (again)
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:52:42 +01:00
Fabian Grünbichler
09d1344d61
proxmox-async: another clippy fixup
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:33:50 +01:00
Fabian Grünbichler
ca563a8cfd
misc clippy fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:28:44 +01:00
Wolfgang Bumiller
9539fbde1c
proxmox-async: clippy fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-08 14:26:46 +01:00
Stefan Sterz
0b90f8d802
api-macro: fix "Forgerty" typo
...
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-02-07 15:38:39 +01:00
Thomas Lamprecht
5cc4ce3b4d
http: websocket: code cleanup
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:16:36 +01:00
Thomas Lamprecht
1edb52411e
http: websocket: drop Text frame auto-detection from docs
...
was forgotten in commit 232d87531e
when
dropping the bogus frame auto detection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:15:49 +01:00