This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dagger/pkg/dagger.io/dagger/core/secrets.cue
2022-03-28 12:18:33 +00:00

43 lines
1002 B
CUE

package core
import "dagger.io/dagger"
// Decode the contents of a secrets without leaking it.
// Supported formats: json, yaml
#DecodeSecret: {
$dagger: task: _name: "DecodeSecret"
// A dagger.#Secret whose plain text is a JSON or YAML string
input: dagger.#Secret
format: "json" | "yaml"
// A new secret or (map of secrets) derived from unmarshaling the input secret's plain text
output: dagger.#Secret | {[string]: output}
}
// Create a new a secret from a filesystem tree
#NewSecret: {
$dagger: task: _name: "NewSecret"
// Filesystem tree holding the secret
input: dagger.#FS
// Path of the secret to read
path: string
// Whether to trim leading and trailing space characters from secret value
trimSpace: *true | false
// Contents of the secret
output: dagger.#Secret
}
// Trim leading and trailing space characters from a secret
#TrimSecret: {
$dagger: task: _name: "TrimSecret"
// Original secret
input: dagger.#Secret
// New trimmed secret
output: dagger.#Secret
}