Dietmar Maurer
25877d05ac
update to proxmox-sys 0.2 crate
...
- imported pbs-api-types/src/common_regex.rs from old proxmox crate
- use hex crate to generate/parse hex digest
- remove all reference to proxmox crate (use proxmox-sys and
proxmox-serde instead)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:32:27 +01:00
Dietmar Maurer
e0a19d3313
use new fsync parameter to replace_file and atomic_open_or_create
...
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Wolfgang Bumiller
6ef1b649d9
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Dietmar Maurer
608806e884
proxmox-rest-server: use new ServerAdapter trait instead of callbacks
...
Async callbacks are a PITA, so we now pass a single trait object which
implements check_auth and get_index.
2021-10-05 11:13:10 +02:00
Dietmar Maurer
038f385089
proxmox-rest-server: make check_auth async
2021-10-01 07:53:59 +02:00
Dietmar Maurer
b914b94773
proxmox-rest-server: fix spelling errors
2021-10-01 06:43:30 +02:00
Dietmar Maurer
a98a288e2d
proxmox-rest-server: start module docs
2021-09-30 13:49:29 +02:00
Wolfgang Bumiller
8735247f29
drop fd_change_cloexec from proxmox-rest-server
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-30 12:43:22 +02:00
Dietmar Maurer
0d5d15c9d1
proxmox-rest-server: improve docs
...
And rename enable_file_log to enable_access_log.
2021-09-30 12:29:15 +02:00
Dietmar Maurer
2e44983a37
proxmox-rest-server: improve docs
...
And renames abort_worker_async to abort_worker_nowait (avoid confusion,
because the function itself is not async).
2021-09-30 10:51:41 +02:00
Dietmar Maurer
38da8ca1bc
proxmox-rest-server: improve logging
...
And rename server_state_init() into catch_shutdown_and_reload_signals().
2021-09-29 14:48:46 +02:00
Dietmar Maurer
a0ffd4a413
proxmox-rest-server: avoid useless call to request_shutdown
...
Also avoid unsafe code.
2021-09-29 14:37:07 +02:00
Dietmar Maurer
53daae8e89
proxmox-rest-server: cleanup formatter, improve docs
...
Use trait for OutputFormatter. This is functionally equivalent,
but more rust-like...
2021-09-28 07:45:50 +02:00
Dietmar Maurer
f7348a23cd
move src/server/h2service.rs into proxmox-rest-server crate
2021-09-24 10:28:17 +02:00
Dietmar Maurer
b9700a9fe5
move worker_task.rs into proxmox-rest-server crate
...
Also moved pbs-datastore/src/task.rs to pbs-tools, which now depends on 'log'.
2021-09-24 10:28:17 +02:00
Dietmar Maurer
6fbf0acc76
move src/server/rest.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
98b7d58b94
rest server: return UserInformation from ApiAuth::check_auth
...
This need impl UserInformation for Arc<CachedUserInfo> which is implemented
with proxmox 0.13.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
778c7d954b
move normalize_uri_path and extract_cookie to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
605fe2e7e7
move src/tools/compression.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
1b552c109d
move src/server/formatter.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
d4d49f7325
move src/server/environment.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
8bca935f08
move src/tools/daemon.rs to proxmox-rest-server workspace
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
fd6d243843
move ApiConfig, FileLogger and CommandoSocket to proxmox-rest-server workspace
...
ApiConfig: avoid using pbs_config::backup_user()
CommandoSocket: avoid using pbs_config::backup_user()
FileLogger: avoid using pbs_config::backup_user()
- use atomic_open_or_create_file()
Auth Trait: moved definitions to proxmox-rest-server/src/lib.rs
- removed CachedUserInfo patrameter
- return user as String (not Authid)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
037f6b6d5e
start new proxmox-rest-server workspace
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00