Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapt ¶
func Adapt(opts ...*WithOption) gdt.Fixture
Adapt returns a simple object that implements the interfaces.Fixture interface from one or more WithOptions describing starter, stopper functions or a state map
Types ¶
type WithOption ¶
type WithOption struct {
Starter func()
Stopper func()
State map[string]interface{}
}
func WithStart ¶
func WithStart(starter func()) WithOption
WithStart allows a starter functor to be adapted into a fixture
func WithState ¶
func WithState(state map[string]interface{}) WithOption
WithState allows a map of state key/values to be adapted into a fixture
func WithStop ¶
func WithStop(stopper func()) WithOption
WithStop allows a stopper functor to be adapted into a fixture