bidadjustment

package
v0.257.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL