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

     1  package hookstage
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/prebid/prebid-server/v2/adapters"
     7  )
     8  
     9  // RawBidderResponse 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 ignoring the bidder's response.
    16  type RawBidderResponse interface {
    17  	HandleRawBidderResponseHook(
    18  		context.Context,
    19  		ModuleInvocationContext,
    20  		RawBidderResponsePayload,
    21  	) (HookResult[RawBidderResponsePayload], error)
    22  }
    23  
    24  // RawBidderResponsePayload consists of a list of adapters.TypedBid
    25  // objects representing bids returned by a particular bidder.
    26  // Hooks are allowed to modify bids using mutations.
    27  type RawBidderResponsePayload struct {
    28  	Bids   []*adapters.TypedBid
    29  	Bidder string
    30  }