{"modulePath":"github.com/goplugin/plugin-common","version":"v0.4.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package exec\n\n## Functions\n\n```go\nfunc FindAndInterpolateAllKeys(input any, state Results) (any, error)\n```\nFindAndInterpolateAllKeys takes an \\`input\\` any value, and recursively identifies any values that should be replaced from \\`state\\`.\n\nA value \\`v\\` should be replaced if it is wrapped as follows: \\`$(v)\\`.\n\n```go\nfunc FindAndInterpolateEnvVars(input any, env Env) (any, error)\n```\nFindAndInterpolateEnv takes a \\`config\\` any value, and recursively identifies any values that should be replaced from \\`env\\`.\n\nA value \\`v\\` should be replaced if it is wrapped as follows: \\`$(v)\\`.\n\n```go\nfunc InterpolateKey(key string, state Results) (any, error)\n```\nInterpolateKey takes a multi-part, dot-separated key and attempts to replace it with its corresponding value in \\`state\\`.\n\nA key is valid if it contains at least two parts, with:\n\n  - the first part being the workflow step's \\`ref\\` variable\n  - the second part being one of \\`inputs\\` or \\`outputs\\`\n\nIf a key has more than two parts, then we traverse the parts to find the value we want to replace. We support traversing both nested maps and lists and any combination of the two.\n\n## Types\n\n```go\ntype Env struct {\n\tBinary  []byte\n\tConfig  []byte\n\tSecrets map[string]string\n}\n```\n\n```go\ntype Result struct {\n\tInputs  values.Value\n\tOutputs values.Value\n\tError   error\n}\n```\n\n```go\ntype Results interface {\n\tResultForStep(string) (*Result, bool)\n}\n```\n\n","path":"github.com/goplugin/plugin-common/pkg/workflows/exec","name":"exec","synopsis":"","isRedistributable":true}
