mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-12-23 10:44:09 +01:00
fix description
This commit is contained in:
parent
f4a812a7d2
commit
f4581ba4cd
@ -42,7 +42,7 @@ pub fn render_description_from_input_value(t: &InputValue, name: &String) -> Opt
|
||||
output.push();
|
||||
}
|
||||
|
||||
for line in lines {
|
||||
for line in lines.iter().skip(1) {
|
||||
output.append(quote! {
|
||||
$(format!("/// {line}"))
|
||||
});
|
||||
|
@ -2,28 +2,28 @@ use dagger_core::{Boolean, Input, Int, Scalar};
|
||||
|
||||
// code generated by dagger. DO NOT EDIT.
|
||||
|
||||
/// A content-addressed socket identifier.
|
||||
pub struct SocketID(Scalar);
|
||||
|
||||
/// A unique identifier for a secret.
|
||||
pub struct SecretID(Scalar);
|
||||
|
||||
/// A unique container identifier. Null designates an empty container (scratch).
|
||||
pub struct ContainerID(Scalar);
|
||||
|
||||
/// A content-addressed directory identifier.
|
||||
pub struct DirectoryID(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 global cache volume identifier.
|
||||
pub struct CacheID(Scalar);
|
||||
|
||||
/// A file identifier.
|
||||
pub struct FileID(Scalar);
|
||||
|
||||
/// A content-addressed directory identifier.
|
||||
pub struct DirectoryID(Scalar);
|
||||
|
||||
/// A unique container identifier. Null designates an empty container (scratch).
|
||||
pub struct ContainerID(Scalar);
|
||||
|
||||
/// A content-addressed socket identifier.
|
||||
pub struct SocketID(Scalar);
|
||||
|
||||
/// A global cache volume identifier.
|
||||
pub struct CacheID(Scalar);
|
||||
|
||||
///
|
||||
pub struct BuildArg {
|
||||
pub name: String,
|
||||
@ -33,385 +33,6 @@ pub struct BuildArg {
|
||||
|
||||
impl Input for BuildArg {}
|
||||
|
||||
/// A directory.
|
||||
pub struct Directory {}
|
||||
|
||||
impl Directory {
|
||||
/// Gets the difference between this directory and an another directory.
|
||||
pub fn diff(&self, other: DirectoryID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a directory at the given path.
|
||||
pub fn directory(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Builds a new Docker container from this directory.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `dockerfile` - Path to the Dockerfile to use.
|
||||
/// Path to the Dockerfile to use.
|
||||
/// Defaults to './Dockerfile'.
|
||||
/// * `platform` - The platform to build.
|
||||
/// The platform to build.
|
||||
/// * `buildArgs` - Additional build arguments.
|
||||
/// Additional build arguments.
|
||||
/// * `target` - Target build stage to build.
|
||||
/// Target build stage to build.
|
||||
pub fn docker_build(
|
||||
&self,
|
||||
dockerfile: String,
|
||||
platform: Platform,
|
||||
build_args: Vec<BuildArg>,
|
||||
target: String,
|
||||
) -> Container {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns a list of files and directories at the given path.
|
||||
pub fn entries(&self, path: String) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Writes the contents of the directory to a path on the host.
|
||||
pub fn export(&self, path: String) -> Boolean {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a file at the given path.
|
||||
pub fn file(&self, path: String) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The content-addressed identifier of the directory.
|
||||
pub fn id(&self) -> DirectoryID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// load a project's metadata
|
||||
pub fn load_project(&self, config_path: String) -> Project {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Creates a named sub-pipeline.
|
||||
pub fn pipeline(&self, name: String, description: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a directory written at the given path.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `exclude` - Exclude artifacts that match the given pattern.
|
||||
/// Exclude artifacts that match the given pattern.
|
||||
/// (e.g. ["node_modules/", ".git*"]).
|
||||
/// * `include` - Include only artifacts that match the given pattern.
|
||||
/// Include only artifacts that match the given pattern.
|
||||
/// (e.g. ["app/", "package.*"]).
|
||||
pub fn with_directory(
|
||||
&self,
|
||||
path: String,
|
||||
directory: DirectoryID,
|
||||
exclude: Vec<String>,
|
||||
include: Vec<String>,
|
||||
) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus the contents of the given file copied to the given path.
|
||||
pub fn with_file(&self, path: String, source: FileID, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a new directory created at the given path.
|
||||
pub fn with_new_directory(&self, path: String, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a new file written at the given path.
|
||||
pub fn with_new_file(&self, path: String, contents: String, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with all file/dir timestamps set to the given time, in seconds from the Unix epoch.
|
||||
pub fn with_timestamps(&self, timestamp: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with the directory at the given path removed.
|
||||
pub fn without_directory(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with the file at the given path removed.
|
||||
pub fn without_file(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Directory {}
|
||||
|
||||
/// A file.
|
||||
pub struct File {}
|
||||
|
||||
impl File {
|
||||
/// Retrieves the contents of the file.
|
||||
pub fn contents(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Writes the file to a file path on the host.
|
||||
pub fn export(&self, path: String) -> Boolean {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves the content-addressed identifier of the file.
|
||||
pub fn id(&self) -> FileID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a secret referencing the contents of this file.
|
||||
pub fn secret(&self) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Gets the size of the file, in bytes.
|
||||
pub fn size(&self) -> Int {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this file with its created/modified timestamps set to the given time, in seconds from the Unix epoch.
|
||||
pub fn with_timestamps(&self, timestamp: Int) -> File {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for File {}
|
||||
|
||||
///
|
||||
pub struct Socket {}
|
||||
|
||||
impl Socket {
|
||||
/// The content-addressed identifier of the socket.
|
||||
pub fn id(&self) -> SocketID {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Socket {}
|
||||
|
||||
/// A simple key value object that represents an environment variable.
|
||||
pub struct EnvVariable {}
|
||||
|
||||
impl EnvVariable {
|
||||
/// The environment variable name.
|
||||
pub fn name(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The environment variable value.
|
||||
pub fn value(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for EnvVariable {}
|
||||
|
||||
/// A git repository.
|
||||
pub struct GitRepository {}
|
||||
|
||||
impl GitRepository {
|
||||
/// Returns details on one branch.
|
||||
pub fn branch(&self, name: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Lists of branches on the repository.
|
||||
pub fn branches(&self) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns details on one commit.
|
||||
pub fn commit(&self, id: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns details on one tag.
|
||||
pub fn tag(&self, name: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Lists of tags on the repository.
|
||||
pub fn tags(&self) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for GitRepository {}
|
||||
|
||||
/// A directory whose contents persist across runs.
|
||||
pub struct CacheVolume {}
|
||||
|
||||
impl CacheVolume {
|
||||
///
|
||||
pub fn id(&self) -> CacheID {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for CacheVolume {}
|
||||
|
||||
/// A reference to a secret value, which can be handled more safely than the value itself.
|
||||
pub struct Secret {}
|
||||
|
||||
impl Secret {
|
||||
/// The identifier for this secret.
|
||||
pub fn id(&self) -> SecretID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The value of this secret.
|
||||
pub fn plaintext(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Secret {}
|
||||
|
||||
/// A git ref (tag, branch or commit).
|
||||
pub struct GitRef {}
|
||||
|
||||
impl GitRef {
|
||||
/// The digest of the current value of this ref.
|
||||
pub fn digest(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The filesystem tree at this ref.
|
||||
pub fn tree(&self, ssh_known_hosts: String, ssh_auth_socket: SocketID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for GitRef {}
|
||||
|
||||
/// An environment variable on the host environment.
|
||||
pub struct HostVariable {}
|
||||
|
||||
impl HostVariable {
|
||||
/// A secret referencing the value of this variable.
|
||||
pub fn secret(&self) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The value of this variable.
|
||||
pub fn value(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for HostVariable {}
|
||||
|
||||
///
|
||||
pub struct Query {}
|
||||
|
||||
impl Query {
|
||||
/// Constructs a cache volume for a given cache key.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `key` - A string identifier to target this cache volume (e.g. "myapp-cache").
|
||||
/// A string identifier to target this cache volume (e.g. "myapp-cache").
|
||||
pub fn cache_volume(&self, key: String) -> CacheVolume {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// 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.
|
||||
pub fn container(&self, id: ContainerID, platform: Platform) -> Container {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The default platform of the builder.
|
||||
pub fn default_platform(&self) -> Platform {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Load a directory by ID. No argument produces an empty directory.
|
||||
pub fn directory(&self, id: DirectoryID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a file by ID.
|
||||
pub fn file(&self, id: FileID) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Queries a git repository.
|
||||
pub fn git(&self, url: String, keep_git_dir: Boolean) -> GitRepository {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Queries the host environment.
|
||||
pub fn host(&self) -> Host {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns a file containing an http remote url content.
|
||||
pub fn http(&self, url: String) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Creates a named sub-pipeline
|
||||
pub fn pipeline(&self, name: String, description: String) -> Query {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Look up a project by name
|
||||
pub fn project(&self, name: String) -> Project {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a secret from its ID.
|
||||
pub fn secret(&self, id: SecretID) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a socket by its ID.
|
||||
pub fn socket(&self, id: SocketID) -> Socket {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Query {}
|
||||
|
||||
/// Information about the host execution environment.
|
||||
pub struct Host {}
|
||||
|
||||
impl Host {
|
||||
/// Accesses a directory on the host.
|
||||
pub fn directory(&self, path: String, exclude: Vec<String>, include: Vec<String>) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Accesses an environment variable on the host.
|
||||
pub fn env_variable(&self, name: String) -> HostVariable {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Accesses a Unix socket on the host.
|
||||
pub fn unix_socket(&self, path: String) -> Socket {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves the current working directory on the host.
|
||||
pub fn workdir(&self, exclude: Vec<String>, include: Vec<String>) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Host {}
|
||||
|
||||
/// A set of scripts and/or extensions
|
||||
pub struct Project {}
|
||||
|
||||
@ -449,6 +70,50 @@ impl Project {
|
||||
|
||||
impl Input for Project {}
|
||||
|
||||
/// A simple key value object that represents a label.
|
||||
pub struct Label {}
|
||||
|
||||
impl Label {
|
||||
/// The label name.
|
||||
pub fn name(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The label value.
|
||||
pub fn value(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Label {}
|
||||
|
||||
/// Information about the host execution environment.
|
||||
pub struct Host {}
|
||||
|
||||
impl Host {
|
||||
/// Accesses a directory on the host.
|
||||
pub fn directory(&self, path: String, exclude: Vec<String>, include: Vec<String>) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Accesses an environment variable on the host.
|
||||
pub fn env_variable(&self, name: String) -> HostVariable {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Accesses a Unix socket on the host.
|
||||
pub fn unix_socket(&self, path: String) -> Socket {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves the current working directory on the host.
|
||||
pub fn workdir(&self, exclude: Vec<String>, include: Vec<String>) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Host {}
|
||||
|
||||
/// An OCI-compatible container, also known as a docker container.
|
||||
pub struct Container {}
|
||||
|
||||
@ -457,14 +122,10 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `context` - Directory context used by the Dockerfile.
|
||||
/// Directory context used by the Dockerfile.
|
||||
/// * `dockerfile` - Path to the Dockerfile to use.
|
||||
/// Path to the Dockerfile to use.
|
||||
/// Defaults to './Dockerfile'.
|
||||
/// * `buildArgs` - Additional build arguments.
|
||||
/// Additional build arguments.
|
||||
/// * `target` - Target build stage to build.
|
||||
/// Target build stage to build.
|
||||
pub fn build(
|
||||
&self,
|
||||
context: DirectoryID,
|
||||
@ -504,15 +165,10 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `args` - Command to run instead of the container's default command.
|
||||
/// Command to run instead of the container's default command.
|
||||
/// * `stdin` - Content to write to the command's standard input before closing.
|
||||
/// Content to write to the command's standard input before closing.
|
||||
/// * `redirectStdout` - Redirect the command's standard output to a file in the container.
|
||||
/// Redirect the command's standard output to a file in the container.
|
||||
/// * `redirectStderr` - Redirect the command's standard error to a file in the container.
|
||||
/// Redirect the command's standard error to a file in the container.
|
||||
/// * `experimentalPrivilegedNesting` - Provide dagger access to the executed command.
|
||||
/// 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 fn exec(
|
||||
@ -537,10 +193,8 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `path` - Host's destination path.
|
||||
/// Host's destination path.
|
||||
/// Path can be relative to the engine's workdir or absolute.
|
||||
/// * `platformVariants` - Identifiers for other platform specific containers.
|
||||
/// Identifiers for other platform specific containers.
|
||||
/// Used for multi-platform image.
|
||||
pub fn export(&self, path: String, platform_variants: Vec<ContainerID>) -> Boolean {
|
||||
todo!()
|
||||
@ -555,7 +209,6 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `address` - Image's address from its registry.
|
||||
/// Image's address from its registry.
|
||||
/// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
||||
pub fn from(&self, address: String) -> Container {
|
||||
todo!()
|
||||
@ -600,10 +253,8 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `address` - Registry's address to publish the image to.
|
||||
/// Registry's address to publish the image to.
|
||||
/// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
||||
/// * `platformVariants` - Identifiers for other platform specific containers.
|
||||
/// Identifiers for other platform specific containers.
|
||||
/// Used for multi-platform image.
|
||||
pub fn publish(&self, address: String, platform_variants: Vec<ContainerID>) -> String {
|
||||
todo!()
|
||||
@ -661,15 +312,10 @@ impl Container {
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `args` - Command to run instead of the container's default command.
|
||||
/// Command to run instead of the container's default command.
|
||||
/// * `stdin` - Content to write to the command's standard input before closing.
|
||||
/// Content to write to the command's standard input before closing.
|
||||
/// * `redirectStdout` - Redirect the command's standard output to a file in the container.
|
||||
/// Redirect the command's standard output to a file in the container.
|
||||
/// * `redirectStderr` - Redirect the command's standard error to a file in the container.
|
||||
/// Redirect the command's standard error to a file in the container.
|
||||
/// * `experimentalPrivilegedNesting` - Provide dagger access to the executed command.
|
||||
/// 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 fn with_exec(
|
||||
@ -786,19 +432,347 @@ impl Container {
|
||||
|
||||
impl Input for Container {}
|
||||
|
||||
/// A simple key value object that represents a label.
|
||||
pub struct Label {}
|
||||
///
|
||||
pub struct Query {}
|
||||
|
||||
impl Label {
|
||||
/// The label name.
|
||||
pub fn name(&self) -> String {
|
||||
impl Query {
|
||||
/// Constructs a cache volume for a given cache key.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `key` - A string identifier to target this cache volume (e.g. "myapp-cache").
|
||||
pub fn cache_volume(&self, key: String) -> CacheVolume {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The label value.
|
||||
/// 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.
|
||||
pub fn container(&self, id: ContainerID, platform: Platform) -> Container {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The default platform of the builder.
|
||||
pub fn default_platform(&self) -> Platform {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Load a directory by ID. No argument produces an empty directory.
|
||||
pub fn directory(&self, id: DirectoryID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a file by ID.
|
||||
pub fn file(&self, id: FileID) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Queries a git repository.
|
||||
pub fn git(&self, url: String, keep_git_dir: Boolean) -> GitRepository {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Queries the host environment.
|
||||
pub fn host(&self) -> Host {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns a file containing an http remote url content.
|
||||
pub fn http(&self, url: String) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Creates a named sub-pipeline
|
||||
pub fn pipeline(&self, name: String, description: String) -> Query {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Look up a project by name
|
||||
pub fn project(&self, name: String) -> Project {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a secret from its ID.
|
||||
pub fn secret(&self, id: SecretID) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Loads a socket by its ID.
|
||||
pub fn socket(&self, id: SocketID) -> Socket {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Query {}
|
||||
|
||||
/// A file.
|
||||
pub struct File {}
|
||||
|
||||
impl File {
|
||||
/// Retrieves the contents of the file.
|
||||
pub fn contents(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Writes the file to a file path on the host.
|
||||
pub fn export(&self, path: String) -> Boolean {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves the content-addressed identifier of the file.
|
||||
pub fn id(&self) -> FileID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a secret referencing the contents of this file.
|
||||
pub fn secret(&self) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Gets the size of the file, in bytes.
|
||||
pub fn size(&self) -> Int {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this file with its created/modified timestamps set to the given time, in seconds from the Unix epoch.
|
||||
pub fn with_timestamps(&self, timestamp: Int) -> File {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for File {}
|
||||
|
||||
/// A git repository.
|
||||
pub struct GitRepository {}
|
||||
|
||||
impl GitRepository {
|
||||
/// Returns details on one branch.
|
||||
pub fn branch(&self, name: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Lists of branches on the repository.
|
||||
pub fn branches(&self) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns details on one commit.
|
||||
pub fn commit(&self, id: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns details on one tag.
|
||||
pub fn tag(&self, name: String) -> GitRef {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Lists of tags on the repository.
|
||||
pub fn tags(&self) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for GitRepository {}
|
||||
|
||||
/// A directory whose contents persist across runs.
|
||||
pub struct CacheVolume {}
|
||||
|
||||
impl CacheVolume {
|
||||
///
|
||||
pub fn id(&self) -> CacheID {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for CacheVolume {}
|
||||
|
||||
/// An environment variable on the host environment.
|
||||
pub struct HostVariable {}
|
||||
|
||||
impl HostVariable {
|
||||
/// A secret referencing the value of this variable.
|
||||
pub fn secret(&self) -> Secret {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The value of this variable.
|
||||
pub fn value(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Label {}
|
||||
impl Input for HostVariable {}
|
||||
|
||||
/// A reference to a secret value, which can be handled more safely than the value itself.
|
||||
pub struct Secret {}
|
||||
|
||||
impl Secret {
|
||||
/// The identifier for this secret.
|
||||
pub fn id(&self) -> SecretID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The value of this secret.
|
||||
pub fn plaintext(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Secret {}
|
||||
|
||||
/// A simple key value object that represents an environment variable.
|
||||
pub struct EnvVariable {}
|
||||
|
||||
impl EnvVariable {
|
||||
/// The environment variable name.
|
||||
pub fn name(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The environment variable value.
|
||||
pub fn value(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for EnvVariable {}
|
||||
|
||||
/// A directory.
|
||||
pub struct Directory {}
|
||||
|
||||
impl Directory {
|
||||
/// Gets the difference between this directory and an another directory.
|
||||
pub fn diff(&self, other: DirectoryID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a directory at the given path.
|
||||
pub fn directory(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Builds a new Docker container from this directory.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `dockerfile` - Path to the Dockerfile to use.
|
||||
/// Defaults to './Dockerfile'.
|
||||
/// * `platform` - The platform to build.
|
||||
/// * `buildArgs` - Additional build arguments.
|
||||
/// * `target` - Target build stage to build.
|
||||
pub fn docker_build(
|
||||
&self,
|
||||
dockerfile: String,
|
||||
platform: Platform,
|
||||
build_args: Vec<BuildArg>,
|
||||
target: String,
|
||||
) -> Container {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns a list of files and directories at the given path.
|
||||
pub fn entries(&self, path: String) -> Vec<String> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Writes the contents of the directory to a path on the host.
|
||||
pub fn export(&self, path: String) -> Boolean {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves a file at the given path.
|
||||
pub fn file(&self, path: String) -> File {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The content-addressed identifier of the directory.
|
||||
pub fn id(&self) -> DirectoryID {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// load a project's metadata
|
||||
pub fn load_project(&self, config_path: String) -> Project {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Creates a named sub-pipeline.
|
||||
pub fn pipeline(&self, name: String, description: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a directory written at the given path.
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `exclude` - Exclude artifacts that match the given pattern.
|
||||
/// (e.g. ["node_modules/", ".git*"]).
|
||||
/// * `include` - Include only artifacts that match the given pattern.
|
||||
/// (e.g. ["app/", "package.*"]).
|
||||
pub fn with_directory(
|
||||
&self,
|
||||
path: String,
|
||||
directory: DirectoryID,
|
||||
exclude: Vec<String>,
|
||||
include: Vec<String>,
|
||||
) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus the contents of the given file copied to the given path.
|
||||
pub fn with_file(&self, path: String, source: FileID, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a new directory created at the given path.
|
||||
pub fn with_new_directory(&self, path: String, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory plus a new file written at the given path.
|
||||
pub fn with_new_file(&self, path: String, contents: String, permissions: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with all file/dir timestamps set to the given time, in seconds from the Unix epoch.
|
||||
pub fn with_timestamps(&self, timestamp: Int) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with the directory at the given path removed.
|
||||
pub fn without_directory(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Retrieves this directory with the file at the given path removed.
|
||||
pub fn without_file(&self, path: String) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Directory {}
|
||||
|
||||
/// A git ref (tag, branch or commit).
|
||||
pub struct GitRef {}
|
||||
|
||||
impl GitRef {
|
||||
/// The digest of the current value of this ref.
|
||||
pub fn digest(&self) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// The filesystem tree at this ref.
|
||||
pub fn tree(&self, ssh_known_hosts: String, ssh_auth_socket: SocketID) -> Directory {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for GitRef {}
|
||||
|
||||
///
|
||||
pub struct Socket {}
|
||||
|
||||
impl Socket {
|
||||
/// The content-addressed identifier of the socket.
|
||||
pub fn id(&self) -> SocketID {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Input for Socket {}
|
||||
|
Loading…
Reference in New Issue
Block a user