{"modulePath":"github.com/wainersm/openshift_origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package templateprocessing\n\n## Functions\n\n```go\nfunc DeprecatedGetParameterByNameInternal(t *templateapi.Template, name string) *templateapi.Parameter\n```\nTODO: remove once consumers are switched to deal with external versions DeprecatedGetParameterByNameInternal searches for a Parameter in the Template based on its name.\n\n```go\nfunc GetParameterByName(t *templatev1.Template, name string) *templatev1.Parameter\n```\nGetParameterByName searches for a Parameter in the Template based on its name.\n\n## Types\n\n```go\ntype Processor struct {\n\tGenerators map[string]Generator\n}\n```\nProcessor process the Template into the List with substituted parameters\n\n```go\nfunc NewProcessor(generators map[string]Generator) *Processor\n```\nNewProcessor creates new Processor and initializes its set of generators.\n\n```go\nfunc (p *Processor) EvaluateParameterSubstitution(params map[string]templateapi.Parameter, in string) (string, bool)\n```\nEvaluateParameterSubstitution replaces escaped parameters in a string with values from the provided map.  Returns the substituted value (if any substitution applied) and a boolean indicating if the resulting value should be treated as a string(true) or a non-string value(false) for purposes of json encoding.\n\n```go\nfunc (p *Processor) GenerateParameterValues(t *templateapi.Template) field.ErrorList\n```\nGenerateParameterValues generates Value for each Parameter of the given Template that has Generate field specified where Value is not already supplied.\n\nExamples:\n\nfrom             | value ----------------------------- \"test\\[0-9]{1}x\"  | \"test7x\" \"\\[0-1]{8}\"       | \"01001100\" \"0x\\[A-F0-9]{4}\"  | \"0xB3AF\" \"\\[a-zA-Z0-9]{8}\" | \"hW4yQU5i\" If an error occurs, the parameter that caused the error is returned along with the error message.\n\n```go\nfunc (p *Processor) Process(template *templateapi.Template) field.ErrorList\n```\nProcess transforms Template object into List object. It generates Parameter values using the defined set of generators first, and then it substitutes all Parameter expression occurrences with their corresponding values (currently in the containers' Environment variables only).\n\n```go\nfunc (p *Processor) SubstituteParameters(params map[string]templateapi.Parameter, item runtime.Object) (runtime.Object, error)\n```\nSubstituteParameters loops over all values defined in structured and unstructured types that are children of item.\n\nExample of Parameter expression:\n\n  - ${PARAMETER\\_NAME}\n\n","path":"github.com/wainersm/openshift_origin/pkg/template/templateprocessing","name":"templateprocessing","synopsis":"","isRedistributable":true}
