Skip to content

repository capability

repository adds a generic repository pattern to your Go service using Go generics, providing a consistent data access abstraction.

  • Repository interface
  • Base implementation with common CRUD operations

Use repository to keep data access logic separate from business logic. The generic implementation reduces boilerplate across entities. Pairs naturally with postgres or mysql as the backing store.

Suggests: postgres, mysql

Terminal window
verikt new my-service --language go --cap postgres,repository
# or add to an existing service:
verikt add repository

postgres

PostgreSQL as the backing store for repositories.

mysql

MySQL as the backing store for repositories.

ddd

DDD building blocks that pair naturally with the repository pattern.