templates

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCharset = "[_A-Za-z0-9]"
)

Variables

This section is empty.

Functions

func AddAmazonEKSPath

func AddAmazonEKSPath(name string, path string)

AddAmazonEKSPath adds a kubeconfig path to the cache

func AddAzureAKSPath added in v0.16.0

func AddAzureAKSPath(name string, path string)

AddAzureAKSPath adds a kubeconfig path to the cache

func AddGoogleGKEPath

func AddGoogleGKEPath(name string, path string)

AddGoogleGKEPath adds a kubeconfig path to the cache

Types

type Builder

type Builder struct {
	Ctx    []Ctx
	Functs template.FuncMap
	Logger log.Logger
}

func (*Builder) AddCtx

func (b *Builder) AddCtx(ctx Ctx)

func (*Builder) Bool

func (b *Builder) Bool(text string, defaultVal bool) (bool, error)

func (*Builder) BuildFuncMap

func (b *Builder) BuildFuncMap() template.FuncMap

func (*Builder) Float64

func (b *Builder) Float64(text string, defaultVal float64) (float64, error)

func (*Builder) GetTemplate

func (b *Builder) GetTemplate(name, text string) (*template.Template, error)

func (*Builder) Int

func (b *Builder) Int(text string, defaultVal int64) (int64, error)

func (*Builder) RenderTemplate

func (b *Builder) RenderTemplate(name string, text string) (string, error)

func (*Builder) String

func (b *Builder) String(text string) (string, error)

func (*Builder) Uint

func (b *Builder) Uint(text string, defaultVal uint64) (uint64, error)

type BuilderBuilder

type BuilderBuilder struct {
	Logger  log.Logger
	Viper   *viper.Viper
	Manager state.Manager
}

func NewBuilderBuilder

func NewBuilderBuilder(logger log.Logger, v *viper.Viper, m state.Manager) *BuilderBuilder

func (*BuilderBuilder) BaseBuilder

func (bb *BuilderBuilder) BaseBuilder(
	meta api.ReleaseMetadata,
) (*Builder, error)

func (*BuilderBuilder) FullBuilder

func (bb *BuilderBuilder) FullBuilder(
	meta api.ReleaseMetadata,
	configGroups []libyaml.ConfigGroup,
	config map[string]interface{},
) (*Builder, error)

func (*BuilderBuilder) NewBuilder

func (bb *BuilderBuilder) NewBuilder(ctxx ...Ctx) Builder

func (*BuilderBuilder) NewConfigContext

func (bb *BuilderBuilder) NewConfigContext(configGroups []libyaml.ConfigGroup, templateContext map[string]interface{}) (*ConfigCtx, error)

func (*BuilderBuilder) NewShipContext

func (bb *BuilderBuilder) NewShipContext() (*ShipContext, error)

func (*BuilderBuilder) NewStaticContext

func (bb *BuilderBuilder) NewStaticContext() *StaticCtx

type ConfigCtx

type ConfigCtx struct {
	ItemValues map[string]interface{}
	Logger     log.Logger
}

ConfigCtx is the context for builder functions before the application has started.

func (ConfigCtx) FuncMap

func (ctx ConfigCtx) FuncMap() template.FuncMap

FuncMap represents the available functions in the ConfigCtx.

type Ctx

type Ctx interface {
	FuncMap() template.FuncMap
}

type InstallationContext

type InstallationContext struct {
	Meta   api.ReleaseMetadata
	Viper  *viper.Viper
	Logger log.Logger
}

func (*InstallationContext) FuncMap

func (ctx *InstallationContext) FuncMap() template.FuncMap

type ShipContext

type ShipContext struct {
	Logger  log.Logger
	Manager state.Manager
}

ShipContext is the context for builder functions that depend on what assets have been created.

func (ShipContext) FuncMap

func (ctx ShipContext) FuncMap() template.FuncMap

FuncMap represents the available functions in the ShipCtx.

type StaticCtx

type StaticCtx struct {
	Logger log.Logger
}

func NewStaticContext

func NewStaticContext() *StaticCtx

deprecated

func (StaticCtx) FuncMap

func (ctx StaticCtx) FuncMap() template.FuncMap

Jump to

Keyboard shortcuts

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