Documentation ¶
Index ¶
- type AllCallback
- type Callback
- type Hooks
- func (h *Hooks) After(name string, fn Callback)
- func (h *Hooks) AfterAll(fn AllCallback)
- func (h *Hooks) AfterEach(fn Callback)
- func (h *Hooks) Before(name string, fn Callback)
- func (h *Hooks) BeforeAll(fn AllCallback)
- func (h *Hooks) BeforeEach(fn Callback)
- func (h *Hooks) BeforeEachValidation(fn Callback)
- func (h *Hooks) BeforeValidation(name string, fn Callback)
- type HooksRunner
- func (h *HooksRunner) RunAfter(args trans.Transaction, reply *trans.Transaction) error
- func (h *HooksRunner) RunAfterAll(args []*trans.Transaction, reply *[]*trans.Transaction) error
- func (h *HooksRunner) RunAfterEach(args trans.Transaction, reply *trans.Transaction) error
- func (h *HooksRunner) RunBefore(args trans.Transaction, reply *trans.Transaction) error
- func (h *HooksRunner) RunBeforeAll(args []*trans.Transaction, reply *[]*trans.Transaction) error
- func (h *HooksRunner) RunBeforeEach(args trans.Transaction, reply *trans.Transaction) error
- func (h *HooksRunner) RunBeforeEachValidation(args trans.Transaction, reply *trans.Transaction) error
- func (h *HooksRunner) RunBeforeValidation(args trans.Transaction, reply *trans.Transaction) error
- type RunnerRPC
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllCallback ¶
type AllCallback func([]*trans.Transaction)
AllCallback is a func type that accepts a slice of Transaction pointers.
type Callback ¶
type Callback func(*trans.Transaction)
Callback is a func type that accepts a Transaction pointer.
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks is responsible for storing lifecycle callbacks.
func NewHooks ¶
func NewHooks() *Hooks
NewHooks returns a new Hooks instance with all callback fields initialized.
func (*Hooks) AfterAll ¶
func (h *Hooks) AfterAll(fn AllCallback)
AfterAll adds a callback function to be called before the entire test suite.
func (*Hooks) BeforeAll ¶
func (h *Hooks) BeforeAll(fn AllCallback)
BeforeAll adds a callback function to be called before the entire test suite.
func (*Hooks) BeforeEach ¶
BeforeEach adds a callback function to be called before each transaction.
func (*Hooks) BeforeEachValidation ¶
BeforeEachValidation adds a callback function to be called before each transaction.
func (*Hooks) BeforeValidation ¶
BeforeValidation adds a callback function to be called before a named transaction.
type HooksRunner ¶
type HooksRunner struct {
// contains filtered or unexported fields
}
Hooks is responsible for running lifecycle callbacks.
func NewHooksRunner ¶
func NewHooksRunner(h *Hooks) *HooksRunner
NewHooksRunner returns a new HooksRunner instance with a given hooks structure.
func (*HooksRunner) RunAfter ¶
func (h *HooksRunner) RunAfter(args trans.Transaction, reply *trans.Transaction) error
func (*HooksRunner) RunAfterAll ¶
func (h *HooksRunner) RunAfterAll(args []*trans.Transaction, reply *[]*trans.Transaction) error
func (*HooksRunner) RunAfterEach ¶
func (h *HooksRunner) RunAfterEach(args trans.Transaction, reply *trans.Transaction) error
func (*HooksRunner) RunBefore ¶
func (h *HooksRunner) RunBefore(args trans.Transaction, reply *trans.Transaction) error
func (*HooksRunner) RunBeforeAll ¶
func (h *HooksRunner) RunBeforeAll(args []*trans.Transaction, reply *[]*trans.Transaction) error
func (*HooksRunner) RunBeforeEach ¶
func (h *HooksRunner) RunBeforeEach(args trans.Transaction, reply *trans.Transaction) error
func (*HooksRunner) RunBeforeEachValidation ¶
func (h *HooksRunner) RunBeforeEachValidation(args trans.Transaction, reply *trans.Transaction) error
func (*HooksRunner) RunBeforeValidation ¶
func (h *HooksRunner) RunBeforeValidation(args trans.Transaction, reply *trans.Transaction) error
type RunnerRPC ¶
type RunnerRPC interface { RunBeforeAll(args []*trans.Transaction, reply *[]*trans.Transaction) error RunBeforeEach(args trans.Transaction, reply *trans.Transaction) error RunBefore(args trans.Transaction, reply *trans.Transaction) error RunBeforeEachValidation(args trans.Transaction, reply *trans.Transaction) error RunBeforeValidation(args trans.Transaction, reply *trans.Transaction) error RunAfter(args trans.Transaction, reply *trans.Transaction) error RunAfterEach(args trans.Transaction, reply *trans.Transaction) error RunAfterAll(args []*trans.Transaction, reply *[]*trans.Transaction) error }