Documentation ¶
Index ¶
- type TemplateEngine
- type TestProvider
- func (t *TestProvider) BooleanEvaluation(ctx context.Context, flag string, defaultValue bool, ...) openfeature.BoolResolutionDetail
- func (t *TestProvider) FloatEvaluation(ctx context.Context, flag string, defaultValue float64, ...) openfeature.FloatResolutionDetail
- func (t *TestProvider) Hooks() []openfeature.Hook
- func (t *TestProvider) IntEvaluation(ctx context.Context, flag string, defaultValue int64, ...) openfeature.IntResolutionDetail
- func (t *TestProvider) Metadata() openfeature.Metadata
- func (t *TestProvider) ObjectEvaluation(ctx context.Context, flag string, defaultValue interface{}, ...) openfeature.InterfaceResolutionDetail
- func (t *TestProvider) StringEvaluation(ctx context.Context, flag string, defaultValue string, ...) openfeature.StringResolutionDetail
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
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.