]>
git.proxmox.com Git - proxmox.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Wolfgang Bumiller [Tue, 11 Jun 2019 15:12:33 +0000 (17:12 +0200)]
fixup add missing question mark
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 10 Jun 2019 21:04:19 +0000 (23:04 +0200)]
api: ApiMethodInfo should be Send + Sync
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 10 Jun 2019 21:02:20 +0000 (23:02 +0200)]
api: ApiFutures need to be Send
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 10 Jun 2019 18:05:51 +0000 (20:05 +0200)]
formatting cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 10 Jun 2019 18:05:20 +0000 (20:05 +0200)]
macro: body type support for router and api macros
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 10 Jun 2019 12:10:01 +0000 (14:10 +0200)]
rewrite parse_object
This should support arbitrary expresion, so gobble up
elements up to the next comma and then run it through
syn::parse2.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sun, 9 Jun 2019 12:22:49 +0000 (14:22 +0200)]
macro: need to allow specifying the body type now
TODO:
- change parse_object to use Punctuated for the fields to
support longer value types (so we can use actual types
as fields)
- allow adding a body type to methods
- allow adding a body type to routers explicitly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sun, 9 Jun 2019 12:22:35 +0000 (14:22 +0200)]
rename reload_timezone -> reload-timezone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sun, 9 Jun 2019 12:04:53 +0000 (14:04 +0200)]
api: add generic Body parameter
Since we already know we'll want to be using hyper::Body and
bytes::Bytes as API output, we need to allow making routers
for each kind.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 16:53:03 +0000 (18:53 +0200)]
macro: add wildcard matching to router macro
router!{
/path/{parameter}*: {
methods...
}
}
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 11:35:05 +0000 (13:35 +0200)]
router: implement 'rest of the path' wildcard matching
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 11:11:24 +0000 (13:11 +0200)]
api: move router to router.rs
We'll have a separate router for the command line, so the
http router won't live in the root module.
It is still exported at the root level, though, via
proxmox::api::Router.
Also move ApiType into api_type.rs, makes more sense.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 11:05:56 +0000 (13:05 +0200)]
allow async api methods to return Response<Bytes>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 08:57:50 +0000 (10:57 +0200)]
router: add remaining missing ::proxmox::api:: prefixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 08:55:19 +0000 (10:55 +0200)]
cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 08:53:26 +0000 (10:53 +0200)]
allow integer literals as subdirectories
eg: /api/2/ should be legal
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 08:52:11 +0000 (10:52 +0200)]
use 'quote' in router macro
get rid of a lot of unreadable TokenTree entries
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Sat, 8 Jun 2019 08:51:41 +0000 (10:51 +0200)]
fix missing proxmox_api -> proxmox::api replacement
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 7 Jun 2019 15:29:12 +0000 (17:29 +0200)]
macro: switch to using proxmox::api
and fixup a `bail!` -> `::failure::bail!`
Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
Wolfgang Bumiller [Wed, 12 Jun 2019 07:43:50 +0000 (09:43 +0200)]
cargo fmt --all
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 7 Jun 2019 16:01:26 +0000 (18:01 +0200)]
start proxmox-sys module
Wolfgang Bumiller [Fri, 7 Jun 2019 10:03:13 +0000 (12:03 +0200)]
formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 13:21:58 +0000 (15:21 +0200)]
import proxmox-api-macro crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 12:47:02 +0000 (14:47 +0200)]
typo fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 12:45:05 +0000 (14:45 +0200)]
Add more documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 12:07:26 +0000 (14:07 +0200)]
api: router test file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 12:06:20 +0000 (14:06 +0200)]
add proxmox-api crate
This contains the router and will get helpers for
generating documentation, and for parsing command line
parameters for api methods.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 6 Jun 2019 11:47:38 +0000 (13:47 +0200)]
initial import, starting with vec & io helpers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>