feat(sdk): re-export through lib.rs

this means that you can now use dagger_sdk::connect() instead of
dagger_sdk::client::connect();
This commit is contained in:
Kasper Juul Hermansen 2023-02-19 15:24:37 +01:00
parent 2695a10f24
commit 986a64cbc7
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
10 changed files with 17 additions and 32 deletions

View File

@ -1,7 +1,7 @@
use dagger_sdk::gen::HostDirectoryOpts;
use dagger_sdk::HostDirectoryOpts;
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let host_source_dir = client.host().directory(
"examples/build-the-application/app".into(),

View File

@ -1,8 +1,8 @@
use dagger_sdk::gen::HostDirectoryOpts;
use dagger_sdk::HostDirectoryOpts;
use rand::Rng;
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let host_source_dir = client.host().directory(
"./examples/caching/app".into(),

View File

@ -3,7 +3,7 @@ use rand::Rng;
fn main() -> eyre::Result<()> {
let mut rng = rand::thread_rng();
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let context_dir = client
.host()

View File

@ -1,5 +1,5 @@
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let version = client
.container(None)

View File

@ -1,8 +1,8 @@
use dagger_sdk::gen::HostDirectoryOpts;
use dagger_sdk::HostDirectoryOpts;
use rand::Rng;
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let host_source_dir = client.host().directory(
"examples/publish-the-application/app".into(),

View File

@ -1,8 +1,8 @@
use dagger_sdk::gen::HostDirectoryOpts;
use dagger_sdk::HostDirectoryOpts;
use rand::Rng;
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let output = "examples/publish-the-application/app/build";
let host_source_dir = client.host().directory(

View File

@ -1,7 +1,7 @@
use dagger_sdk::gen::HostDirectoryOpts;
use dagger_sdk::HostDirectoryOpts;
fn main() -> eyre::Result<()> {
let client = dagger_sdk::client::connect()?;
let client = dagger_sdk::connect()?;
let host_source_dir = client.host().directory(
"examples/test-the-application/app".into(),

View File

@ -1,18 +1,6 @@
pub mod client;
pub mod gen;
mod client;
mod gen;
mod querybuilder;
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
pub use client::*;
pub use gen::*;

View File

@ -1,5 +1,4 @@
use dagger_sdk::client::connect;
use dagger_sdk::gen::ContainerExecOpts;
use dagger_sdk::{connect, ContainerExecOpts};
#[test]
fn test_example_container() {

View File

@ -4,8 +4,6 @@ pub mod cli;
mod cli_generate;
fn main() -> eyre::Result<()> {
//
color_eyre::install().unwrap();
let args = std::env::args();