Files
artifactapi/internal/provider/terraform
unkinben 5b830fc3de
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
refactor: modular local provider interfaces
Move package-type-specific local repo logic into provider packages via
optional interfaces, eliminating switch statements from handlers.

- provider.LocalUploader: ValidateUpload + UploadResponse
- provider.LocalIndexer: ServeLocalIndex + GenerateLocalIndex
- provider.FileStore: interface for querying local files (implemented
  by database.DB)

PyPI and Terraform providers now implement both interfaces. The local
handler and v1 proxy use type assertions to dispatch — adding a new
local repo type only requires implementing the interfaces in its
provider package, no handler changes needed.

local.go: 468 → 163 lines (removed all PyPI/Terraform specifics)
proxy.go: 211 → 136 lines (removed switch + helper methods)
engine.go: removed LocalIndexGenerator, uses provider.LocalIndexer
2026-06-23 22:41:29 +10:00
..
2026-06-07 19:30:35 +10:00