Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BidderToPrebidSChains ¶
func BidderToPrebidSChains(sChains []*openrtb_ext.ExtRequestPrebidSChain) (map[string]*openrtb2.SupplyChain, error)
BidderToPrebidSChains organizes the ORTB 2.5 multiple root schain nodes into a map of schain nodes by bidder
Types ¶
type SChainWriter ¶
type SChainWriter struct {
// contains filtered or unexported fields
}
SChainWriter is used to write the appropriate schain for a particular bidder defined in the ORTB 2.5 multi-schain location (req.ext.prebid.schain) to the ORTB 2.5 location (req.source.ext)
func NewSChainWriter ¶
func NewSChainWriter(reqExt *openrtb_ext.ExtRequest, hostSChainNode *openrtb2.SupplyChainNode) (*SChainWriter, error)
NewSChainWriter creates an ORTB 2.5 schain writer instance
func (SChainWriter) Write ¶
func (w SChainWriter) Write(req *openrtb2.BidRequest, bidder string)
Write selects an schain from the multi-schain ORTB 2.5 location (req.ext.prebid.schains) for the specified bidder and copies it to the ORTB 2.5 location (req.source.ext). If no schain exists for the bidder in the multi-schain location and no wildcard schain exists, the request is not modified.