We handle errors gracefully with costum types and minimal amount of
code. Unfortunately, Mime type parsing is very 'flexible', allowing
nonesense types to be passed easily.
Related to #62
It's implemented in a working fashion, except that the default value
is not currently set to something sensible, causing duplicate errors in
case the key-value syntax is wrong.
Related to #61
We are parsing required scalar values and handle parse-errors correctly,
to the point were we make a simple, non-upload doit() call.
It shows that we seem to build invalid calls, for now,but that's nothing
we can't fix once the time is ripe.
Next goals will be related to finalizing the argument parsing code.
Fixes#60
The hub is just using preset types - we will have to implement our own
storage and auth-delegate, as well as a Hub delegate at some point.
Dry run mode allows us to check for errors and use a call builder
using the very same code.
Fixes#57
* if there is no secret file in json format, we write a default one
that we will then read in a second iteration of the loop.
That way, the user has an example of how such a file must look like.
Next step is to cleanup the error type and implement the Error trait.
Fixes#53
* macro 'alias' was renamed to 'rename'
* fixed `cargo test` on main project
The latter pointed me to the serde issue, which would have made
everything fail when actually used to communicate with google servers.
This allows us to build efficiently. CLI programs can now have their
own cmn.rs implementation, which we can test standalone with
`cargo test`.
The primary makefile currently just explicitly pulls in the type-*.yaml,
one day we could possibly put it into a loop.
Fixes#11
* `ResourceMethodsBuilder` -> `MethodsBuilder`. This is now precise
enough. Previously it was just to similar to what's now a
`CallBuilder`
* Fixed whitespace issue in `doit()`
Previously, it would query the size from the wrong dict and obtain
the value 0 all the time. This would have made every upload fail with
`UploadSizeLimitExeeded`.
Now we obtain the actual size limit, and will ignore it if unset/0
for some reason.
Patch += 1
The delegate logic is implemented and seems sound.
It's somewhat funny that after all this back and forth, all we get
is a valid start position for the upload.
That way, 'cmn' becomes our private module. All URLs were updated
to reflect that.
This commit also contains an early implementation of the
'transfer_status' method, which will require plenty of work.
* renamed `*MethodsBuilder` type to `*Methods` type
* renamed `*CallBuilder` type to `*Call` type
* greatly simplified `doit()` signature if uploads are involved
* pass `auth` to upload helper
Layout the `ResumableUploadHelper` and implement the entire logic
with the mbuild renerator.
All that's left to be done is to implement the 'chunked upload' method.
The borrow checker helped me to prevent a bug as well.
* do not emit unused types. Sometimes though, rustc doesn't seem to
detect that attributses are actually used
* ToParts trait is used and implemented only when needed.
Linters are back to 'normal'.
Fixes#35
However, for some reason, the `Serialize/Deserialize` macros don't work
for me, even though they work just fine in the respective tests of
the serge crate. What am I possibly doing wrong ?
Now we use the DefaultDelegate as standin in case there is user-delgate.
That way, we save plenty of complexity as no additional
`if let Some(ref mut dlg) = delegate` is necesary.
Fixes#30
During `begin()`, the delegate receives additional information about the
current call, which can be useful for performance tracking, among
other things.
Fixes#25
* MultiPartReader is using match to handle state, reducing unnecessary
calls to 0 in that regard.
* Fixed seek() calls on readers, assuring they are reset to start each
time the loop is done.
* both media-parameters now use `ReadSeek` streams.
* Use `seek()` to figure out size, simplifying the interface.
Closes#17