github.com/prebid/prebid-server@v0.275.0/hooks/hookstage/bidderrequest.go (about) 1 package hookstage 2 3 import ( 4 "context" 5 6 "github.com/prebid/openrtb/v19/openrtb2" 7 ) 8 9 // BidderRequest hooks are invoked for each bidder participating in auction. 10 // 11 // At this stage, account config is available, 12 // so it can be configured at the account-level execution plan, 13 // the account-level module config is passed to hooks. 14 // 15 // Rejection results in skipping the bidder's request. 16 type BidderRequest interface { 17 HandleBidderRequestHook( 18 context.Context, 19 ModuleInvocationContext, 20 BidderRequestPayload, 21 ) (HookResult[BidderRequestPayload], error) 22 } 23 24 // BidderRequestPayload consists of the openrtb2.BidRequest object 25 // distilled for the particular bidder. 26 // Hooks are allowed to modify openrtb2.BidRequest using mutations. 27 type BidderRequestPayload struct { 28 BidRequest *openrtb2.BidRequest 29 Bidder string 30 }