Struct dagger_sdk::Query
source · pub struct Query {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl Query
impl Query
sourcepub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume
pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume
Constructs a cache volume for a given cache key.
Arguments
key- A string identifier to target this cache volume (e.g., “modules-cache”).
sourcepub async fn check_version_compatibility(
&self,
version: impl Into<String>
) -> Result<bool, DaggerError>
pub async fn check_version_compatibility( &self, version: impl Into<String> ) -> Result<bool, DaggerError>
Checks if the current Dagger Engine is compatible with an SDK’s required version.
Arguments
version- The SDK’s required version.
sourcepub fn container(&self) -> Container
pub fn container(&self) -> Container
Loads a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder’s host.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn container_opts(&self, opts: QueryContainerOpts) -> Container
pub fn container_opts(&self, opts: QueryContainerOpts) -> Container
Loads a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder’s host.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn default_platform(&self) -> Result<Platform, DaggerError>
pub async fn default_platform(&self) -> Result<Platform, DaggerError>
The default platform of the builder.
sourcepub fn directory(&self) -> Directory
pub fn directory(&self) -> Directory
Load a directory by ID. No argument produces an empty directory.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn directory_opts(&self, opts: QueryDirectoryOpts) -> Directory
pub fn directory_opts(&self, opts: QueryDirectoryOpts) -> Directory
Load a directory by ID. No argument produces an empty directory.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn git(&self, url: impl Into<String>) -> GitRepository
pub fn git(&self, url: impl Into<String>) -> GitRepository
Queries a git repository.
Arguments
url- Url of the git repository. Can be formatted as https://{host}/{owner}/{repo}, git@{host}/{owner}/{repo} Suffix “.git” is optional.opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn git_opts(
&self,
url: impl Into<String>,
opts: QueryGitOpts
) -> GitRepository
pub fn git_opts( &self, url: impl Into<String>, opts: QueryGitOpts ) -> GitRepository
Queries a git repository.
Arguments
url- Url of the git repository. Can be formatted as https://{host}/{owner}/{repo}, git@{host}/{owner}/{repo} Suffix “.git” is optional.opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn http(&self, url: impl Into<String>) -> File
pub fn http(&self, url: impl Into<String>) -> File
Returns a file containing an http remote url content.
Arguments
url- HTTP url to get the content from (e.g., “https://docs.dagger.io”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File
pub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File
Returns a file containing an http remote url content.
Arguments
url- HTTP url to get the content from (e.g., “https://docs.dagger.io”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn pipeline(&self, name: impl Into<String>) -> Query
pub fn pipeline(&self, name: impl Into<String>) -> Query
Creates a named sub-pipeline.
Arguments
name- Pipeline name.opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn pipeline_opts<'a>(
&self,
name: impl Into<String>,
opts: QueryPipelineOpts<'a>
) -> Query
pub fn pipeline_opts<'a>( &self, name: impl Into<String>, opts: QueryPipelineOpts<'a> ) -> Query
Creates a named sub-pipeline.
Arguments
name- Pipeline name.opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn project(&self) -> Project
pub fn project(&self) -> Project
Load a project from ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn project_opts(&self, opts: QueryProjectOpts) -> Project
pub fn project_opts(&self, opts: QueryProjectOpts) -> Project
Load a project from ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn project_command(&self) -> ProjectCommand
pub fn project_command(&self) -> ProjectCommand
Load a project command from ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn project_command_opts(
&self,
opts: QueryProjectCommandOpts
) -> ProjectCommand
pub fn project_command_opts( &self, opts: QueryProjectCommandOpts ) -> ProjectCommand
Load a project command from ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn set_secret(
&self,
name: impl Into<String>,
plaintext: impl Into<String>
) -> Secret
pub fn set_secret( &self, name: impl Into<String>, plaintext: impl Into<String> ) -> Secret
Sets a secret given a user defined name to its plaintext and returns the secret. The plaintext value is limited to a size of 128000 bytes.
Arguments
name- The user defined name for this secretplaintext- The plaintext of the secret
sourcepub fn socket(&self) -> Socket
pub fn socket(&self) -> Socket
Loads a socket by its ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn socket_opts(&self, opts: QuerySocketOpts) -> Socket
pub fn socket_opts(&self, opts: QuerySocketOpts) -> Socket
Loads a socket by its ID.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use