github.com/prebid/prebid-server/v2@v2.18.0/hooks/hookstage/rawauctionrequest.go (about) 1 package hookstage 2 3 import ( 4 "context" 5 ) 6 7 // RawAuctionRequest hooks are invoked only for "/openrtb2/auction" 8 // endpoint after retrieving the account config, 9 // but before the request is parsed and any additions are made. 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 sending an empty BidResponse 16 // with the NBR code indicating the rejection reason. 17 type RawAuctionRequest interface { 18 HandleRawAuctionHook( 19 context.Context, 20 ModuleInvocationContext, 21 RawAuctionRequestPayload, 22 ) (HookResult[RawAuctionRequestPayload], error) 23 } 24 25 // RawAuctionRequestPayload represents a raw body of the openrtb2.BidRequest. 26 // Hooks are allowed to modify body using mutations. 27 type RawAuctionRequestPayload []byte