Documentation ¶
Index ¶
- Constants
- func Apply(rules map[string][]openrtb_ext.Adjustment, bidInfo *adapters.TypedBid, ...) (float64, string)
- func BuildRules(bidAdjustments *openrtb_ext.ExtRequestPrebidBidAdjustments) map[string][]openrtb_ext.Adjustment
- func Merge(req *openrtb_ext.RequestWrapper, ...) (*openrtb_ext.ExtRequestPrebidBidAdjustments, error)
- func Validate(bidAdjustments *openrtb_ext.ExtRequestPrebidBidAdjustments) bool
Constants ¶
View Source
const ( AdjustmentTypeCPM = "cpm" AdjustmentTypeMultiplier = "multiplier" AdjustmentTypeStatic = "static" WildCard = "*" Delimiter = "|" )
View Source
const ( VideoInstream = "video-instream" VideoOutstream = "video-outstream" )
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(rules map[string][]openrtb_ext.Adjustment, bidInfo *adapters.TypedBid, bidderName openrtb_ext.BidderName, currency string, reqInfo *adapters.ExtraRequestInfo, bidType string) (float64, string)
Apply gets the highest priority adjustment slice given a map of rules, and applies those adjustments to a bid's price
func BuildRules ¶
func BuildRules(bidAdjustments *openrtb_ext.ExtRequestPrebidBidAdjustments) map[string][]openrtb_ext.Adjustment
BuildRules() will populate the rules map with a rule that's a combination of the mediaType, bidderName, and dealId for a particular adjustment The result will be a map that'll map a given rule with its adjustment
func Merge ¶
func Merge(req *openrtb_ext.RequestWrapper, acctBidAdjs *openrtb_ext.ExtRequestPrebidBidAdjustments) (*openrtb_ext.ExtRequestPrebidBidAdjustments, error)
Merge takes bid adjustments defined on the request and on the account, and combines/validates them, with the adjustments on the request taking precedence.
func Validate ¶
func Validate(bidAdjustments *openrtb_ext.ExtRequestPrebidBidAdjustments) bool
Validate checks whether all provided bid adjustments are valid or not against the requirements defined in the issue
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.