adapters

package
v2.10.0-ow Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BidderParamApacdex_siteId       = "siteId"
	BidderParamApacdex_placementId  = "placementId"
	BidderParamApacdex_geo          = "geo"
	BidderParamApacdex_floorPrice   = "floorPrice"
	BidderParamBoldwinPlacementID   = "placementId"
	BidderParamBoldwinEndpointID    = "endpointId"
	BidderParamColossusTagID        = "TagID"
	BidderParamColossusgroupID      = "groupId"
	BidderNextmillenniumPlacementID = "placement_id"
	BidderNextmillenniumgroupID     = "group_id"
)

Bidder Params

View Source
const FloatValuePrecision = 2

Variables

This section is empty.

Functions

func Alias

func Alias() map[string]string

Alias will return copy of exisiting alias

func FixBidderParams

func FixBidderParams(reqID, adapterName, bidderCode string, ext json.RawMessage) (json.RawMessage, error)

FixBidderParams will fixes bidder parameter types for prebid auction endpoint(UOE-5744)

func GetBuilder

func GetBuilder(adapterName string) builder

getBuilder will return core bidder hard coded builder, if not found then returns default builder

func InitBidders

func InitBidders(schemaDirectory string) error

InitBidders will initialise bidder alias, default bidder parameter json and builders for each bidder

func PrepareBidParamJSONForPartner

func PrepareBidParamJSONForPartner(width *int64, height *int64, fieldMap map[string]interface{}, slotKey, adapterName, bidderCode string, impExt *models.ImpExtension) (json.RawMessage, error)

PrepareBidParamJSONForPartner preparing bid params json for partner

func PrepareVASTBidderParamJSON

func PrepareVASTBidderParamJSON(pubVASTTags models.PublisherVASTTags, matchedSlotKeys []string, slotMap map[string]models.SlotMapping) json.RawMessage

func ResolveOWBidder

func ResolveOWBidder(bidderName string) string

Types

type ArrayItemsType

type ArrayItemsType struct {
	Type string `json:"type"`
}

ArrayItemsType defines items type as per JSON schema files in static/bidder-param

type BidderParamJSON

type BidderParamJSON struct {
	Title        string                     `json:"title"`
	Properties   map[string]BidderParameter `json:"properties"`
	Required     []string                   `json:"required"`
	OneOf        interface{}                `json:"oneOf"`
	Not          interface{}                `json:"not"`
	AnyOf        interface{}                `json:"anyOf"`
	Dependencies interface{}                `json:"dependencies"`
}

BidderParamJSON defines type as per JSON schema files in static/bidder-param

type BidderParameter

type BidderParameter struct {
	Type  interface{}    `json:"type"`
	Items ArrayItemsType `json:"items"`
}

BidderParameter defines properties type as per JSON schema files in static/bidder-param

type BidderParameters

type BidderParameters struct {
	//AdapterName, BidderCode should be passed in builder function
	ReqID                   string
	AdapterName, BidderCode string
	ImpExt                  *models.ImpExtension

	//bidder specific parameters
	FieldMap      JSONObject
	Width, Height *int64
	SlotKey       string
}

BidderParameters provides all properties requires for bidder to generate bidder json

type JSONObject

type JSONObject = map[string]interface{}

JSONObject generic JSON object

type ParameterMapping

type ParameterMapping struct {
	BidderParamName string      `json:"bidderParameterName,omitempty"`
	KeyName         string      `json:"keyName,omitempty"`
	Datatype        string      `json:"type,omitempty"`
	Required        bool        `json:"required,omitempty"`
	DefaultValue    interface{} `json:"defaultValue,omitempty"`
}

ParameterMapping holds mapping information for bidder parameter

Jump to

Keyboard shortcuts

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