]>
git.proxmox.com Git - proxmox-backup.git/log
Dietmar Maurer [Mon, 26 Nov 2018 17:02:29 +0000 (18:02 +0100)]
use is_empty() to check for empty string
Dietmar Maurer [Mon, 26 Nov 2018 17:01:24 +0000 (18:01 +0100)]
section_config: improve parser
Dietmar Maurer [Sat, 24 Nov 2018 16:52:43 +0000 (17:52 +0100)]
add some inline documentation
Dietmar Maurer [Sat, 24 Nov 2018 11:37:05 +0000 (12:37 +0100)]
StringSchema: add method to check string length
Dietmar Maurer [Sat, 24 Nov 2018 11:33:44 +0000 (12:33 +0100)]
ArraySchema: add method to check array length
Dietmar Maurer [Sat, 24 Nov 2018 11:21:56 +0000 (12:21 +0100)]
parse_property_string: allow arrays
So that we can build simple lists like "1,2,3,4"
Dietmar Maurer [Sat, 24 Nov 2018 10:21:01 +0000 (11:21 +0100)]
rename test case
Dietmar Maurer [Sat, 24 Nov 2018 10:20:17 +0000 (11:20 +0100)]
parse_property_string: first try
Dietmar Maurer [Sat, 24 Nov 2018 07:30:23 +0000 (08:30 +0100)]
add test for VerifyFn
Dietmar Maurer [Sat, 24 Nov 2018 07:15:08 +0000 (08:15 +0100)]
remove outdated test code
Dietmar Maurer [Sat, 24 Nov 2018 07:12:23 +0000 (08:12 +0100)]
ArraySchema: Add min_length and max_length
Dietmar Maurer [Fri, 23 Nov 2018 16:02:50 +0000 (17:02 +0100)]
remove description from ApiMethod
We use the description from parameters ObjectSchema instead.
Dietmar Maurer [Fri, 23 Nov 2018 12:18:41 +0000 (13:18 +0100)]
implement Into Arc<Schema>
Dietmar Maurer [Fri, 23 Nov 2018 11:05:55 +0000 (12:05 +0100)]
implement ArraySchema
Dietmar Maurer [Fri, 23 Nov 2018 10:34:15 +0000 (11:34 +0100)]
remove parameter macro, implement ObjectSchema builder
And store "optional" attribute inside properties hash.
Dietmar Maurer [Fri, 23 Nov 2018 08:33:41 +0000 (09:33 +0100)]
start using builder pattern instead of macros
Dietmar Maurer [Thu, 22 Nov 2018 10:23:49 +0000 (11:23 +0100)]
implement schema registry
Dietmar Maurer [Tue, 20 Nov 2018 15:54:29 +0000 (16:54 +0100)]
use Arc pointer to properties
Dietmar Maurer [Mon, 19 Nov 2018 07:07:22 +0000 (08:07 +0100)]
section_config.rs: add some test code
Dietmar Maurer [Mon, 19 Nov 2018 05:47:39 +0000 (06:47 +0100)]
add section_config.rs
Dietmar Maurer [Mon, 19 Nov 2018 05:40:57 +0000 (06:40 +0100)]
move future test code into extra file
Dietmar Maurer [Sun, 18 Nov 2018 14:01:19 +0000 (15:01 +0100)]
implement simply test future for storage operations
Dietmar Maurer [Sun, 18 Nov 2018 13:57:18 +0000 (14:57 +0100)]
fix getopts when called without any argument
Dietmar Maurer [Sun, 18 Nov 2018 09:09:13 +0000 (10:09 +0100)]
impl argument parameters
Dietmar Maurer [Sun, 18 Nov 2018 08:34:43 +0000 (09:34 +0100)]
getopts: more tests
Dietmar Maurer [Sun, 18 Nov 2018 07:55:21 +0000 (08:55 +0100)]
improve getopt parser
Dietmar Maurer [Sun, 18 Nov 2018 07:46:26 +0000 (08:46 +0100)]
use ObjectSchema for parameters
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Dietmar Maurer [Sat, 17 Nov 2018 10:29:42 +0000 (11:29 +0100)]
another testcase for boolean argument parser
Dietmar Maurer [Sat, 17 Nov 2018 10:28:26 +0000 (11:28 +0100)]
getopt parser fixes and cleanups
Dietmar Maurer [Sat, 17 Nov 2018 09:02:35 +0000 (10:02 +0100)]
getopts: allow "-option" and "--option"
Dietmar Maurer [Sat, 17 Nov 2018 08:57:26 +0000 (09:57 +0100)]
getopts: improve error handling
Dietmar Maurer [Fri, 16 Nov 2018 15:47:23 +0000 (16:47 +0100)]
cleanup variable names
Dietmar Maurer [Fri, 16 Nov 2018 12:14:11 +0000 (13:14 +0100)]
implement getopt parser - first try
Dietmar Maurer [Fri, 16 Nov 2018 10:12:00 +0000 (11:12 +0100)]
router: no need to use Fn (fn also works for static closures)
Dietmar Maurer [Fri, 16 Nov 2018 08:16:37 +0000 (09:16 +0100)]
fix typo
Dietmar Maurer [Fri, 16 Nov 2018 08:15:33 +0000 (09:15 +0100)]
handle uri parameters correctly
Dietmar Maurer [Fri, 16 Nov 2018 07:29:23 +0000 (08:29 +0100)]
Router: allow to set match parameter name
Dietmar Maurer [Fri, 16 Nov 2018 07:24:10 +0000 (08:24 +0100)]
Router: implement missing builder methods
Dietmar Maurer [Fri, 16 Nov 2018 06:35:19 +0000 (07:35 +0100)]
remove stale macro
Dietmar Maurer [Thu, 15 Nov 2018 16:47:59 +0000 (17:47 +0100)]
allow closure handlers
Dietmar Maurer [Thu, 15 Nov 2018 16:07:55 +0000 (17:07 +0100)]
add missing file
Dietmar Maurer [Thu, 15 Nov 2018 16:07:10 +0000 (17:07 +0100)]
cleanup module names
Dietmar Maurer [Thu, 15 Nov 2018 15:56:28 +0000 (16:56 +0100)]
rename Jss to Schema
Dietmar Maurer [Thu, 15 Nov 2018 15:48:36 +0000 (16:48 +0100)]
fix parameter macro for empty object
Dietmar Maurer [Thu, 15 Nov 2018 12:28:15 +0000 (13:28 +0100)]
improve router
Dietmar Maurer [Thu, 15 Nov 2018 10:46:13 +0000 (11:46 +0100)]
rename MethodInfo to Router
Dietmar Maurer [Thu, 15 Nov 2018 09:57:52 +0000 (10:57 +0100)]
avoid macros
Dietmar Maurer [Thu, 15 Nov 2018 09:42:01 +0000 (10:42 +0100)]
rename ApiError into HttpError
Dietmar Maurer [Thu, 15 Nov 2018 09:25:59 +0000 (10:25 +0100)]
remove unneeded lifetime annotations
Dietmar Maurer [Thu, 15 Nov 2018 09:18:01 +0000 (10:18 +0100)]
reorder content
Dietmar Maurer [Thu, 15 Nov 2018 09:14:08 +0000 (10:14 +0100)]
move ApiConfig into extra file
Dietmar Maurer [Thu, 15 Nov 2018 07:18:48 +0000 (08:18 +0100)]
move server code to api_server.rs, implement Service and NewService
Dietmar Maurer [Wed, 14 Nov 2018 16:32:17 +0000 (17:32 +0100)]
remove more test code, cleanups
Dietmar Maurer [Wed, 14 Nov 2018 13:31:04 +0000 (14:31 +0100)]
remove asnyc test code
Dietmar Maurer [Wed, 14 Nov 2018 13:28:54 +0000 (14:28 +0100)]
correctly use Arc pointer
Dietmar Maurer [Wed, 14 Nov 2018 12:22:33 +0000 (13:22 +0100)]
factor out server code into api_server.rs
Dietmar Maurer [Wed, 14 Nov 2018 10:57:01 +0000 (11:57 +0100)]
use Arc for ApiServer
Dietmar Maurer [Wed, 14 Nov 2018 10:38:26 +0000 (11:38 +0100)]
simplify code
Dietmar Maurer [Tue, 13 Nov 2018 13:47:03 +0000 (14:47 +0100)]
remove service implementation, use service_fn again
Dietmar Maurer [Tue, 13 Nov 2018 11:36:56 +0000 (12:36 +0100)]
improve error handling, use a Service
Dietmar Maurer [Mon, 12 Nov 2018 13:11:04 +0000 (14:11 +0100)]
remove static directory cache
Dietmar Maurer [Mon, 12 Nov 2018 12:19:53 +0000 (13:19 +0100)]
santtize paths in handle_request
Dietmar Maurer [Sun, 11 Nov 2018 16:19:24 +0000 (17:19 +0100)]
code cleanup
Dietmar Maurer [Sun, 11 Nov 2018 16:10:42 +0000 (17:10 +0100)]
handle_static_file_download: optimize small files
Avoid chuncked transfer for small files.
Dietmar Maurer [Sun, 11 Nov 2018 14:54:05 +0000 (15:54 +0100)]
implement static file download
Fully async using futures and stream.
Dietmar Maurer [Sun, 11 Nov 2018 12:24:14 +0000 (13:24 +0100)]
limit allowed body size
Dietmar Maurer [Sun, 11 Nov 2018 11:55:30 +0000 (12:55 +0100)]
use header::CONTENT_TYPE
Dietmar Maurer [Sat, 10 Nov 2018 16:17:41 +0000 (17:17 +0100)]
add code to create directory name cache
Dietmar Maurer [Sat, 10 Nov 2018 14:12:45 +0000 (15:12 +0100)]
another way to read files using tokio_codec
Dietmar Maurer [Sat, 10 Nov 2018 11:06:39 +0000 (12:06 +0100)]
play around with async tasks
Dietmar Maurer [Sat, 10 Nov 2018 09:32:25 +0000 (10:32 +0100)]
use better http status codes
Dietmar Maurer [Sat, 10 Nov 2018 09:00:48 +0000 (10:00 +0100)]
cleanup futures
Dietmar Maurer [Fri, 9 Nov 2018 12:48:57 +0000 (13:48 +0100)]
call api method and return result
Dietmar Maurer [Fri, 9 Nov 2018 07:22:54 +0000 (08:22 +0100)]
use futures - first try
Dietmar Maurer [Wed, 7 Nov 2018 12:58:09 +0000 (13:58 +0100)]
code cleanup
Dietmar Maurer [Wed, 7 Nov 2018 12:25:47 +0000 (13:25 +0100)]
implement string enum validation
Dietmar Maurer [Wed, 7 Nov 2018 12:01:14 +0000 (13:01 +0100)]
try to reduce space usage in ApiStringFormat by using Box
Dietmar Maurer [Wed, 7 Nov 2018 11:55:33 +0000 (12:55 +0100)]
define a separate enum ApiStringFormat
Dietmar Maurer [Wed, 7 Nov 2018 11:35:52 +0000 (12:35 +0100)]
implement string regex matcher
Dietmar Maurer [Wed, 7 Nov 2018 11:16:16 +0000 (12:16 +0100)]
remove unnecessary test
Dietmar Maurer [Wed, 7 Nov 2018 11:14:52 +0000 (12:14 +0100)]
improve error messages
Dietmar Maurer [Wed, 7 Nov 2018 11:11:09 +0000 (12:11 +0100)]
implement some string tests
Dietmar Maurer [Wed, 7 Nov 2018 10:55:08 +0000 (11:55 +0100)]
implement integer schema tests
Dietmar Maurer [Wed, 7 Nov 2018 10:06:37 +0000 (11:06 +0100)]
pass ApiMethod to handler
Dietmar Maurer [Tue, 6 Nov 2018 13:18:13 +0000 (14:18 +0100)]
test for required parameters
Dietmar Maurer [Tue, 6 Nov 2018 12:58:05 +0000 (13:58 +0100)]
try to write unit test
Dietmar Maurer [Tue, 6 Nov 2018 12:10:10 +0000 (13:10 +0100)]
implement simple schema parser
Dietmar Maurer [Tue, 6 Nov 2018 08:35:11 +0000 (09:35 +0100)]
move url related code back to main.rs
Dietmar Maurer [Mon, 5 Nov 2018 14:20:27 +0000 (15:20 +0100)]
move parse_query into json_schema
Dietmar Maurer [Sat, 3 Nov 2018 14:10:21 +0000 (15:10 +0100)]
avoid static references
Dietmar Maurer [Sat, 3 Nov 2018 09:50:24 +0000 (10:50 +0100)]
use const for default object initializers
Dietmar Maurer [Sat, 3 Nov 2018 09:42:48 +0000 (10:42 +0100)]
another way to initialize the api tree
Dietmar Maurer [Sat, 3 Nov 2018 08:08:01 +0000 (09:08 +0100)]
move test code
Dietmar Maurer [Fri, 2 Nov 2018 09:01:47 +0000 (10:01 +0100)]
convert find_method_info function into a method
Dietmar Maurer [Fri, 2 Nov 2018 08:50:26 +0000 (09:50 +0100)]
use reference to Jss inside PropertyMap
Dietmar Maurer [Fri, 2 Nov 2018 08:44:18 +0000 (09:44 +0100)]
define macro for propertymap
Dietmar Maurer [Thu, 1 Nov 2018 17:10:36 +0000 (18:10 +0100)]
use macro to declare static methodinfo items
Dietmar Maurer [Thu, 1 Nov 2018 14:41:08 +0000 (15:41 +0100)]
new subdirmap macro, cleanups
Dietmar Maurer [Thu, 1 Nov 2018 13:42:27 +0000 (14:42 +0100)]
use edition 2018 (beta)
This is expected to be stable by the end of the year.
Dietmar Maurer [Thu, 1 Nov 2018 13:19:02 +0000 (14:19 +0100)]
avoid warning about unused vars