Struct dagger_sdk::Query
source · pub struct Query {
pub proc: Arc<Child>,
pub selection: Selection,
pub conn: ConnectParams,
}Fields§
§proc: Arc<Child>§selection: Selection§conn: ConnectParamsImplementations§
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 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>
pub async fn default_platform(&self) -> Result<Platform>
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
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
opt- optional argument, see inner type for documentation, use_opts to use
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