Documentation ¶
Index ¶
- type IModuleContext
- type MockIModuleContext
- func (_m *MockIModuleContext) Config() config.IConfig
- func (_m *MockIModuleContext) EventDispatcher() ddd.IEventDispatcher[ddd.IEvent]
- func (_m *MockIModuleContext) KvRepository() repository.IKVRepository
- func (_m *MockIModuleContext) Logger() *zap.Logger
- func (_m *MockIModuleContext) Mux() *chi.Mux
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IModuleContext ¶
type IModuleContext interface { Mux() *chi.Mux Logger() *zap.Logger Config() config.IConfig KvRepository() repository.IKVRepository EventDispatcher() ddd.IEventDispatcher[ddd.IEvent] // translate k8s event into domain event }
chi.Mux is the implementation of chi.Router interface all the singleton/stateful is provided in the ModuleContext
type MockIModuleContext ¶
MockIModuleContext is an autogenerated mock type for the IModuleContext type
func NewMockIModuleContext ¶
func NewMockIModuleContext(t interface { mock.TestingT Cleanup(func()) }) *MockIModuleContext
NewMockIModuleContext creates a new instance of MockIModuleContext. 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 (*MockIModuleContext) Config ¶
func (_m *MockIModuleContext) Config() config.IConfig
Config provides a mock function with given fields:
func (*MockIModuleContext) EventDispatcher ¶
func (_m *MockIModuleContext) EventDispatcher() ddd.IEventDispatcher[ddd.IEvent]
EventDispatcher provides a mock function with given fields:
func (*MockIModuleContext) KvRepository ¶
func (_m *MockIModuleContext) KvRepository() repository.IKVRepository
KvRepository provides a mock function with given fields:
func (*MockIModuleContext) Logger ¶
func (_m *MockIModuleContext) Logger() *zap.Logger
Logger provides a mock function with given fields:
func (*MockIModuleContext) Mux ¶
func (_m *MockIModuleContext) Mux() *chi.Mux
Mux provides a mock function with given fields: