directory
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Jul 11, 2026
License: MIT
Opens a new window with license information.
README
¶
internal/usecase
Pattern used
- Interface + private impl per usecase for testability. Both in the same
<feature>_usecase.go file.
- Dependencies via constructors. Returns
apperr errors.
- Single-capability feature:
<feature>/<feature>_usecase.go (e.g. health/health_usecase.go).
- Multi-capability feature: subdirs per capability (e.g.
auth/otp/otp_usecase.go); shared types in parent (auth/auth_types.go).
How to extend
- Create
<feature>/<feature>_usecase.go with interface + New(...).
- For multi-capability features, add subdirs with one
<capability>_usecase.go each; keep shared types in parent.
- Keep framework and SQL details out.
Directories
¶
Click to show internal directories.
Click to hide internal directories.