package adapters import ( "context" "errors" oppintel "github.com/missionworkforce/missionmatch/internal/modules/opportunity_intelligence" ) // The commercial and closed source feeds below are STUBS ONLY: they implement the OpportunitySource // protocol so they can be registered like any live feed, but they make NO network call and yield NO // records. They exist so the source registry is complete and so a deliberate, documented constraint // stands at the exact place a future engineer would wire the feed, which keeps proprietary data from ever // reaching customer facing output before the right license or credential is in place. See README.md in // this package for the constraint on each. // ErrRequiresLicense signals a commercial feed that needs a data redistribution or OEM license before any // customer facing use. ErrRequiresTenantCredential signals a closed system reachable only with the // customer's own credential, never a bought, shared feed. var ( ErrRequiresLicense = errors.New("adapters: commercial feed requires a data redistribution or OEM license, not enabled") ErrRequiresTenantCredential = errors.New("adapters: closed feed requires the customer's own credential, not enabled") ) // GovWinIQSource is a STUB for Deltek GovWin IQ, a commercial federal market intelligence database. It is // not enabled: GovWin data may not be redistributed into customer facing output without a data // redistribution or OEM license from Deltek. Fetch makes no live call. type GovWinIQSource struct{} func (GovWinIQSource) Name() string { return "GovWin IQ" } func (GovWinIQSource) Fetch(_ context.Context, _ func(oppintel.OpportunityRecord) error) error { return ErrRequiresLicense } // GovTribeSource is a STUB for GovTribe, a commercial federal market intelligence service. It is not // enabled for the same reason as GovWin: a redistribution or OEM license is required first. Fetch makes // no live call. type GovTribeSource struct{} func (GovTribeSource) Name() string { return "GovTribe" } func (GovTribeSource) Fetch(_ context.Context, _ func(oppintel.OpportunityRecord) error) error { return ErrRequiresLicense } // EBuySource is a STUB for GSA eBuy, a closed RFQ system. It can NEVER be a bought, shared feed: eBuy is // reachable only with the customer's own GSA Schedule login and exposes only the RFQs issued against the // SINs that customer holds. It can work only as a per tenant credential connector, acting on behalf of // one customer with that customer's own credential. The stub holds the tenant id it would act for and // makes no live call until a per tenant credential vault and connector exist. type EBuySource struct { TenantID string } // NewEBuySource builds the per tenant eBuy stub for a given tenant. It performs no network call. func NewEBuySource(tenantID string) *EBuySource { return &EBuySource{TenantID: tenantID} } func (*EBuySource) Name() string { return "GSA eBuy" } func (*EBuySource) Fetch(_ context.Context, _ func(oppintel.OpportunityRecord) error) error { return ErrRequiresTenantCredential }