Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryRepository ¶
type InMemoryRepository struct {
// contains filtered or unexported fields
}
InMemoryRepository is a database adapter implementing ports.Repository, suitable for local development and tests. It also exposes Closed(), which is not part of ports.Repository — it lets tests verify (via modtest.AssertResourceOwnership) that module.go's Stop releases it. See docs/planning/scaffolding-and-test-harness-guide.md.
func NewInMemoryRepository ¶
func NewInMemoryRepository() *InMemoryRepository
NewInMemoryRepository creates a thread-safe local storage adapter.
func (*InMemoryRepository) Close ¶
func (r *InMemoryRepository) Close() error
Close marks the repository closed, releasing it. Safe to call more than once.
func (*InMemoryRepository) Closed ¶
func (r *InMemoryRepository) Closed() bool
Closed reports whether Close has been called. It satisfies modtest.ResourceOwner structurally, without this package importing modtest.
func (*InMemoryRepository) FindAll ¶
func (r *InMemoryRepository) FindAll(ctx context.Context) ([]domain.ScaffoldedSample, error)
func (*InMemoryRepository) Save ¶
func (r *InMemoryRepository) Save(ctx context.Context, item *domain.ScaffoldedSample) error
Click to show internal directories.
Click to hide internal directories.