mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-12-29 11:11:02 +01:00
Compare commits
4 Commits
199fe16dbf
...
v0.2.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
1638f15fba
|
|||
| 10bc6f3846 | |||
| 6e5f407432 | |||
|
3cb83bb79c
|
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
with:
|
||||
path: "~/.cargo/bin/\n~/.cargo/registry/index/\n~/.cargo/registry/cache/\n~/.cargo/git/db/\ntarget/"
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-
|
||||
restore-keys: ${{ runner.os }}-cargo
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
|
||||
25
CHANGELOG.md
25
CHANGELOG.md
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.8 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-f42da8416a5450c7c3c924353c3cc9112afd18f0/> with sccache
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 2 commits contributed to the release.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- with sccache ([`f42da84`](https://github.com/kjuulh/dagger-rs/commit/f42da8416a5450c7c3c924353c3cc9112afd18f0))
|
||||
- test change ([`98781f2`](https://github.com/kjuulh/dagger-rs/commit/98781f2496deaea4bc13c9e90e60543b7daac9d7))
|
||||
</details>
|
||||
|
||||
## v0.2.7 (2023-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
56
Cargo.lock
generated
56
Cargo.lock
generated
@@ -245,10 +245,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dagger-codegen"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2",
|
||||
"eyre",
|
||||
"genco",
|
||||
"itertools",
|
||||
@@ -257,28 +257,6 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
"eyre",
|
||||
"flate2",
|
||||
"genco",
|
||||
"graphql-introspection-query",
|
||||
"graphql_client",
|
||||
"hex",
|
||||
"hex-literal",
|
||||
"platform-info",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"tar",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.1"
|
||||
@@ -303,14 +281,36 @@ dependencies = [
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dagger-core"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
||||
"eyre",
|
||||
"flate2",
|
||||
"genco",
|
||||
"graphql-introspection-query",
|
||||
"graphql_client",
|
||||
"hex",
|
||||
"hex-literal",
|
||||
"platform-info",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"tar",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dagger-rs"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"color-eyre",
|
||||
"dagger-codegen",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2",
|
||||
"dirs",
|
||||
"eyre",
|
||||
"flate2",
|
||||
@@ -333,7 +333,7 @@ name = "dagger-sdk"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"dagger-core 0.2.1",
|
||||
"dagger-core 0.2.2",
|
||||
"eyre",
|
||||
"futures",
|
||||
"genco",
|
||||
@@ -352,7 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91342638dfdcd44ca5d3a2cc1b962e3f2c0e461487e90fe62972ef31df74c061"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"dagger-core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dagger-core 0.2.1",
|
||||
"eyre",
|
||||
"futures",
|
||||
"genco",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-rs"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -19,8 +19,8 @@ members = [
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.1" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.1" }
|
||||
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.2" }
|
||||
dagger-core = { path = "crates/dagger-core", version = "^0.2.2" }
|
||||
|
||||
clap = "4.1.6"
|
||||
dirs = "4.0.0"
|
||||
|
||||
@@ -97,6 +97,7 @@ fn get_dependencies(client: Arc<Query>) -> Container {
|
||||
|
||||
let cache_cargo_index_dir = client.cache_volume("cargo_index".into());
|
||||
let cache_cargo_deps = client.cache_volume("cargo_deps".into());
|
||||
let cache_cargo_bin = client.cache_volume("cargo_bin_cache".into());
|
||||
|
||||
let minio_url = "https://github.com/mozilla/sccache/releases/download/v0.3.3/sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz".into();
|
||||
|
||||
@@ -151,6 +152,11 @@ fn get_dependencies(client: Arc<Query>) -> Container {
|
||||
"SCCACHE_ENDPOINT".into(),
|
||||
"https://api-minio.front.kjuulh.io".into(),
|
||||
)
|
||||
.with_mounted_cache("~/.cargo/bin".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/registry/index".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/registry/cache".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("~/.cargo/git/db".into(), cache_cargo_bin.id(), None)
|
||||
.with_mounted_cache("target/".into(), cache_cargo_bin.id(), None)
|
||||
.with_exec(
|
||||
vec!["cargo".into(), "install".into(), "cargo-chef".into()],
|
||||
None,
|
||||
|
||||
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.2 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 1 commit contributed to the release.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
|
||||
<csr-id-6afe141d34308f18f9d46419931d2c9b822a7aef/>
|
||||
@@ -21,7 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 34 commits contributed to the release over the course of 20 calendar days.
|
||||
- 35 commits contributed to the release over the course of 20 calendar days.
|
||||
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
@@ -36,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- remove toolchain ([`f034528`](https://github.com/kjuulh/dagger-rs/commit/f03452840cf9260cd1d5e5aa8d7ee2897384c745))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-codegen"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
@@ -11,7 +11,7 @@ publish = true
|
||||
|
||||
[dependencies]
|
||||
convert_case = "0.6.0"
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.1" }
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
|
||||
|
||||
eyre = "0.6.8"
|
||||
genco = "0.17.3"
|
||||
|
||||
@@ -10,7 +10,7 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||
.map(|values| {
|
||||
values
|
||||
.into_iter()
|
||||
.map(|val| quote! { $(val.name.as_ref()) })
|
||||
.map(|val| quote! { $(val.name.as_ref()), })
|
||||
})
|
||||
.flatten()
|
||||
.collect::<Vec<_>>();
|
||||
@@ -25,7 +25,10 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||
}
|
||||
|
||||
pub fn render_enum(t: &FullType) -> eyre::Result<rust::Tokens> {
|
||||
let serialize = rust::import("serde", "Serialize");
|
||||
|
||||
Ok(quote! {
|
||||
#[derive($serialize)]
|
||||
pub enum $(t.name.as_ref()) {
|
||||
$(render_enum_values(t))
|
||||
}
|
||||
|
||||
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.2 (2023-02-19)
|
||||
|
||||
### New Features
|
||||
|
||||
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
|
||||
|
||||
### Commit Statistics
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 1 commit contributed to the release.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 0 issues like '(#ID)' were seen in commit messages
|
||||
|
||||
### Commit Details
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
<details><summary>view details</summary>
|
||||
|
||||
* **Uncategorized**
|
||||
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
|
||||
</details>
|
||||
|
||||
## v0.2.1 (2023-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -15,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
<csr-read-only-do-not-edit/>
|
||||
|
||||
- 15 commits contributed to the release over the course of 19 calendar days.
|
||||
- 16 commits contributed to the release over the course of 19 calendar days.
|
||||
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
|
||||
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
|
||||
|
||||
@@ -30,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
|
||||
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
|
||||
* **Uncategorized**
|
||||
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
|
||||
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
|
||||
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
|
||||
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dagger-core"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
license-file = "LICENSE.MIT"
|
||||
|
||||
@@ -12,7 +12,7 @@ impl Engine {
|
||||
}
|
||||
|
||||
fn from_cli(&self, cfg: &Config) -> eyre::Result<(ConnectParams, Child)> {
|
||||
let cli = Downloader::new("0.3.10".into())?.get_cli()?;
|
||||
let cli = Downloader::new("0.3.12".into())?.get_cli()?;
|
||||
|
||||
let cli_session = CliSession::new();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ publish = true
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.21.0"
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.1" }
|
||||
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
|
||||
eyre = "0.6.8"
|
||||
futures = "0.3.26"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct CacheVolume {
|
||||
|
||||
impl CacheVolume {
|
||||
pub fn id(&self) -> CacheId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -82,6 +82,7 @@ pub struct ContainerWithFileOpts {
|
||||
}
|
||||
pub struct ContainerWithMountedCacheOpts {
|
||||
pub source: Option<DirectoryId>,
|
||||
pub sharing: Option<CacheSharingMode>,
|
||||
}
|
||||
pub struct ContainerWithNewFileOpts {
|
||||
pub contents: Option<String>,
|
||||
@@ -112,7 +113,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn default_args(&self) -> Vec<String> {
|
||||
let query = self.selection.select("defaultArgs");
|
||||
let mut query = self.selection.select("defaultArgs");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -128,7 +129,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn entrypoint(&self) -> Vec<String> {
|
||||
let query = self.selection.select("entrypoint");
|
||||
let mut query = self.selection.select("entrypoint");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -140,7 +141,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn env_variables(&self) -> Vec<EnvVariable> {
|
||||
let query = self.selection.select("envVariables");
|
||||
let mut query = self.selection.select("envVariables");
|
||||
|
||||
return vec![EnvVariable {
|
||||
proc: self.proc.clone(),
|
||||
@@ -181,7 +182,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn exit_code(&self) -> isize {
|
||||
let query = self.selection.select("exitCode");
|
||||
let mut query = self.selection.select("exitCode");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -220,7 +221,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn fs(&self) -> Directory {
|
||||
let query = self.selection.select("fs");
|
||||
let mut query = self.selection.select("fs");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -229,7 +230,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn id(&self) -> ContainerId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -241,7 +242,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn labels(&self) -> Vec<Label> {
|
||||
let query = self.selection.select("labels");
|
||||
let mut query = self.selection.select("labels");
|
||||
|
||||
return vec![Label {
|
||||
proc: self.proc.clone(),
|
||||
@@ -250,7 +251,7 @@ impl Container {
|
||||
}];
|
||||
}
|
||||
pub fn mounts(&self) -> Vec<String> {
|
||||
let query = self.selection.select("mounts");
|
||||
let mut query = self.selection.select("mounts");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -271,7 +272,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn platform(&self) -> Platform {
|
||||
let query = self.selection.select("platform");
|
||||
let mut query = self.selection.select("platform");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -288,7 +289,7 @@ impl Container {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn rootfs(&self) -> Directory {
|
||||
let query = self.selection.select("rootfs");
|
||||
let mut query = self.selection.select("rootfs");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -297,17 +298,17 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn stderr(&self) -> String {
|
||||
let query = self.selection.select("stderr");
|
||||
let mut query = self.selection.select("stderr");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn stdout(&self) -> String {
|
||||
let query = self.selection.select("stdout");
|
||||
let mut query = self.selection.select("stdout");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn user(&self) -> String {
|
||||
let query = self.selection.select("user");
|
||||
let mut query = self.selection.select("user");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -463,6 +464,9 @@ impl Container {
|
||||
if let Some(source) = opts.source {
|
||||
query = query.arg("source", source).unwrap();
|
||||
}
|
||||
if let Some(sharing) = opts.sharing {
|
||||
query = query.arg("sharing", sharing).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
return Container {
|
||||
@@ -537,6 +541,24 @@ impl Container {
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn with_registry_auth(
|
||||
&self,
|
||||
address: String,
|
||||
username: String,
|
||||
secret: SecretId,
|
||||
) -> Container {
|
||||
let mut query = self.selection.select("withRegistryAuth");
|
||||
|
||||
query = query.arg("address", address).unwrap();
|
||||
query = query.arg("username", username).unwrap();
|
||||
query = query.arg("secret", secret).unwrap();
|
||||
|
||||
return Container {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn with_rootfs(&self, id: DirectoryId) -> Container {
|
||||
let mut query = self.selection.select("withRootfs");
|
||||
|
||||
@@ -627,6 +649,17 @@ impl Container {
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn without_registry_auth(&self, address: String) -> Container {
|
||||
let mut query = self.selection.select("withoutRegistryAuth");
|
||||
|
||||
query = query.arg("address", address).unwrap();
|
||||
|
||||
return Container {
|
||||
proc: self.proc.clone(),
|
||||
selection: query,
|
||||
conn: self.conn.clone(),
|
||||
};
|
||||
}
|
||||
pub fn without_unix_socket(&self, path: String) -> Container {
|
||||
let mut query = self.selection.select("withoutUnixSocket");
|
||||
|
||||
@@ -639,7 +672,7 @@ impl Container {
|
||||
};
|
||||
}
|
||||
pub fn workdir(&self) -> String {
|
||||
let query = self.selection.select("workdir");
|
||||
let mut query = self.selection.select("workdir");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -753,7 +786,7 @@ impl Directory {
|
||||
};
|
||||
}
|
||||
pub fn id(&self) -> DirectoryId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -915,12 +948,12 @@ pub struct EnvVariable {
|
||||
|
||||
impl EnvVariable {
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -933,7 +966,7 @@ pub struct File {
|
||||
|
||||
impl File {
|
||||
pub fn contents(&self) -> String {
|
||||
let query = self.selection.select("contents");
|
||||
let mut query = self.selection.select("contents");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -945,12 +978,12 @@ impl File {
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn id(&self) -> FileId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn secret(&self) -> Secret {
|
||||
let query = self.selection.select("secret");
|
||||
let mut query = self.selection.select("secret");
|
||||
|
||||
return Secret {
|
||||
proc: self.proc.clone(),
|
||||
@@ -959,7 +992,7 @@ impl File {
|
||||
};
|
||||
}
|
||||
pub fn size(&self) -> isize {
|
||||
let query = self.selection.select("size");
|
||||
let mut query = self.selection.select("size");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -988,7 +1021,7 @@ pub struct GitRefTreeOpts {
|
||||
|
||||
impl GitRef {
|
||||
pub fn digest(&self) -> String {
|
||||
let query = self.selection.select("digest");
|
||||
let mut query = self.selection.select("digest");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1030,7 +1063,7 @@ impl GitRepository {
|
||||
};
|
||||
}
|
||||
pub fn branches(&self) -> Vec<String> {
|
||||
let query = self.selection.select("branches");
|
||||
let mut query = self.selection.select("branches");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1057,7 +1090,7 @@ impl GitRepository {
|
||||
};
|
||||
}
|
||||
pub fn tags(&self) -> Vec<String> {
|
||||
let query = self.selection.select("tags");
|
||||
let mut query = self.selection.select("tags");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1146,7 +1179,7 @@ pub struct HostVariable {
|
||||
|
||||
impl HostVariable {
|
||||
pub fn secret(&self) -> Secret {
|
||||
let query = self.selection.select("secret");
|
||||
let mut query = self.selection.select("secret");
|
||||
|
||||
return Secret {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1155,7 +1188,7 @@ impl HostVariable {
|
||||
};
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1168,12 +1201,12 @@ pub struct Label {
|
||||
|
||||
impl Label {
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn value(&self) -> String {
|
||||
let query = self.selection.select("value");
|
||||
let mut query = self.selection.select("value");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1186,7 +1219,7 @@ pub struct Project {
|
||||
|
||||
impl Project {
|
||||
pub fn extensions(&self) -> Vec<Project> {
|
||||
let query = self.selection.select("extensions");
|
||||
let mut query = self.selection.select("extensions");
|
||||
|
||||
return vec![Project {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1195,7 +1228,7 @@ impl Project {
|
||||
}];
|
||||
}
|
||||
pub fn generated_code(&self) -> Directory {
|
||||
let query = self.selection.select("generatedCode");
|
||||
let mut query = self.selection.select("generatedCode");
|
||||
|
||||
return Directory {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1204,22 +1237,22 @@ impl Project {
|
||||
};
|
||||
}
|
||||
pub fn install(&self) -> bool {
|
||||
let query = self.selection.select("install");
|
||||
let mut query = self.selection.select("install");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn name(&self) -> String {
|
||||
let query = self.selection.select("name");
|
||||
let mut query = self.selection.select("name");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn schema(&self) -> String {
|
||||
let query = self.selection.select("schema");
|
||||
let mut query = self.selection.select("schema");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn sdk(&self) -> String {
|
||||
let query = self.selection.select("sdk");
|
||||
let mut query = self.selection.select("sdk");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1278,7 +1311,7 @@ impl Query {
|
||||
};
|
||||
}
|
||||
pub fn default_platform(&self) -> Platform {
|
||||
let query = self.selection.select("defaultPlatform");
|
||||
let mut query = self.selection.select("defaultPlatform");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1325,7 +1358,7 @@ impl Query {
|
||||
};
|
||||
}
|
||||
pub fn host(&self) -> Host {
|
||||
let query = self.selection.select("host");
|
||||
let mut query = self.selection.select("host");
|
||||
|
||||
return Host {
|
||||
proc: self.proc.clone(),
|
||||
@@ -1406,12 +1439,12 @@ pub struct Secret {
|
||||
|
||||
impl Secret {
|
||||
pub fn id(&self) -> SecretId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
pub fn plaintext(&self) -> String {
|
||||
let query = self.selection.select("plaintext");
|
||||
let mut query = self.selection.select("plaintext");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
@@ -1424,8 +1457,14 @@ pub struct Socket {
|
||||
|
||||
impl Socket {
|
||||
pub fn id(&self) -> SocketId {
|
||||
let query = self.selection.select("id");
|
||||
let mut query = self.selection.select("id");
|
||||
|
||||
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
|
||||
}
|
||||
}
|
||||
#[derive(Serialize)]
|
||||
pub enum CacheSharingMode {
|
||||
SHARED,
|
||||
PRIVATE,
|
||||
LOCKED,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user