pub struct TemplateBuilder { /* private fields */ }Expand description
Chainable package-spec template builder.
Implementations§
Source§impl TemplateBuilder
impl TemplateBuilder
Sourcepub fn from_base_image(self) -> Self
pub fn from_base_image(self) -> Self
Start from the Watasu platform base template.
Sourcepub fn from_debian_image(self, variant: impl Into<String>) -> Self
pub fn from_debian_image(self, variant: impl Into<String>) -> Self
Request a Debian public base image.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn from_ubuntu_image(self, variant: impl Into<String>) -> Self
pub fn from_ubuntu_image(self, variant: impl Into<String>) -> Self
Request an Ubuntu public base image.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn from_template(self, template: impl Into<String>) -> Self
pub fn from_template(self, template: impl Into<String>) -> Self
Start from a ready Watasu template slug, tag, or version id.
Sourcepub fn from_python_image(self, version: impl Into<String>) -> Self
pub fn from_python_image(self, version: impl Into<String>) -> Self
Request a Python public base image.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn from_node_image(self, variant: impl Into<String>) -> Self
pub fn from_node_image(self, variant: impl Into<String>) -> Self
Request a Node.js public base image.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn from_bun_image(self, variant: impl Into<String>) -> Self
pub fn from_bun_image(self, variant: impl Into<String>) -> Self
Request a Bun public base image.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn from_image(self, image: impl Into<String>) -> Self
pub fn from_image(self, image: impl Into<String>) -> Self
Request a public container image base.
The Watasu API fails closed until OCI image import is enabled.
Sourcepub fn apt_install<I, S>(self, packages: I) -> Self
pub fn apt_install<I, S>(self, packages: I) -> Self
Add apt packages to the template build.
Sourcepub fn add_mcp_server<I, S>(self, servers: I) -> Self
pub fn add_mcp_server<I, S>(self, servers: I) -> Self
Install MCP servers using an mcp-gateway template base.
Sourcepub fn pip_install<I, S>(self, packages: I) -> Self
pub fn pip_install<I, S>(self, packages: I) -> Self
Add pip packages to the template build.
Sourcepub fn npm_install<I, S>(self, packages: I) -> Self
pub fn npm_install<I, S>(self, packages: I) -> Self
Add global npm packages to the template build.
Sourcepub fn run_cmd(self, command: impl Into<String>) -> Self
pub fn run_cmd(self, command: impl Into<String>) -> Self
Run a shell command during template build.
Sourcepub fn set_workdir(self, workdir: impl Into<String>) -> Self
pub fn set_workdir(self, workdir: impl Into<String>) -> Self
Set the working directory for subsequent setup commands.
Sourcepub fn set_user(self, user: impl Into<String>) -> Self
pub fn set_user(self, user: impl Into<String>) -> Self
Set the user for subsequent setup commands.
Sourcepub fn set_envs(self, env: BTreeMap<String, String>) -> Self
pub fn set_envs(self, env: BTreeMap<String, String>) -> Self
Set environment variables available during template build.
Sourcepub fn set_start_cmd(
self,
start_cmd: impl Into<String>,
ready_cmd: impl Into<String>,
) -> Self
pub fn set_start_cmd( self, start_cmd: impl Into<String>, ready_cmd: impl Into<String>, ) -> Self
Set start and ready-check command metadata on the template.
Sourcepub fn skip_cache(self) -> Self
pub fn skip_cache(self) -> Self
Force the build to skip cache where the platform supports it.
Sourcepub fn build_spec(&self) -> Value
pub fn build_spec(&self) -> Value
Return the snake_case build spec sent to the Watasu API.
Sourcepub fn to_dockerfile(&self) -> String
pub fn to_dockerfile(&self) -> String
Return a Dockerfile-shaped preview of the supported package spec.
Trait Implementations§
Source§impl Clone for TemplateBuilder
impl Clone for TemplateBuilder
Source§fn clone(&self) -> TemplateBuilder
fn clone(&self) -> TemplateBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more