From 12507188ca5886572a91750c24c2c2fd8c33d596 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 12 Feb 2023 16:23:49 +0100 Subject: [PATCH] reset generated code --- crates/dagger-sdk/src/gen.rs | 2063 ---------------------------------- 1 file changed, 2063 deletions(-) diff --git a/crates/dagger-sdk/src/gen.rs b/crates/dagger-sdk/src/gen.rs index 81d98c0..8b13789 100644 --- a/crates/dagger-sdk/src/gen.rs +++ b/crates/dagger-sdk/src/gen.rs @@ -1,2064 +1 @@ -use crate::querybuilder::Selection; -use dagger_core::{Boolean, Int, Scalar}; -use dagger_core::connect_params::ConnectParams; -use std::process::Child; -use std::sync::Arc; -// code generated by dagger. DO NOT EDIT. - -/// A global cache volume identifier. -pub struct CacheID(Scalar); - -/// A unique container identifier. Null designates an empty container (scratch). -pub struct ContainerID(Scalar); - -/// A content-addressed directory identifier. -pub struct DirectoryID(Scalar); - -/// A file identifier. -pub struct FileID(Scalar); - -/// The platform config OS and architecture in a Container. -/// The format is [os]/[platform]/[version] (e.g. darwin/arm64/v7, windows/amd64, linux/arm64). -pub struct Platform(Scalar); - -/// A unique identifier for a secret. -pub struct SecretID(Scalar); - -/// A content-addressed socket identifier. -pub struct SocketID(Scalar); - -/// -pub struct BuildArg { - pub name: String, - - pub value: String, -} - - -/// A directory whose contents persist across runs. -pub struct CacheVolume { - pub conn: ConnectParams, - pub proc: Arc, - pub selection: Selection, -} - -impl CacheVolume { - pub fn id( - &self, - ) -> CacheID { - let query = self.selection.select("id"); - - CacheID { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } -} - -/// Initializes this container from a Dockerfile build, using the context, a dockerfile file path and some additional buildArgs. -pub struct BuildArgs { - /// * `context` - Directory context used by the Dockerfile. - pub context: DirectoryID, - /// * `dockerfile` - Path to the Dockerfile to use. - /// Defaults to './Dockerfile'. - pub dockerfile: Option, - /// * `buildArgs` - Additional build arguments. - pub build_args: Option>, - /// * `target` - Target build stage to build. - pub target: Option, -} - - -/// Retrieves a directory at the given path. Mounts are included. -pub struct DirectoryArgs { - pub path: String, -} - - -/// Retrieves the value of the specified environment variable. -pub struct EnvVariableArgs { - pub name: String, -} - - -/// Retrieves this container after executing the specified command inside it. -pub struct ExecArgs { - /// * `args` - Command to run instead of the container's default command. - pub args: Option>, - /// * `stdin` - Content to write to the command's standard input before closing. - pub stdin: Option, - /// * `redirectStdout` - Redirect the command's standard output to a file in the container. - pub redirect_stdout: Option, - /// * `redirectStderr` - Redirect the command's standard error to a file in the container. - pub redirect_stderr: Option, - /// * `experimentalPrivilegedNesting` - Provide dagger access to the executed command. - /// 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. - pub experimental_privileged_nesting: Option, -} - - -/// Writes the container as an OCI tarball to the destination file path on the host for the specified platformVariants. -/// Return true on success. -pub struct ExportArgs { - /// * `path` - Host's destination path. - /// Path can be relative to the engine's workdir or absolute. - pub path: String, - /// * `platformVariants` - Identifiers for other platform specific containers. - /// Used for multi-platform image. - pub platform_variants: Option>, -} - - -/// Retrieves a file at the given path. Mounts are included. -pub struct FileArgs { - pub path: String, -} - - -/// Initializes this container from the base image published at the given address. -pub struct FromArgs { - /// * `address` - Image's address from its registry. - /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). - pub address: String, -} - - -/// Retrieves the value of the specified label. -pub struct LabelArgs { - pub name: String, -} - - -/// Creates a named sub-pipeline -pub struct PipelineArgs { - pub name: String, - pub description: Option, -} - - -/// Publishes this container as a new image to the specified address, for the platformVariants, returning a fully qualified ref. -pub struct PublishArgs { - /// * `address` - Registry's address to publish the image to. - /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). - pub address: String, - /// * `platformVariants` - Identifiers for other platform specific containers. - /// Used for multi-platform image. - pub platform_variants: Option>, -} - - -/// Configures default arguments for future commands. -pub struct WithDefaultArgsArgs { - pub args: Option>, -} - - -/// Retrieves this container plus a directory written at the given path. -pub struct WithDirectoryArgs { - pub path: String, - pub directory: DirectoryID, - pub exclude: Option>, - pub include: Option>, -} - - -/// Retrieves this container but with a different command entrypoint. -pub struct WithEntrypointArgs { - pub args: Vec, -} - - -/// Retrieves this container plus the given environment variable. -pub struct WithEnvVariableArgs { - pub name: String, - pub value: String, -} - - -/// Retrieves this container after executing the specified command inside it. -pub struct WithExecArgs { - /// * `args` - Command to run instead of the container's default command. - pub args: Vec, - /// * `stdin` - Content to write to the command's standard input before closing. - pub stdin: Option, - /// * `redirectStdout` - Redirect the command's standard output to a file in the container. - pub redirect_stdout: Option, - /// * `redirectStderr` - Redirect the command's standard error to a file in the container. - pub redirect_stderr: Option, - /// * `experimentalPrivilegedNesting` - Provide dagger access to the executed command. - /// 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. - pub experimental_privileged_nesting: Option, -} - - -/// Initializes this container from this DirectoryID. -pub struct WithFsArgs { - pub id: DirectoryID, -} - - -/// Retrieves this container plus the contents of the given file copied to the given path. -pub struct WithFileArgs { - pub path: String, - pub source: FileID, - pub permissions: Option, -} - - -/// Retrieves this container plus the given label. -pub struct WithLabelArgs { - pub name: String, - pub value: String, -} - - -/// Retrieves this container plus a cache volume mounted at the given path. -pub struct WithMountedCacheArgs { - pub path: String, - pub cache: CacheID, - pub source: Option, -} - - -/// Retrieves this container plus a directory mounted at the given path. -pub struct WithMountedDirectoryArgs { - pub path: String, - pub source: DirectoryID, -} - - -/// Retrieves this container plus a file mounted at the given path. -pub struct WithMountedFileArgs { - pub path: String, - pub source: FileID, -} - - -/// Retrieves this container plus a secret mounted into a file at the given path. -pub struct WithMountedSecretArgs { - pub path: String, - pub source: SecretID, -} - - -/// Retrieves this container plus a temporary directory mounted at the given path. -pub struct WithMountedTempArgs { - pub path: String, -} - - -/// Retrieves this container plus a new file written at the given path. -pub struct WithNewFileArgs { - pub path: String, - pub contents: Option, - pub permissions: Option, -} - - -/// Initializes this container from this DirectoryID. -pub struct WithRootfsArgs { - pub id: DirectoryID, -} - - -/// Retrieves this container plus an env variable containing the given secret. -pub struct WithSecretVariableArgs { - pub name: String, - pub secret: SecretID, -} - - -/// Retrieves this container plus a socket forwarded to the given Unix socket path. -pub struct WithUnixSocketArgs { - pub path: String, - pub source: SocketID, -} - - -/// Retrieves this containers with a different command user. -pub struct WithUserArgs { - pub name: String, -} - - -/// Retrieves this container with a different working directory. -pub struct WithWorkdirArgs { - pub path: String, -} - - -/// Retrieves this container minus the given environment variable. -pub struct WithoutEnvVariableArgs { - pub name: String, -} - - -/// Retrieves this container minus the given environment label. -pub struct WithoutLabelArgs { - pub name: String, -} - - -/// Retrieves this container after unmounting everything at the given path. -pub struct WithoutMountArgs { - pub path: String, -} - - -/// Retrieves this container with a previously added Unix socket removed. -pub struct WithoutUnixSocketArgs { - pub path: String, -} - - -/// An OCI-compatible container, also known as a docker container. -pub struct Container { - pub conn: ConnectParams, - pub proc: Arc, - pub selection: Selection, -} - -impl Container { - pub fn build( - &self, - args: &BuildArgs - ) -> Container { - let query = self.selection.select("build"); - query.args(args); - - Container { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn default_args( - &self, - ) -> Option> { - let query = self.selection.select("defaultArgs"); - - Option> { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn directory( - &self, - args: &DirectoryArgs - ) -> Directory { - let query = self.selection.select("directory"); - query.args(args); - - Directory { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn entrypoint( - &self, - ) -> Option> { - let query = self.selection.select("entrypoint"); - - Option> { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn env_variable( - &self, - args: &EnvVariableArgs - ) -> Option { - let query = self.selection.select("envVariable"); - query.args(args); - - query.execute(&graphql_client(&self.conn)).unwrap() - } - - pub fn env_variables( - &self, - ) -> Vec { - let query = self.selection.select("envVariables"); - - Vec { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn exec( - &self, - args: &ExecArgs - ) -> Container { - let query = self.selection.select("exec"); - query.args(args); - - Container { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn exit_code( - &self, - ) -> Option { - let query = self.selection.select("exitCode"); - - query.execute(&graphql_client(&self.conn)).unwrap() - } - - pub fn export( - &self, - args: &ExportArgs - ) -> Boolean { - let query = self.selection.select("export"); - query.args(args); - - Boolean { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn file( - &self, - args: &FileArgs - ) -> File { - let query = self.selection.select("file"); - query.args(args); - - File { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn from( - &self, - args: &FromArgs - ) -> Container { - let query = self.selection.select("from"); - query.args(args); - - Container { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn fs( - &self, - ) -> Directory { - let query = self.selection.select("fs"); - - Directory { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn id( - &self, - ) -> ContainerID { - let query = self.selection.select("id"); - - ContainerID { - conn: self.conn.clone(), - proc: self.proc.clone(), - selection: query, - } - } - - pub fn label( - &self, - args: &LabelArgs - ) -> Option { - let query = self.selection.select("label"); - query.args(args); - - query.execute(&graphql_client(&self.conn)).unwrap() - } - - pub fn labels( - &self, - ) -> Vec