Documentation
¶
Overview ¶
Package scaffoldedsample was generated by tools/scaffold. See docs/planning/scaffolding-and-test-harness-guide.md and this feature's README.md for what was generated and how to regenerate it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module acts as the composition root for the scaffolded-sample feature.
func (*Module) Init ¶
Init wires the adapter and service using constructor injection (the generated default: service.New(m.repo)) and additionally registers ports.Service under its typed ServiceKey so other modules may resolve it via modulex.Resolve instead, if they prefer typed service location. See ports.ServiceKey's doc comment for when that's appropriate.
func (*Module) Repository ¶
func (m *Module) Repository() *adapters.InMemoryRepository
Repository exposes the module's underlying adapter for tests (see module_test.go), which use it with modtest.AssertResourceOwnership to verify Stop releases it. It is not a port, and other modules should not depend on it.