builder

package
v1.0.78 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThelmaBuilder

type ThelmaBuilder interface {
	// Build when first called, initializes a new ThelmaApp and saves it. Subsequent calls do nothing.
	Build() (app.ThelmaApp, error)
	// WithTestDefaults (FOR USE IN UNIT TESTS ONLY) causes app to be initialized with some settings that are useful
	// in testing (eg. ignore config file and environment variables when loading config).
	WithTestDefaults(t *testing.T) ThelmaBuilder
	// SetHome (FOR USE IN UNIT TESTS ONLY) sets the Thelma home directory to the given path.
	SetHome(string) ThelmaBuilder
	// SetConfigOverride (FOR USE IN UNIT TESTS ONLY) sets a configuration override for the Thelma app.
	SetConfigOverride(key string, value interface{}) ThelmaBuilder
	// SetConfigOption (FOR USE IN UNIT TESTS ONLY) customizes configuration behavior for the Thelma app. (see config.Load for more info)
	SetConfigOption(option config.Option) ThelmaBuilder
	// NoManageSingletons (FOR USE IN UNIT TESTS ONLY) prevent this builder from initializing singletons
	NoManageSingletons() ThelmaBuilder
	// SetShellRunner (FOR USE IN UNIT TESTS ONLY) sets the shell runner that the Thelma app should use.
	SetShellRunner(shell.Runner) ThelmaBuilder
	// UseCustomStateLoader (FOR USE IN UNIT TESTS ONLY) configures Thelma to use a custom state loader instead of a "real" terra.State
	UseCustomStateLoader(stateLoader terra.StateLoader) ThelmaBuilder
}

ThelmaBuilder is a utility for initializing new ThelmaApp instances

func NewBuilder

func NewBuilder() ThelmaBuilder

Jump to

Keyboard shortcuts

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