module

package
v0.0.0-...-8991645 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type MockIModuleContext struct {
	mock.Mock
}

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:

type Module

type Module interface {
	Startup(context.Context, IModuleContext) (*dig.Container, error)
}

Jump to

Keyboard shortcuts

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