go-service
Go Service
Generate service files for GO modular architecture conventions.
When to Use
- Create reusable business services for a module
- Email senders, token generators, password hashers
- Template compilers, cache-backed lookups
- Any single-responsibility domain service consumed by use cases or other services.
Three-File Pattern
Every service requires up to three files:
- DTO structs (if needed):
internal/modules/<module>/dto/<service_name>_dto.go - Port interface:
internal/modules/<module>/ports/<service_name>_service.go - Service implementation:
internal/modules/<module>/service/<service_name>_service.go
More from cristiano-pacheco/ai-tools
go-gorm-model
Generate GORM persistence models. Use when creating database models using GORM.
78go-chi-handler
Generate Chi HTTP handlers, use case orchestration, Use for REST endpoint handlers or web http handlers.
26go-usecase
Generate use cases. Use when creating business operations, CRUD use cases, or any Execute-based module operation.
22go-enum
Generate type-safe enums with validation. Use when creating enums, defining constants, or adding enum types.
20go-cache
Generate Redis-backed Go cache. Invoke whenever user mentions cache or Redis.
20go-integration-tests
Generate Go integration tests with real database/infrastructure via itestkit containers. Use when testing use cases against real databases, verifying end-to-end flows, or adding integration test coverage.
20