Documentation ¶
Overview ¶
Copyright 2020 The UnDistro authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 The UnDistro authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 The UnDistro authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 The UnDistro authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjs ¶ added in v0.19.3
func GetObjs(fs fs.FS, dir, tplName string, vars map[string]interface{}) ([]unstructured.Unstructured, error)
func SetVariablesFromEnvVar ¶
func SetVariablesFromEnvVar(ctx context.Context, input VariablesInput) error
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool implements a pool of bytes.Buffers in the form of a bounded channel. Pulled from the github.com/oxtoacart/bpool package (Apache licensed).
func NewBufferPool ¶
func NewBufferPool(size int) (bp *BufferPool)
NewBufferPool creates a new BufferPool bounded to the given size.
func (*BufferPool) Get ¶
func (bp *BufferPool) Get() (b *bytes.Buffer)
Get gets a Buffer from the BufferPool, or creates a new one if none are available in the pool.
func (*BufferPool) Put ¶
func (bp *BufferPool) Put(b *bytes.Buffer)
Put returns the given Buffer to the BufferPool.
type Options ¶
type Options struct { // Filesystem to load templates. Default clustertemplates Dir Filesystem fs.FS Root string // Funcs is a slice of FuncMaps to apply to the template upon compilation. This is useful for helper functions. Defaults to []. Funcs []template.FuncMap }
Options is a struct for specifying configuration options for the render.Render object.
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
Render is a service that provides functions for easily writing templates out to a writer.
func (*Render) Render ¶
Render is the generic function called by ClusterTemplate, and can be called by custom implementations.
func (*Render) TemplateLookup ¶
TemplateLookup is a wrapper around template.Lookup and returns the template with the given name that is associated with t, or nil if there is no such template.