github.com/prebid/prebid-server@v0.275.0/hooks/hookstage/processedauctionrequest.go (about)

     1  package hookstage
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/prebid/prebid-server/openrtb_ext"
     7  )
     8  
     9  // ProcessedAuctionRequest hooks are invoked after the request is parsed
    10  // and enriched with additional data.
    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 results in sending an empty BidResponse
    17  // with the NBR code indicating the rejection reason.
    18  type ProcessedAuctionRequest interface {
    19  	HandleProcessedAuctionHook(
    20  		context.Context,
    21  		ModuleInvocationContext,
    22  		ProcessedAuctionRequestPayload,
    23  	) (HookResult[ProcessedAuctionRequestPayload], error)
    24  }
    25  
    26  // ProcessedAuctionRequestPayload consists of the openrtb_ext.RequestWrapper object.
    27  // Hooks are allowed to modify openrtb_ext.RequestWrapper using mutations.
    28  type ProcessedAuctionRequestPayload struct {
    29  	RequestWrapper *openrtb_ext.RequestWrapper
    30  }