builder

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: BSD-3-Clause Imports: 6 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 {
	// App Returns the initialized ThelmaApp.
	// Panics if app has not yet been initialized.
	App() app.ThelmaApp
	// Build when first called, initializes a new ThelmaApp and saves it. Subsequent calls do nothing.
	Build() (app.ThelmaApp, error)
	// Close closes the App if one was initialized, otherwise does nothing
	Close() 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).
	// Panics if this app has already been initialized.
	WithTestDefaults() ThelmaBuilder
	// SetHome (FOR USE IN UNIT TESTS ONLY) sets the Thelma home directory to the given path.
	// Panics if this app has already been initialized.
	SetHome(string) ThelmaBuilder
	// SetConfigOverride (FOR USE IN UNIT TESTS ONLY) sets a configuration override for the Thelma app.
	// Panics if this app has already been initialized.
	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)
	// Panics if this app has already been initialized.
	SetConfigOption(option config.Option) ThelmaBuilder
	// SetShellRunner (FOR USE IN UNIT TESTS ONLY) sets the shell runner that the Thelma app should use.
	// Panics if this app has already been initialized.
	SetShellRunner(shell.Runner) 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