github.com/prebid/prebid-server/v2@v2.18.0/hooks/hookstage/auctionresponse.go (about) 1 package hookstage 2 3 import ( 4 "context" 5 6 "github.com/prebid/openrtb/v20/openrtb2" 7 ) 8 9 // AuctionResponse hooks are invoked at the very end of request processing. 10 // The hooks are invoked even if the request was rejected at earlier stages. 11 // 12 // At this stage, account config is available, 13 // so it can be configured at the account-level execution plan, 14 // the account-level module config is passed to hooks. 15 // 16 // Rejection has no effect and is completely ignored at this stage. 17 type AuctionResponse interface { 18 HandleAuctionResponseHook( 19 context.Context, 20 ModuleInvocationContext, 21 AuctionResponsePayload, 22 ) (HookResult[AuctionResponsePayload], error) 23 } 24 25 // AuctionResponsePayload consists of a final openrtb2.BidResponse 26 // object that will be sent back to the requester. 27 // Hooks are allowed to modify openrtb2.BidResponse object. 28 type AuctionResponsePayload struct { 29 BidResponse *openrtb2.BidResponse 30 }