templ

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateEngine

type TemplateEngine struct {
	SourceFilesystem billy.Filesystem
	Output           destinations.Output
	FlagProvider     *openfeature.Client
	// contains filtered or unexported fields
}

func CreateEngines

func CreateEngines(paths []config.Path, providers map[string]*openfeature.Client) ([]*TemplateEngine, error)

Parses configured paths and available providers to create list of engine tasks to be executed

func NewTemplateEngine

func NewTemplateEngine(path config.Path, provider *openfeature.Client) (*TemplateEngine, error)

Creates a new template engine with a source path, a destination path, and a feature flag provider

func (*TemplateEngine) Execute

func (te *TemplateEngine) Execute() error

Iterates each file in the engine and writes it to the destination

func (*TemplateEngine) ScanFiles

func (te *TemplateEngine) ScanFiles() error

Can input path and create list of files to template

type TestProvider added in v0.1.27

type TestProvider struct {
	Flags map[string]any
}

func (*TestProvider) BooleanEvaluation added in v0.1.27

func (t *TestProvider) BooleanEvaluation(ctx context.Context, flag string, defaultValue bool, evalCtx openfeature.FlattenedContext) openfeature.BoolResolutionDetail

BooleanEvaluation implements openfeature.FeatureProvider.

func (*TestProvider) FloatEvaluation added in v0.1.27

func (t *TestProvider) FloatEvaluation(ctx context.Context, flag string, defaultValue float64, evalCtx openfeature.FlattenedContext) openfeature.FloatResolutionDetail

FloatEvaluation implements openfeature.FeatureProvider.

func (*TestProvider) Hooks added in v0.1.27

func (t *TestProvider) Hooks() []openfeature.Hook

Hooks implements openfeature.FeatureProvider.

func (*TestProvider) IntEvaluation added in v0.1.27

func (t *TestProvider) IntEvaluation(ctx context.Context, flag string, defaultValue int64, evalCtx openfeature.FlattenedContext) openfeature.IntResolutionDetail

IntEvaluation implements openfeature.FeatureProvider.

func (*TestProvider) Metadata added in v0.1.27

func (t *TestProvider) Metadata() openfeature.Metadata

Metadata implements openfeature.FeatureProvider.

func (*TestProvider) ObjectEvaluation added in v0.1.27

func (t *TestProvider) ObjectEvaluation(ctx context.Context, flag string, defaultValue interface{}, evalCtx openfeature.FlattenedContext) openfeature.InterfaceResolutionDetail

ObjectEvaluation implements openfeature.FeatureProvider.

func (*TestProvider) StringEvaluation added in v0.1.27

func (t *TestProvider) StringEvaluation(ctx context.Context, flag string, defaultValue string, evalCtx openfeature.FlattenedContext) openfeature.StringResolutionDetail

StringEvaluation implements openfeature.FeatureProvider.

Jump to

Keyboard shortcuts

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