mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-25 16:32:42 +01:00
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:
parent
de063eae85
commit
19ed6c267f
@ -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(),
|
||||
|
@ -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(),
|
||||
|
@ -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()
|
||||
|
@ -1,5 +1,5 @@
|
||||
fn main() -> eyre::Result<()> {
|
||||
let client = dagger_sdk::client::connect()?;
|
||||
let client = dagger_sdk::connect()?;
|
||||
|
||||
let version = client
|
||||
.container(None)
|
||||
|
@ -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(),
|
||||
|
@ -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(
|
||||
|
@ -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(),
|
||||
|
@ -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::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
use dagger_sdk::client::connect;
|
||||
use dagger_sdk::gen::ContainerExecOpts;
|
||||
use dagger_sdk::{connect, ContainerExecOpts};
|
||||
|
||||
#[test]
|
||||
fn test_example_container() {
|
||||
|
@ -4,8 +4,6 @@ pub mod cli;
|
||||
mod cli_generate;
|
||||
|
||||
fn main() -> eyre::Result<()> {
|
||||
//
|
||||
|
||||
color_eyre::install().unwrap();
|
||||
|
||||
let args = std::env::args();
|
||||
|
Loading…
Reference in New Issue
Block a user