mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-22 23:32:12 +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
2695a10f24
commit
986a64cbc7
@ -1,7 +1,7 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/build-the-application/app".into(),
|
"examples/build-the-application/app".into(),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"./examples/caching/app".into(),
|
"./examples/caching/app".into(),
|
||||||
|
@ -3,7 +3,7 @@ use rand::Rng;
|
|||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let context_dir = client
|
let context_dir = client
|
||||||
.host()
|
.host()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let version = client
|
let version = client
|
||||||
.container(None)
|
.container(None)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/publish-the-application/app".into(),
|
"examples/publish-the-application/app".into(),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
let output = "examples/publish-the-application/app/build";
|
let output = "examples/publish-the-application/app/build";
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/test-the-application/app".into(),
|
"examples/test-the-application/app".into(),
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
pub mod client;
|
mod client;
|
||||||
pub mod gen;
|
mod gen;
|
||||||
mod querybuilder;
|
mod querybuilder;
|
||||||
|
|
||||||
pub fn add(left: usize, right: usize) -> usize {
|
pub use client::*;
|
||||||
left + right
|
pub use gen::*;
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = add(2, 2);
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use dagger_sdk::client::connect;
|
use dagger_sdk::{connect, ContainerExecOpts};
|
||||||
use dagger_sdk::gen::ContainerExecOpts;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_example_container() {
|
fn test_example_container() {
|
||||||
|
@ -4,8 +4,6 @@ pub mod cli;
|
|||||||
mod cli_generate;
|
mod cli_generate;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
//
|
|
||||||
|
|
||||||
color_eyre::install().unwrap();
|
color_eyre::install().unwrap();
|
||||||
|
|
||||||
let args = std::env::args();
|
let args = std::env::args();
|
||||||
|
Loading…
Reference in New Issue
Block a user