feat(10-01): add provider-driven query generator and RegisterAll skeleton
- BuildQueries(reg, source) dedups keywords and formats per-source syntax - github/gist use 'keyword' in:file; others use bare keyword - SourcesConfig placeholder struct for Wave 2 plans to depend on - RegisterAll no-op stub (Plan 10-09 will fill)
This commit is contained in:
32
pkg/recon/sources/register.go
Normal file
32
pkg/recon/sources/register.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package sources
|
||||
|
||||
import (
|
||||
"github.com/salvacybersec/keyhunter/pkg/providers"
|
||||
"github.com/salvacybersec/keyhunter/pkg/recon"
|
||||
)
|
||||
|
||||
// SourcesConfig carries per-source credentials and shared dependencies read
|
||||
// from viper/env by cmd/recon.go. Plan 10-09 fleshes this out; for now it is a
|
||||
// placeholder struct so Wave 2 plans can depend on its shape.
|
||||
type SourcesConfig struct {
|
||||
GitHubToken string
|
||||
GitLabToken string
|
||||
BitbucketToken string
|
||||
HuggingFaceToken string
|
||||
KaggleUser string
|
||||
KaggleKey string
|
||||
|
||||
Registry *providers.Registry
|
||||
Limiters *recon.LimiterRegistry
|
||||
}
|
||||
|
||||
// RegisterAll registers every Phase 10 code-hosting source on engine.
|
||||
// Wave 2 plans append their source constructors here via additional
|
||||
// registerXxx helpers in this file. Plan 10-09 writes the final list.
|
||||
func RegisterAll(engine *recon.Engine, cfg SourcesConfig) {
|
||||
if engine == nil {
|
||||
return
|
||||
}
|
||||
_ = cfg // wired up in Wave 2 + Plan 10-09
|
||||
// Populated by Plan 10-09 (after Wave 2 lands individual source files).
|
||||
}
|
||||
Reference in New Issue
Block a user