github.com/prebid/prebid-server/v2@v2.18.0/hooks/hookstage/allprocessedbidresponses.go (about)

     1  package hookstage
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/prebid/prebid-server/v2/exchange/entities"
     7  	"github.com/prebid/prebid-server/v2/openrtb_ext"
     8  )
     9  
    10  // AllProcessedBidResponses hooks are invoked over a list of all
    11  // processed responses received from bidders before a winner is chosen.
    12  //
    13  // At this stage, account config is available,
    14  // so it can be configured at the account-level execution plan,
    15  // the account-level module config is passed to hooks.
    16  //
    17  // Rejection has no effect and is completely ignored at this stage.
    18  type AllProcessedBidResponses interface {
    19  	HandleAllProcessedBidResponsesHook(
    20  		context.Context,
    21  		ModuleInvocationContext,
    22  		AllProcessedBidResponsesPayload,
    23  	) (HookResult[AllProcessedBidResponsesPayload], error)
    24  }
    25  
    26  // AllProcessedBidResponsesPayload consists of a list of all
    27  // processed responses received from bidders.
    28  // Hooks are allowed to modify payload object and discard bids using mutations.
    29  type AllProcessedBidResponsesPayload struct {
    30  	Responses map[openrtb_ext.BidderName]*entities.PbsOrtbSeatBid
    31  }