Commit Graph

8 Commits

Author SHA1 Message Date
f29ff836cf 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 18:00:04 +01:00
9762da895a 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 18:00:04 +01:00
94336d0637 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 18:00:04 +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
4a4c03f3c2
feature/add impl (#6)
* format code

* with object gen and args

* add implementation

* add rust generator

* reset generated code

* add basic output

* reset output

* add object

* add format function

* with opts

* fix vec

* add context to unwrap

* fix arguments

* with function body

* first complete generation: Still missing Vec<Obj>

* run full alpine

* add roadmap item
2023-02-17 12:33:16 +01:00
3b5b59ba1c
unpack response 2023-02-11 14:02:20 +01:00
7a008be59e
tested full flow initially 2023-02-05 23:44:06 +01:00