Go 1.22.0 foi instalado com sucesso em C:\go
go version
# Output: go version go1.22.0 windows/amd64C:\Users\MambaPê\Desktop\payment-event-processor\bin\payment-processor.exe
Tamanho: ~15 MB
TestEventTypeValidation ✓
TestInvoiceStatusTransitions ✓
TestSubscriptionStatusTransitions ✓
TestHealthEndpoint ✓
TestSignatureGeneration ✓
TestWebhookPayloadParsing ✓
TestContextCancellation ✓
TestJSONResponse ✓
Total: 21 testes - TODOS PASSARAM
# Ir para o diretório do projeto
cd "c:\Users\MambaPê\Desktop\payment-event-processor"
# Iniciar containers
docker compose up -d postgres redis# Opção A: Executar binário compilado
.\bin\payment-processor.exe
# Opção B: Rodar direto via Go
go run ./cmd/server# Health check
curl http://localhost:8080/health
# Métricas
curl http://localhost:8080/metrics
# Enviar webhook de teste
.\scripts\test-webhook.ps1 -EventType "payment_succeeded"Criar arquivo .env baseado em .env.example:
PORT=8080
ENV=development
DATABASE_URL=postgres://payments:payments123@localhost:5432/payments?sslmode=disable
REDIS_URL=redis://localhost:6379/0
WEBHOOK_SECRET=whsec_test_secret_key_for_development
RATE_LIMIT_REQUESTS=100
WORKER_CONCURRENCY=5
WORKER_MAX_RETRIES=3# Build
go build -o bin/payment-processor.exe ./cmd/server
# Testes
go test -v ./...
# Formato/Lint
go fmt ./...
# Dependências
go mod tidy✅ Sistema pronto para desenvolvimento!