Merge pull request #1435 from talentedmrjones/europa-move-transformsecret-secret
moved #TransformSecret to engine/secret.cue
This commit is contained in:
commit
5016f4597d
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user