Commit Graph

7 Commits

Author SHA1 Message Date
57ecf97d23
feat(sdk): without Some in _opts functions
Option has been removed as a wrapper around opts. This makes it much
more convenient to use

```rust
client.container_opts(Some(ContainerOpts{}))
// ->
client.container_opts(ContainerOpts{})
```

The same options are still available, either an empty object can be
passed, or a non _opts function can be used
2023-02-19 17:49:22 +01:00
6779808322
feat(sdk): with _opts methods
Now all opt values enter into a _opts function instead of the original.
This avoids a lot of verbosity for both None in the case opts are
unwanted, and Some() if they actually are.

They are used like so:

```rust
client.container().from("...");
client.container_opts(Some(ContainerOpts{ ... }))
```

Some from opts will be removed in a future commit/pr
2023-02-19 17:43:12 +01:00
b25b350d90
fix(sdk): without phantom data 2023-02-19 17:30:03 +01:00
c14cd64453
feat(sdk): move to &str instead of String and introduce builder.
This will make the api much easier to use, as we can now rely on ""
instead of "".into() for normal string values.

Introduced builder as well, which makes it much easier to use *Opts, as
it can handle the building of that, and get the benefits from String ->
&str, as that is currently not allowed for optional values
2023-02-19 17:21:40 +01:00
19ed6c267f feat(sdk): re-export through lib.rs
this means that you can now use dagger_sdk::connect() instead of
dagger_sdk::client::connect();
2023-02-19 15:29:03 +01:00
de063eae85 feat(sdk): with return result instead of unwrap 2023-02-19 15:29:03 +01:00
cb9a4dd84f
add test-the-application 2023-02-17 15:34:18 +01:00