Commit Graph

165 Commits

Author SHA1 Message Date
JohnDimas
6d0a9740da Resolves 'Panic on http2 timeout ' 2022-07-21 14:57:37 +02:00
David Schmitt
7293ff5b10 Fix the client source to pass cargo test
* change `http::Uri` -> `hyper::http::Uri`
* add dependency on `tower-service`
2022-06-03 21:03:54 +01:00
Kyle Gentle
c5ff239961 feat(Hub): Support custom connectors
Switch the constraints on Hub types to use public traits based on
tower::service, as recommended by Hyper. This enables support for
custom connectors beyond hyper_rustls::HttpsConnector

Closes #337.
2022-06-01 21:12:32 -04:00
Federico Cergol
544be6d2a2 refactor: remove various errors structs
BREAKING CHANGE: removed errors structs exposed in the Delegate and as return value from the `doit` methods
2022-03-07 22:32:33 +01:00
Debo Mac
5a1a7b1fb2 Fix duplication of oauth2 definition 2021-10-05 20:29:15 +08:00
Sebastian Thiel
74621c9c37 Explicitly specify Send requirement where dyn traits are used (#296) 2021-08-26 09:05:39 +08:00
Sebastian Thiel
a22c18725c Make ReadSeek require 'Send', related to #294 2021-08-25 07:52:02 +08:00
Remco Bloemen
33e83bb610 Correct multipart line endings 2021-08-04 09:37:06 +08:00
Petter Rasmussen
19088aa178 Fix resumable uploads
Only increment the start offset when the response is successful and seek
to the start offset on each iteration.
2021-06-06 15:08:33 +02:00
Dennis Vestergaard Værum
6d56955037 Bug-fix for the upload error: Failed at uploading 'client requires absolute-form URIs' 2021-04-19 14:55:32 +02:00
Sebastian Thiel
3b087bf3e2 Assuure Delegate is Send (#271) 2021-04-14 16:30:53 +08:00
Sebastian Thiel
9c339da955 Simplify type system to leverage 'Sync' types
These are generally available now that we use hyper's async
APIs along with the most recent yup-hypermock.
2021-04-14 09:52:27 +08:00
Sebastian Thiel
fe6ccfed3f Remove RefCell around autenticator - they are sync now 2021-04-14 09:38:07 +08:00
Sergiu Puscas
819e1ccce5 std::iter not needed 2021-04-05 18:44:00 +02:00
Sergiu Puscas
83fed44db0 Run code through cargo fmt. 2021-04-05 18:41:44 +02:00
Sergiu Puscas
6ec46827e7 Fix clippy warnings. 2021-04-05 18:41:17 +02:00
Sergiu Puscas
30ea80bf31 Use hyper::body::to_bytes() instead of aggregate().
This should not truncate the content.
2021-04-05 18:27:43 +02:00
Dennis Vestergaard Værum
1f776ddc54 Bug fix: It was not possible to use FileGetCall to download binary files 2021-04-02 07:53:48 +02:00
Sebastian Thiel
69acd16746 Groupsmigration-cli compiles, even though resumable uploads are gone. 2021-04-01 16:52:49 +08:00
Sebastian Thiel
0bf46b95f3 Remove support for debug logging of CLI programs
The needed feature was removed from yup-hyper-mock, and if needed
it can certainly be re-implemented.
2021-04-01 16:38:36 +08:00
Sebastian Thiel
891f126a56 Groupsmigration compiles 2021-04-01 09:58:13 +08:00
Daniel Rodgers-Pryor
b8a66bc666 Update hyper, rustls and yup-oauth2
I've switched to a new M1 laptop which couldn't build the old dependencies because the old ring library version doesn't compile on mac arm (but new version do). There's no way to update ring in isolation, so I've got to update the whole tree at once.
2021-02-04 23:49:07 +11:00
Sebastian Thiel
b88e1633ed Fix rust compile warnings 2021-01-06 22:45:28 +08:00
Petros Angelatos
af73936b95 rename cmn to client
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:46:06 +01:00
Petros Angelatos
b5923b277c use direct references to types to generate documentation
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:44:20 +01:00
Sebastian Thiel
94cf4ad569 Make 'cargo test' work by pinning relevant versions 2020-04-12 17:36:05 +08:00
Sebastian Thiel
b66f868ed1 Fix deprecation warnings in CLI 2020-01-18 15:12:24 +08:00
Sebastian Thiel
65b8f0063d Rewrite deprecated features, such as try!
As taken from
https://github.com/Byron/google-apis-rs/pull/247
2020-01-18 14:46:53 +08:00
Sebastian Thiel
eb3a6ef578 Truncate all files we open to fix #240
Otherwise it's possible to leave bytes related to a previous version
of the file in tact, tailing the newly written content.
This in turn leads to malformed json when tokens are rewritten.
2019-09-16 07:53:15 +02:00
Sebastian Thiel
bcc72e4fc1 Fields in Error related structs are now accessible
Fixes #239
2019-09-09 08:12:17 +02:00
Sebastian Thiel
f33fae47e9 Add Rust preprocessor to handle code examples gracefully
Fixes #213
2019-07-05 17:00:56 +08:00
Sebastian Thiel
8cb73d66c2 Add simple preprocessor to handle descriptions interpreted by cargo doc
This seemed easiest, especially since I also am the author of
pulldown-cmark-to-cmark :D.

Funny how things fit together sometimes. And so much better than
if I would have tried the same in pure python.
2019-07-05 14:51:30 +08:00
Chris Pick
499416c011 fix(rust): teach remove_json_null_values arrays
change `remove_json_null_values()` to properly remove nulls from and recurse in to arrays
google_firestore1_beta1's `CommitRequest` contains an array of `Write` objects which can ultimately
contain `Value` members that need to have nulls removed to avoid sending multiple types of values
which generates a 400 response

fixes calls to google_firestore1_beta1's `hub.projects().databases_documents_commit()`
2019-07-03 18:27:27 +08:00
Sebastian Thiel
c28413321b Switch to serde to v1.0 2017-09-24 14:51:51 +02:00
Sebastian Thiel
1323d0dccb fix(tests): use new serde map implementation
No fun, this one.
2017-02-04 13:03:42 +01:00
Sebastian Thiel
7a611c39aa Adapt to changed Map interface 2017-02-04 11:52:42 +01:00
Sebastian Thiel
26f57948a6 chore(cli): one step closer to getting it compiled 2017-02-03 09:20:01 +01:00
Sebastian Thiel
1756d7dec4 chore(cli): fix error handling 2017-02-03 09:01:30 +01:00
Greg Dallavalle
8f47126103 Fix typo Requst->Request 2017-01-12 12:33:33 -06:00
Sebastian Thiel
e7721ce53b chore(cleanup): remove workaround marker
... and some left-over comments.

The workaround code is actually more readable than the previous version,
so it may as well stay.

Fixes #109
2016-07-17 13:56:25 +02:00
Sebastian Thiel
bed46ba241 fix(test): work with latest serde
`cargo test` will work now.
We now use the latest serde once again, which should
make everything better.
2016-05-20 18:40:26 +02:00
Sebastian Thiel
3e2216c445 chore(serde-up): use features for cli-dependency
That way, we respect the API features when pulling it in
via the CLI. Also make it compatible to the latest serde-json
version.
2016-05-20 16:40:44 +02:00
Sebastian Thiel
065cfdd22f fix(lib): use hyper Bearer header style
Considering we kind-of hardcoded this authentication type anyway,
we now use the Auth-types provided by hyper 0.8.

The incentive here was the compiler telling us that there the
yup-oauth::Scheme type doesn't implement the hyper::authorization::Scheme
anymore, even though that clearly was the case. Also it couldn't be
reproduced in yup-oauth itself.

This will need some work to get correct again, so this is just a crude
patch to make it work again.
2016-04-10 13:01:18 +02:00
Sebastian Thiel
9e8a047ebf fix(cli): compatibility with serde 0.6
0.7 has a weird assertion error that might have happened
if files get too large.
2016-04-10 12:59:59 +02:00
Sebastian Thiel
be0faf0e1d chore(serde): upgrade to 0.7
Desired feature: ignore unknown fields, which is now on by default.
2016-02-27 12:30:09 +01:00
Sebastian Thiel
a2c6b58d5b fix(versionup): use latest oauth2 lib
It enables using std::time::Duration natively
2016-01-30 14:03:15 +01:00
Sebastian Thiel
b54acb7c96 fix(rustup): use std::Thread::sleep
However, in sibling libraries, we still use time::Duration, which
now is a part of std::time::Duration.
These should be adjusted, to make the usage of
sleep(Duration::from_millis(d.num_milliseconds() as u64)) into sleep(d)
2016-01-29 18:56:58 +01:00
Curtis McEnroe
61e74d99a2 Fix impl of hyper::net::NetworkStream 2015-11-29 17:55:35 -05:00
Erick Tryzelaar
8179f3bf89 fix(cmn): get cmn compiling on nightly rust
Closes #131
2015-10-18 11:29:34 -07:00
Sebastian Thiel
8dab8c0124 fix(serde): update to latest serde/rust 2015-09-29 11:28:34 +02:00