Europa: remove implemented engine definitions from spec mock

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2021-12-17 18:41:25 +00:00
committed by Solomon Hykes
parent 79eb22799a
commit 5933620bb1
9 changed files with 36 additions and 116 deletions

View File

@@ -1,20 +1,33 @@
package engine
// Read a file from a filesystem tree
#ReadFile: {
_type: "ReadFile"
input: #FS
path: string
// Filesystem tree holding the file
input: #FS
// Path of the file to read
path: string
// Contents of the file
contents: string
output: #FS
// Output filesystem tree
// FIXME: this is a no-op. No output needed.
output: #FS
}
// Write a file to a filesystem tree, creating it if needed
#WriteFile: {
_type: "WriteFile"
input: #FS
path: string
// Input filesystem tree
input: #FS
// Path of the file to write
path: string
// Contents to write
contents: string
mode: int
output: #FS
// Permissions of the file
// FIXME: rename to 'permissions' for consistency
mode: int
// Output filesystem tree
output: #FS
}

View File

@@ -1,10 +1,5 @@
package engine
// A filesystem state
#FS: {
$dagger: fs: _id: string
}
// Produce an empty directory
// FIXME: replace with a null value for #FS?
#Scratch: {
@@ -13,23 +8,9 @@ package engine
output: #FS
}
#ReadFile: {
$dagger: task: _name: "ReadFile"
#ReadFile: $dagger: task: _name: "ReadFile"
input: #FS
path: string
contents: string
output: #FS
}
#WriteFile: {
$dagger: task: _name: "WriteFile"
input: #FS
path: string
contents: string
output: #FS
}
#WriteFile: $dagger: task: _name: "WriteFile"
// Create a directory
#Mkdir: {
@@ -39,8 +20,7 @@ package engine
// Path of the directory
path: string
// FIXME: this is not very dev friendly, as Cue does not support octal notation.
// What is a better option?
// FIXME: permissions?
mode: int
// Create parent directories as needed?
parents: *true | false

View File

@@ -1,14 +1,5 @@
package engine
// Container image config
// See [OCI](https://www.opencontainers.org)
#ImageConfig: {
env?: [...string]
user?: string
command?: [...string]
// FIXME
}
// Upload a container image to a remote repository
#Push: {
$dagger: task: _name: "Push"
@@ -34,36 +25,7 @@ package engine
}
// Download a container image from a remote repository
#Pull: {
$dagger: task: _name: "Pull"
// Repository source ref
source: #Ref
// Authentication
auth: [...{
target: string
username: string
secret: string | #Secret
}]
// Root filesystem of downloaded image
output: #FS
// Complete ref of downloaded image (including digest)
result: #Ref
// Downloaded container image config
config: #ImageConfig
}
// A ref is an address for a remote container image
//
// Examples:
// - "index.docker.io/dagger"
// - "dagger"
// - "index.docker.io/dagger:latest"
// - "index.docker.io/dagger:latest@sha256:a89cb097693dd354de598d279c304a1c73ee550fbfff6d9ee515568e0c749cfe"
#Ref: string
#Pull: $dagger: task: _name: "Pull"
// Build a container image using buildkit
// FIXME: rename to #Dockerfile to clarify scope

View File

@@ -1,6 +0,0 @@
package engine
// An external secret
#Secret: {
$dagger: secret: _id: string
}

View File

@@ -1,7 +0,0 @@
package engine
// An external network service
// FIXME: rename to endpoint?
#Service: {
$dagger: service: _id: string
}

View File

@@ -1,6 +0,0 @@
package engine
// A stream of bytes
#Stream: {
$dagger: stream: _id: string
}