template

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewYamlTemplate

func NewYamlTemplate(template string, format InputFormat) (yamlTemplate, error)

Types

type Data

type Data struct {
	Name         string
	PrefixedName string
	FullName     string
	Namespaces   Namespaces
	Labels       map[string]string
	Annotations  map[string]string
	Parameters   []*corev1alpha1.Parameter
	Utils        UtilityFunctions
}

func (Data) Bool

func (d Data) Bool(name string) (bool, error)

Bool returns the value of a named bool parameter

func (Data) Int

func (d Data) Int(name string) (int, error)

Int returns the value of a named int parameter

func (Data) String

func (d Data) String(name string) (string, error)

String returns the value of a named string parameter

type InputFormat

type InputFormat string
const (
	InputFormatJson InputFormat = "json"
	InputFormatYaml InputFormat = "yaml"
)

type Namespaces

type Namespaces struct {
	Tenant   string
	Operator string
}

type Slice

type Slice struct{}

func (Slice) ContainsString

func (d Slice) ContainsString(haystack []string, needle string) bool

type String

type String struct{}

func (String) Replace

func (d String) Replace(s, old, new string, n int) string

func (String) ReplaceAll

func (d String) ReplaceAll(s string, old string, new string) string

type UtilityFunctions

type UtilityFunctions struct {
	String
	Slice
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL