mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-18 05:03:27 +02:00
Compare commits
5 Commits
dagger-sdk
...
fix/gen-st
Author | SHA1 | Date | |
---|---|---|---|
dca142b1e6
|
|||
9677304ff4
|
|||
ec576264fc
|
|||
6ef4bdf587 | |||
b55bcc159f |
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -262,11 +262,9 @@ dependencies = [
|
|||||||
name = "dagger-core"
|
name = "dagger-core"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
|
||||||
"dirs",
|
"dirs",
|
||||||
"eyre",
|
"eyre",
|
||||||
"flate2",
|
"flate2",
|
||||||
"genco",
|
|
||||||
"graphql-introspection-query",
|
"graphql-introspection-query",
|
||||||
"graphql_client",
|
"graphql_client",
|
||||||
"hex",
|
"hex",
|
||||||
@@ -292,7 +290,6 @@ dependencies = [
|
|||||||
"dirs",
|
"dirs",
|
||||||
"eyre",
|
"eyre",
|
||||||
"flate2",
|
"flate2",
|
||||||
"genco",
|
|
||||||
"graphql-introspection-query",
|
"graphql-introspection-query",
|
||||||
"graphql_client",
|
"graphql_client",
|
||||||
"hex",
|
"hex",
|
||||||
|
32
Cargo.toml
32
Cargo.toml
@@ -1,42 +1,20 @@
|
|||||||
[package]
|
|
||||||
name = "dagger-rs"
|
|
||||||
version = "0.2.10"
|
|
||||||
edition = "2021"
|
|
||||||
readme = "README.md"
|
|
||||||
license-file = "LICENSE.MIT"
|
|
||||||
description = "A dagger sdk for rust, written in rust"
|
|
||||||
repository = "https://github.com/kjuulh/dagger-rs"
|
|
||||||
publish = true
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"crates/dagger-codegen",
|
"crates/dagger-codegen",
|
||||||
"crates/dagger-sdk",
|
"crates/dagger-sdk",
|
||||||
"crates/dagger-core",
|
"crates/dagger-core",
|
||||||
|
"crates/dagger-rs",
|
||||||
"ci",
|
"ci",
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[workspace.dependencies]
|
||||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.5" }
|
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.5" }
|
||||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.8" }
|
dagger-core = { path = "crates/dagger-core", version = "^0.2.8" }
|
||||||
|
dagger-rs = { path = "crates/dagger-rs", version = "^0.2.10" }
|
||||||
|
dagger-sdk = { path = "crates/dagger-sdk", version = "^0.2.19" }
|
||||||
|
|
||||||
clap = "4.1.6"
|
|
||||||
dirs = "4.0.0"
|
|
||||||
eyre = "0.6.8"
|
eyre = "0.6.8"
|
||||||
flate2 = { version = "1.0.25", features = ["zlib"] }
|
color-eyre = "0.6.2"
|
||||||
genco = "0.17.3"
|
|
||||||
graphql-introspection-query = "0.2.0"
|
|
||||||
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
|
||||||
hex = "0.4.3"
|
|
||||||
hex-literal = "0.3.4"
|
|
||||||
platform-info = "1.0.2"
|
|
||||||
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
serde = { version = "1.0.152", features = ["derive"] }
|
||||||
serde_json = "1.0.93"
|
serde_json = "1.0.93"
|
||||||
sha2 = "0.10.6"
|
|
||||||
tar = "0.4.38"
|
|
||||||
tempfile = "3.3.0"
|
|
||||||
color-eyre = "0.6.2"
|
|
||||||
tokio = { version = "1.25.0", features = ["full"] }
|
tokio = { version = "1.25.0", features = ["full"] }
|
||||||
|
@@ -3,6 +3,19 @@ command = "cargo"
|
|||||||
args = ["run", "-p", "ci", "--", "codegen"]
|
args = ["run", "-p", "ci", "--", "codegen"]
|
||||||
workspace = false
|
workspace = false
|
||||||
|
|
||||||
|
[tasks.local_codegen]
|
||||||
|
command = "cargo"
|
||||||
|
args = [
|
||||||
|
"run",
|
||||||
|
"-p",
|
||||||
|
"dagger-rs",
|
||||||
|
"--",
|
||||||
|
"generate",
|
||||||
|
"--output",
|
||||||
|
"crates/dagger-sdk/src/gen.rs",
|
||||||
|
]
|
||||||
|
workspace = false
|
||||||
|
|
||||||
[tasks.build]
|
[tasks.build]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["run", "-p", "ci", "--", "ci"]
|
args = ["run", "-p", "ci", "--", "ci"]
|
||||||
@@ -20,6 +33,10 @@ args = ["fix", "--workspace", "--allow-dirty"]
|
|||||||
dependencies = ["fmt"]
|
dependencies = ["fmt"]
|
||||||
workspace = false
|
workspace = false
|
||||||
|
|
||||||
|
[tasks.gen]
|
||||||
|
dependencies = ["local_codegen", "fmt", "fix"]
|
||||||
|
workspace = false
|
||||||
|
|
||||||
[tasks.release_crate]
|
[tasks.release_crate]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = [
|
args = [
|
||||||
|
@@ -10,12 +10,15 @@ publish = true
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
convert_case = "0.6.0"
|
dagger-core = { workspace = true }
|
||||||
dagger-core = { path = "../dagger-core", version = "^0.2.8" }
|
|
||||||
|
eyre = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
eyre = "0.6.8"
|
|
||||||
genco = "0.17.3"
|
genco = "0.17.3"
|
||||||
|
convert_case = "0.6.0"
|
||||||
itertools = "0.10.5"
|
itertools = "0.10.5"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
pretty_assertions = "1.3.0"
|
pretty_assertions = "1.3.0"
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
|
||||||
serde_json = "1.0.93"
|
|
||||||
|
@@ -3,6 +3,7 @@ use dagger_core::introspection::{FullTypeFields, TypeRef};
|
|||||||
use genco::prelude::rust;
|
use genco::prelude::rust;
|
||||||
use genco::quote;
|
use genco::quote;
|
||||||
use genco::tokens::quoted;
|
use genco::tokens::quoted;
|
||||||
|
use itertools::Itertools;
|
||||||
|
|
||||||
use crate::functions::{
|
use crate::functions::{
|
||||||
type_field_has_optional, type_ref_is_enum, type_ref_is_list, type_ref_is_list_of_objects,
|
type_field_has_optional, type_ref_is_enum, type_ref_is_list, type_ref_is_list_of_objects,
|
||||||
@@ -405,6 +406,7 @@ pub fn format_optional_args(
|
|||||||
.map(|t| {
|
.map(|t| {
|
||||||
t.into_iter()
|
t.into_iter()
|
||||||
.filter(|t| type_ref_is_optional(&t.input_value.type_))
|
.filter(|t| type_ref_is_optional(&t.input_value.type_))
|
||||||
|
.sorted_by_key(|val| &val.input_value.name)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
})
|
})
|
||||||
.pipe(|t| render_optional_field_args(funcs, t))
|
.pipe(|t| render_optional_field_args(funcs, t))
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
use dagger_core::introspection::FullType;
|
use dagger_core::introspection::FullType;
|
||||||
use genco::prelude::rust;
|
use genco::prelude::rust;
|
||||||
use genco::quote;
|
use genco::quote;
|
||||||
|
use itertools::Itertools;
|
||||||
|
|
||||||
fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||||
let values = values
|
let values = values
|
||||||
@@ -10,6 +11,7 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
|||||||
.map(|values| {
|
.map(|values| {
|
||||||
values
|
values
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
.sorted_by_key(|a| &a.name)
|
||||||
.map(|val| quote! { $(val.name.as_ref()), })
|
.map(|val| quote! { $(val.name.as_ref()), })
|
||||||
})
|
})
|
||||||
.flatten()
|
.flatten()
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
use dagger_core::introspection::{FullType, FullTypeInputFields};
|
use dagger_core::introspection::{FullType, FullTypeInputFields};
|
||||||
use genco::prelude::rust;
|
use genco::prelude::rust;
|
||||||
use genco::quote;
|
use genco::quote;
|
||||||
|
use itertools::Itertools;
|
||||||
|
|
||||||
use crate::functions::CommonFunctions;
|
use crate::functions::CommonFunctions;
|
||||||
use crate::rust::functions::{format_name, format_struct_name};
|
use crate::rust::functions::{format_name, format_struct_name};
|
||||||
@@ -20,7 +21,10 @@ pub fn render_input_fields(
|
|||||||
funcs: &CommonFunctions,
|
funcs: &CommonFunctions,
|
||||||
fields: &[FullTypeInputFields],
|
fields: &[FullTypeInputFields],
|
||||||
) -> Option<rust::Tokens> {
|
) -> Option<rust::Tokens> {
|
||||||
let rendered_fields = fields.iter().map(|f| render_input_field(funcs, f));
|
let rendered_fields = fields
|
||||||
|
.iter()
|
||||||
|
.sorted_by_key(|val| &val.input_value.name)
|
||||||
|
.map(|f| render_input_field(funcs, f));
|
||||||
|
|
||||||
if rendered_fields.len() == 0 {
|
if rendered_fields.len() == 0 {
|
||||||
None
|
None
|
||||||
|
@@ -10,20 +10,19 @@ publish = true
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "4.1.6"
|
eyre = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
serde_json = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
|
||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
eyre = "0.6.8"
|
|
||||||
flate2 = { version = "1.0.25", features = ["zlib"] }
|
flate2 = { version = "1.0.25", features = ["zlib"] }
|
||||||
genco = "0.17.3"
|
|
||||||
graphql-introspection-query = "0.2.0"
|
graphql-introspection-query = "0.2.0"
|
||||||
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
hex-literal = "0.3.4"
|
hex-literal = "0.3.4"
|
||||||
platform-info = "1.0.2"
|
platform-info = "1.0.2"
|
||||||
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
|
||||||
serde_json = "1.0.93"
|
|
||||||
sha2 = "0.10.6"
|
sha2 = "0.10.6"
|
||||||
tar = "0.4.38"
|
tar = "0.4.38"
|
||||||
tempfile = "3.3.0"
|
tempfile = "3.3.0"
|
||||||
tokio = { version = "1.25.0", features = ["full"] }
|
|
||||||
|
34
crates/dagger-rs/Cargo.toml
Normal file
34
crates/dagger-rs/Cargo.toml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[package]
|
||||||
|
name = "dagger-rs"
|
||||||
|
version = "0.2.10"
|
||||||
|
edition = "2021"
|
||||||
|
readme = "README.md"
|
||||||
|
license-file = "LICENSE.MIT"
|
||||||
|
description = "A dagger sdk for rust, written in rust"
|
||||||
|
repository = "https://github.com/kjuulh/dagger-rs"
|
||||||
|
publish = true
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
dagger-core = { workspace = true }
|
||||||
|
dagger-codegen = { workspace = true }
|
||||||
|
|
||||||
|
eyre = { workspace = true }
|
||||||
|
color-eyre = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
serde_json = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
|
||||||
|
clap = "4.1.6"
|
||||||
|
dirs = "4.0.0"
|
||||||
|
flate2 = { version = "1.0.25", features = ["zlib"] }
|
||||||
|
graphql-introspection-query = "0.2.0"
|
||||||
|
graphql_client = { version = "0.12.0", features = ["reqwest"] }
|
||||||
|
hex = "0.4.3"
|
||||||
|
hex-literal = "0.3.4"
|
||||||
|
platform-info = "1.0.2"
|
||||||
|
reqwest = { version = "0.11.14", features = ["stream", "deflate"] }
|
||||||
|
sha2 = "0.10.6"
|
||||||
|
tar = "0.4.38"
|
||||||
|
tempfile = "3.3.0"
|
@@ -11,15 +11,16 @@ publish = true
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dagger-core = { path = "../dagger-core", version = "^0.2.8" }
|
dagger-core = { workspace = true }
|
||||||
|
|
||||||
|
eyre = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
serde = { workspace = true }
|
||||||
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
base64 = "0.21.0"
|
base64 = "0.21.0"
|
||||||
eyre = "0.6.8"
|
|
||||||
futures = "0.3.27"
|
futures = "0.3.27"
|
||||||
gql_client = "1.0.7"
|
gql_client = "1.0.7"
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
|
||||||
serde_json = { version = "1.0.93", features = ["raw_value"] }
|
|
||||||
tokio = { version = "1.25.0", features = ["full"] }
|
|
||||||
derive_builder = "0.12.0"
|
derive_builder = "0.12.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@@ -111,8 +111,8 @@ pub struct BuildArg {
|
|||||||
}
|
}
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
|
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
|
||||||
pub struct PipelineLabel {
|
pub struct PipelineLabel {
|
||||||
pub value: String,
|
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
pub value: String,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct CacheVolume {
|
pub struct CacheVolume {
|
||||||
@@ -137,13 +137,13 @@ pub struct Container {
|
|||||||
|
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerBuildOpts<'a> {
|
pub struct ContainerBuildOpts<'a> {
|
||||||
|
/// Additional build arguments.
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub build_args: Option<Vec<BuildArg>>,
|
||||||
/// Path to the Dockerfile to use.
|
/// Path to the Dockerfile to use.
|
||||||
/// Default: './Dockerfile'.
|
/// Default: './Dockerfile'.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub dockerfile: Option<&'a str>,
|
pub dockerfile: Option<&'a str>,
|
||||||
/// Additional build arguments.
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub build_args: Option<Vec<BuildArg>>,
|
|
||||||
/// Target build stage to build.
|
/// Target build stage to build.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub target: Option<&'a str>,
|
pub target: Option<&'a str>,
|
||||||
@@ -162,20 +162,20 @@ pub struct ContainerExecOpts<'a> {
|
|||||||
/// Command to run instead of the container's default command (e.g., ["run", "main.go"]).
|
/// Command to run instead of the container's default command (e.g., ["run", "main.go"]).
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub args: Option<Vec<&'a str>>,
|
pub args: Option<Vec<&'a str>>,
|
||||||
/// Content to write to the command's standard input before closing (e.g., "Hello world").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub stdin: Option<&'a str>,
|
|
||||||
/// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub redirect_stdout: Option<&'a str>,
|
|
||||||
/// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub redirect_stderr: Option<&'a str>,
|
|
||||||
/// Provide dagger access to the executed command.
|
/// Provide dagger access to the executed command.
|
||||||
/// Do not use this option unless you trust the command being executed.
|
/// Do not use this option unless you trust the command being executed.
|
||||||
/// The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
/// The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub experimental_privileged_nesting: Option<bool>,
|
pub experimental_privileged_nesting: Option<bool>,
|
||||||
|
/// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub redirect_stderr: Option<&'a str>,
|
||||||
|
/// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub redirect_stdout: Option<&'a str>,
|
||||||
|
/// Content to write to the command's standard input before closing (e.g., "Hello world").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub stdin: Option<&'a str>,
|
||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerExportOpts {
|
pub struct ContainerExportOpts {
|
||||||
@@ -217,15 +217,6 @@ pub struct ContainerWithDirectoryOpts<'a> {
|
|||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerWithExecOpts<'a> {
|
pub struct ContainerWithExecOpts<'a> {
|
||||||
/// Content to write to the command's standard input before closing (e.g., "Hello world").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub stdin: Option<&'a str>,
|
|
||||||
/// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub redirect_stdout: Option<&'a str>,
|
|
||||||
/// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub redirect_stderr: Option<&'a str>,
|
|
||||||
/// Provides dagger access to the executed command.
|
/// Provides dagger access to the executed command.
|
||||||
/// Do not use this option unless you trust the command being executed.
|
/// Do not use this option unless you trust the command being executed.
|
||||||
/// The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
/// The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
|
||||||
@@ -237,15 +228,24 @@ pub struct ContainerWithExecOpts<'a> {
|
|||||||
/// when absolutely necessary and only with trusted commands.
|
/// when absolutely necessary and only with trusted commands.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub insecure_root_capabilities: Option<bool>,
|
pub insecure_root_capabilities: Option<bool>,
|
||||||
|
/// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub redirect_stderr: Option<&'a str>,
|
||||||
|
/// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub redirect_stdout: Option<&'a str>,
|
||||||
|
/// Content to write to the command's standard input before closing (e.g., "Hello world").
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub stdin: Option<&'a str>,
|
||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerWithExposedPortOpts<'a> {
|
pub struct ContainerWithExposedPortOpts<'a> {
|
||||||
/// Transport layer network protocol
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub protocol: Option<NetworkProtocol>,
|
|
||||||
/// Optional port description
|
/// Optional port description
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub description: Option<&'a str>,
|
pub description: Option<&'a str>,
|
||||||
|
/// Transport layer network protocol
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub protocol: Option<NetworkProtocol>,
|
||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerWithFileOpts {
|
pub struct ContainerWithFileOpts {
|
||||||
@@ -256,12 +256,12 @@ pub struct ContainerWithFileOpts {
|
|||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerWithMountedCacheOpts {
|
pub struct ContainerWithMountedCacheOpts {
|
||||||
/// Identifier of the directory to use as the cache volume's root.
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub source: Option<DirectoryId>,
|
|
||||||
/// Sharing mode of the cache volume.
|
/// Sharing mode of the cache volume.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub sharing: Option<CacheSharingMode>,
|
pub sharing: Option<CacheSharingMode>,
|
||||||
|
/// Identifier of the directory to use as the cache volume's root.
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub source: Option<DirectoryId>,
|
||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct ContainerWithNewFileOpts<'a> {
|
pub struct ContainerWithNewFileOpts<'a> {
|
||||||
@@ -1485,6 +1485,9 @@ pub struct Directory {
|
|||||||
|
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct DirectoryDockerBuildOpts<'a> {
|
pub struct DirectoryDockerBuildOpts<'a> {
|
||||||
|
/// Build arguments to use in the build.
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub build_args: Option<Vec<BuildArg>>,
|
||||||
/// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
/// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
|
||||||
/// Defaults: './Dockerfile'.
|
/// Defaults: './Dockerfile'.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
@@ -1492,9 +1495,6 @@ pub struct DirectoryDockerBuildOpts<'a> {
|
|||||||
/// The platform to build.
|
/// The platform to build.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub platform: Option<Platform>,
|
pub platform: Option<Platform>,
|
||||||
/// Build arguments to use in the build.
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub build_args: Option<Vec<BuildArg>>,
|
|
||||||
/// Target build stage to build.
|
/// Target build stage to build.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub target: Option<&'a str>,
|
pub target: Option<&'a str>,
|
||||||
@@ -2073,10 +2073,10 @@ pub struct GitRef {
|
|||||||
|
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct GitRefTreeOpts<'a> {
|
pub struct GitRefTreeOpts<'a> {
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub ssh_known_hosts: Option<&'a str>,
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub ssh_auth_socket: Option<SocketId>,
|
pub ssh_auth_socket: Option<SocketId>,
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub ssh_known_hosts: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GitRef {
|
impl GitRef {
|
||||||
@@ -2480,12 +2480,12 @@ pub struct QueryDirectoryOpts {
|
|||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct QueryGitOpts {
|
pub struct QueryGitOpts {
|
||||||
/// Set to true to keep .git directory.
|
|
||||||
#[builder(setter(into, strip_option), default)]
|
|
||||||
pub keep_git_dir: Option<bool>,
|
|
||||||
/// A service which must be started before the repo is fetched.
|
/// A service which must be started before the repo is fetched.
|
||||||
#[builder(setter(into, strip_option), default)]
|
#[builder(setter(into, strip_option), default)]
|
||||||
pub experimental_service_host: Option<ContainerId>,
|
pub experimental_service_host: Option<ContainerId>,
|
||||||
|
/// Set to true to keep .git directory.
|
||||||
|
#[builder(setter(into, strip_option), default)]
|
||||||
|
pub keep_git_dir: Option<bool>,
|
||||||
}
|
}
|
||||||
#[derive(Builder, Debug, PartialEq)]
|
#[derive(Builder, Debug, PartialEq)]
|
||||||
pub struct QueryHttpOpts {
|
pub struct QueryHttpOpts {
|
||||||
@@ -2849,8 +2849,8 @@ impl Socket {
|
|||||||
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
|
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
|
||||||
pub enum CacheSharingMode {
|
pub enum CacheSharingMode {
|
||||||
LOCKED,
|
LOCKED,
|
||||||
SHARED,
|
|
||||||
PRIVATE,
|
PRIVATE,
|
||||||
|
SHARED,
|
||||||
}
|
}
|
||||||
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
|
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
|
||||||
pub enum NetworkProtocol {
|
pub enum NetworkProtocol {
|
||||||
|
Reference in New Issue
Block a user