util

package
v1.200.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//prebid_ctv_errors
	UnableToGenerateImpressionsError = &errortypes.AdpodPrefiltering{Message: `prebid_ctv unable to generate impressions for adpod`}

	//prebid_ctv_warnings
	DurationMismatchWarning      = &openrtb_ext.ExtBidderMessage{Code: errortypes.AdpodPostFilteringWarningCode, Message: `prebid_ctv all bids filtered while matching lineitem duration`}
	UnableToGenerateAdPodWarning = &openrtb_ext.ExtBidderMessage{Code: errortypes.AdpodPostFilteringWarningCode, Message: `prebid_ctv unable to generate adpod from bids combinations`}
)
View Source
var Logf = func(msg string, args ...interface{}) {
	if glog.V(3) {
		glog.Infof(msg, args...)
	}

}

Functions

func DecodeImpressionID

func DecodeImpressionID(id string) (string, int)

func ErrToBidderMessage

func ErrToBidderMessage(err error) *openrtb_ext.ExtBidderMessage

ErrToBidderMessage will return error message in ExtBidderMessage format

func GetCTVImpressionID

func GetCTVImpressionID(impID string, seqNo int) string

func GetDealTierSatisfied

func GetDealTierSatisfied(ext *openrtb_ext.ExtBid) bool

GetDealTierSatisfied ...

func GetDurationWiseBidsBucket

func GetDurationWiseBidsBucket(bids []*types.Bid) types.BidsBuckets

func GetNearestDuration

func GetNearestDuration(duration int64, config []*types.ImpAdPodConfig) int64

GetNearestDuration will return nearest duration value present in ImpAdPodConfig objects it will return -1 if it doesn't found any match

func GetTargeting

func GetTargeting(key openrtb_ext.TargetingKey, bidder openrtb_ext.BidderName, bid openrtb2.Bid) (string, error)

GetTargeting returns the value of targeting key associated with bidder it is expected that bid.Ext contains prebid.targeting map if value not present or any error occured empty value will be returned along with error.

func GetUniqueBidID

func GetUniqueBidID(bidID string, id int) string

func JLogf

func JLogf(msg string, obj interface{})

func TimeTrack

func TimeTrack(start time.Time, name string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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