moved #TransformSecret to engine/secret.cue

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2022-01-14 13:29:37 -07:00
parent 180beee9c7
commit 842a9bf6bb
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C
2 changed files with 17 additions and 18 deletions

View File

@ -13,3 +13,20 @@ package engine
// Contents of the secret // Contents of the secret
output: #Secret output: #Secret
} }
// Securely apply a CUE transformation on the contents of a secret
#TransformSecret: {
$dagger: task: _name: "TransformSecret"
// The original secret
input: #Secret
// A new secret or (map of secrets) with the transformation applied
output: #Secret | {[string]: output}
// Transformation function
#function: {
// Full contents of the input secret (only available to the function)
input: string
_functionOutput: string | {[string]: _functionOutput}
// New contents of the output secret (must provided by the caller)
output: _functionOutput
}
}

View File

@ -1,18 +0,0 @@
package engine
// Securely apply a CUE transformation on the contents of a secret
#TransformSecret: {
$dagger: task: _name: "TransformSecret"
// The original secret
input: #Secret
// A new secret or (map of secrets) with the transformation applied
output: #Secret | {[string]: output}
// Transformation function
#function: {
// Full contents of the input secret (only available to the function)
input: string
_functionOutput: string | {[string]: _functionOutput}
// New contents of the output secret (must provided by the caller)
output: _functionOutput
}
}