Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	mock.Mock
}

Event is an autogenerated mock type for the Event type

func NewEvent

func NewEvent(t interface {
	mock.TestingT
	Cleanup(func())
}) *Event

NewEvent creates a new instance of Event. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Event) EXPECT

func (_m *Event) EXPECT() *Event_Expecter

func (*Event) Handle

func (_m *Event) Handle(args []event.Arg) ([]event.Arg, error)

Handle provides a mock function with given fields: args

type Event_Expecter

type Event_Expecter struct {
	// contains filtered or unexported fields
}

func (*Event_Expecter) Handle

func (_e *Event_Expecter) Handle(args interface{}) *Event_Handle_Call

Handle is a helper method to define mock.On call

  • args []event.Arg

type Event_Handle_Call

type Event_Handle_Call struct {
	*mock.Call
}

Event_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle'

func (*Event_Handle_Call) Return

func (_c *Event_Handle_Call) Return(_a0 []event.Arg, _a1 error) *Event_Handle_Call

func (*Event_Handle_Call) Run

func (_c *Event_Handle_Call) Run(run func(args []event.Arg)) *Event_Handle_Call

func (*Event_Handle_Call) RunAndReturn

func (_c *Event_Handle_Call) RunAndReturn(run func([]event.Arg) ([]event.Arg, error)) *Event_Handle_Call

type Instance

type Instance struct {
	mock.Mock
}

Instance is an autogenerated mock type for the Instance type

func NewInstance

func NewInstance(t interface {
	mock.TestingT
	Cleanup(func())
}) *Instance

NewInstance creates a new instance of Instance. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Instance) Dispatch

func (_m *Instance) Dispatch(_a0 interface{}, args ...[]event.Arg) event.Result

Dispatch provides a mock function with given fields: _a0, args

func (*Instance) EXPECT

func (_m *Instance) EXPECT() *Instance_Expecter

func (*Instance) GetEvents

func (_m *Instance) GetEvents() map[event.Event][]event.Listener

GetEvents provides a mock function with no fields

func (*Instance) Job

func (_m *Instance) Job(_a0 event.Event, args []event.Arg) event.Task

Job provides a mock function with given fields: _a0, args

func (*Instance) Listen

func (_m *Instance) Listen(events interface{}, listeners ...interface{}) error

Listen provides a mock function with given fields: events, listeners

func (*Instance) Register

func (_m *Instance) Register(_a0 map[event.Event][]event.Listener)

Register provides a mock function with given fields: _a0

type Instance_Dispatch_Call

type Instance_Dispatch_Call struct {
	*mock.Call
}

Instance_Dispatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dispatch'

func (*Instance_Dispatch_Call) Return

func (*Instance_Dispatch_Call) Run

func (_c *Instance_Dispatch_Call) Run(run func(_a0 interface{}, args ...[]event.Arg)) *Instance_Dispatch_Call

func (*Instance_Dispatch_Call) RunAndReturn

func (_c *Instance_Dispatch_Call) RunAndReturn(run func(interface{}, ...[]event.Arg) event.Result) *Instance_Dispatch_Call

type Instance_Expecter

type Instance_Expecter struct {
	// contains filtered or unexported fields
}

func (*Instance_Expecter) Dispatch

func (_e *Instance_Expecter) Dispatch(_a0 interface{}, args ...interface{}) *Instance_Dispatch_Call

Dispatch is a helper method to define mock.On call

  • _a0 interface{}
  • args ...[]event.Arg

func (*Instance_Expecter) GetEvents

func (_e *Instance_Expecter) GetEvents() *Instance_GetEvents_Call

GetEvents is a helper method to define mock.On call

func (*Instance_Expecter) Job

func (_e *Instance_Expecter) Job(_a0 interface{}, args interface{}) *Instance_Job_Call

Job is a helper method to define mock.On call

  • _a0 event.Event
  • args []event.Arg

func (*Instance_Expecter) Listen

func (_e *Instance_Expecter) Listen(events interface{}, listeners ...interface{}) *Instance_Listen_Call

Listen is a helper method to define mock.On call

  • events interface{}
  • listeners ...interface{}

func (*Instance_Expecter) Register

func (_e *Instance_Expecter) Register(_a0 interface{}) *Instance_Register_Call

Register is a helper method to define mock.On call

  • _a0 map[event.Event][]event.Listener

type Instance_GetEvents_Call

type Instance_GetEvents_Call struct {
	*mock.Call
}

Instance_GetEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEvents'

func (*Instance_GetEvents_Call) Return

func (*Instance_GetEvents_Call) Run

func (_c *Instance_GetEvents_Call) Run(run func()) *Instance_GetEvents_Call

func (*Instance_GetEvents_Call) RunAndReturn

func (_c *Instance_GetEvents_Call) RunAndReturn(run func() map[event.Event][]event.Listener) *Instance_GetEvents_Call

type Instance_Job_Call

type Instance_Job_Call struct {
	*mock.Call
}

Instance_Job_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Job'

func (*Instance_Job_Call) Return

func (_c *Instance_Job_Call) Return(_a0 event.Task) *Instance_Job_Call

func (*Instance_Job_Call) Run

func (_c *Instance_Job_Call) Run(run func(_a0 event.Event, args []event.Arg)) *Instance_Job_Call

func (*Instance_Job_Call) RunAndReturn

func (_c *Instance_Job_Call) RunAndReturn(run func(event.Event, []event.Arg) event.Task) *Instance_Job_Call

type Instance_Listen_Call

type Instance_Listen_Call struct {
	*mock.Call
}

Instance_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'

func (*Instance_Listen_Call) Return

func (*Instance_Listen_Call) Run

func (_c *Instance_Listen_Call) Run(run func(events interface{}, listeners ...interface{})) *Instance_Listen_Call

func (*Instance_Listen_Call) RunAndReturn

func (_c *Instance_Listen_Call) RunAndReturn(run func(interface{}, ...interface{}) error) *Instance_Listen_Call

type Instance_Register_Call

type Instance_Register_Call struct {
	*mock.Call
}

Instance_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'

func (*Instance_Register_Call) Return

func (*Instance_Register_Call) Run

func (*Instance_Register_Call) RunAndReturn

func (_c *Instance_Register_Call) RunAndReturn(run func(map[event.Event][]event.Listener)) *Instance_Register_Call

type Listener

type Listener struct {
	mock.Mock
}

Listener is an autogenerated mock type for the Listener type

func NewListener

func NewListener(t interface {
	mock.TestingT
	Cleanup(func())
}) *Listener

NewListener creates a new instance of Listener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Listener) EXPECT

func (_m *Listener) EXPECT() *Listener_Expecter

func (*Listener) Handle

func (_m *Listener) Handle(eventName string, args ...interface{}) error

Handle provides a mock function with given fields: eventName, args

func (*Listener) Queue

func (_m *Listener) Queue(args ...interface{}) event.Queue

Queue provides a mock function with given fields: args

func (*Listener) Signature

func (_m *Listener) Signature() string

Signature provides a mock function with no fields

type Listener_Expecter

type Listener_Expecter struct {
	// contains filtered or unexported fields
}

func (*Listener_Expecter) Handle

func (_e *Listener_Expecter) Handle(eventName interface{}, args ...interface{}) *Listener_Handle_Call

Handle is a helper method to define mock.On call

  • eventName string
  • args ...interface{}

func (*Listener_Expecter) Queue

func (_e *Listener_Expecter) Queue(args ...interface{}) *Listener_Queue_Call

Queue is a helper method to define mock.On call

  • args ...interface{}

func (*Listener_Expecter) Signature

func (_e *Listener_Expecter) Signature() *Listener_Signature_Call

Signature is a helper method to define mock.On call

type Listener_Handle_Call

type Listener_Handle_Call struct {
	*mock.Call
}

Listener_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle'

func (*Listener_Handle_Call) Return

func (*Listener_Handle_Call) Run

func (_c *Listener_Handle_Call) Run(run func(eventName string, args ...interface{})) *Listener_Handle_Call

func (*Listener_Handle_Call) RunAndReturn

func (_c *Listener_Handle_Call) RunAndReturn(run func(string, ...interface{}) error) *Listener_Handle_Call

type Listener_Queue_Call

type Listener_Queue_Call struct {
	*mock.Call
}

Listener_Queue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Queue'

func (*Listener_Queue_Call) Return

func (*Listener_Queue_Call) Run

func (_c *Listener_Queue_Call) Run(run func(args ...interface{})) *Listener_Queue_Call

func (*Listener_Queue_Call) RunAndReturn

func (_c *Listener_Queue_Call) RunAndReturn(run func(...interface{}) event.Queue) *Listener_Queue_Call

type Listener_Signature_Call

type Listener_Signature_Call struct {
	*mock.Call
}

Listener_Signature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Signature'

func (*Listener_Signature_Call) Return

func (*Listener_Signature_Call) Run

func (_c *Listener_Signature_Call) Run(run func()) *Listener_Signature_Call

func (*Listener_Signature_Call) RunAndReturn

func (_c *Listener_Signature_Call) RunAndReturn(run func() string) *Listener_Signature_Call

type Result

type Result struct {
	mock.Mock
}

Result is an autogenerated mock type for the Result type

func NewResult

func NewResult(t interface {
	mock.TestingT
	Cleanup(func())
}) *Result

NewResult creates a new instance of Result. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Result) EXPECT

func (_m *Result) EXPECT() *Result_Expecter

func (*Result) Error

func (_m *Result) Error() error

Error provides a mock function with no fields

func (*Result) Errors

func (_m *Result) Errors() []error

Errors provides a mock function with no fields

func (*Result) Failed

func (_m *Result) Failed() bool

Failed provides a mock function with no fields

type Result_Error_Call

type Result_Error_Call struct {
	*mock.Call
}

Result_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error'

func (*Result_Error_Call) Return

func (_c *Result_Error_Call) Return(_a0 error) *Result_Error_Call

func (*Result_Error_Call) Run

func (_c *Result_Error_Call) Run(run func()) *Result_Error_Call

func (*Result_Error_Call) RunAndReturn

func (_c *Result_Error_Call) RunAndReturn(run func() error) *Result_Error_Call

type Result_Errors_Call

type Result_Errors_Call struct {
	*mock.Call
}

Result_Errors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Errors'

func (*Result_Errors_Call) Return

func (_c *Result_Errors_Call) Return(_a0 []error) *Result_Errors_Call

func (*Result_Errors_Call) Run

func (_c *Result_Errors_Call) Run(run func()) *Result_Errors_Call

func (*Result_Errors_Call) RunAndReturn

func (_c *Result_Errors_Call) RunAndReturn(run func() []error) *Result_Errors_Call

type Result_Expecter

type Result_Expecter struct {
	// contains filtered or unexported fields
}

func (*Result_Expecter) Error

func (_e *Result_Expecter) Error() *Result_Error_Call

Error is a helper method to define mock.On call

func (*Result_Expecter) Errors

func (_e *Result_Expecter) Errors() *Result_Errors_Call

Errors is a helper method to define mock.On call

func (*Result_Expecter) Failed

func (_e *Result_Expecter) Failed() *Result_Failed_Call

Failed is a helper method to define mock.On call

type Result_Failed_Call

type Result_Failed_Call struct {
	*mock.Call
}

Result_Failed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Failed'

func (*Result_Failed_Call) Return

func (_c *Result_Failed_Call) Return(_a0 bool) *Result_Failed_Call

func (*Result_Failed_Call) Run

func (_c *Result_Failed_Call) Run(run func()) *Result_Failed_Call

func (*Result_Failed_Call) RunAndReturn

func (_c *Result_Failed_Call) RunAndReturn(run func() bool) *Result_Failed_Call

type Task

type Task struct {
	mock.Mock
}

Task is an autogenerated mock type for the Task type

func NewTask

func NewTask(t interface {
	mock.TestingT
	Cleanup(func())
}) *Task

NewTask creates a new instance of Task. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Task) Dispatch

func (_m *Task) Dispatch() error

Dispatch provides a mock function with no fields

func (*Task) EXPECT

func (_m *Task) EXPECT() *Task_Expecter

type Task_Dispatch_Call

type Task_Dispatch_Call struct {
	*mock.Call
}

Task_Dispatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dispatch'

func (*Task_Dispatch_Call) Return

func (_c *Task_Dispatch_Call) Return(_a0 error) *Task_Dispatch_Call

func (*Task_Dispatch_Call) Run

func (_c *Task_Dispatch_Call) Run(run func()) *Task_Dispatch_Call

func (*Task_Dispatch_Call) RunAndReturn

func (_c *Task_Dispatch_Call) RunAndReturn(run func() error) *Task_Dispatch_Call

type Task_Expecter

type Task_Expecter struct {
	// contains filtered or unexported fields
}

func (*Task_Expecter) Dispatch

func (_e *Task_Expecter) Dispatch() *Task_Dispatch_Call

Dispatch is a helper method to define mock.On call

Jump to

Keyboard shortcuts

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