Version: v0.258.0 Latest Latest

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 42




View Source
const (
	MacroKeyBidID       = "PBS-BIDID"
	MacroKeyAppBundle   = "PBS-APPBUNDLE"
	MacroKeyDomain      = "PBS-DOMAIN"
	MacroKeyPubDomain   = "PBS-PUBDOMAIN"
	MacroKeyPageURL     = "PBS-PAGEURL"
	MacroKeyAccountID   = "PBS-ACCOUNTID"
	MacroKeyLmtTracking = "PBS-LIMITADTRACKING"
	MacroKeyConsent     = "PBS-GDPRCONSENT"
	MacroKeyBidder      = "PBS-BIDDER"
	MacroKeyIntegration = "PBS-INTEGRATION"
	MacroKeyTimestamp   = "PBS-TIMESTAMP"
	MacroKeyAuctionID   = "PBS-AUCTIONID"
	MacroKeyChannel     = "PBS-CHANNEL"
	MacroKeyEventType   = "PBS-EVENTTYPE"
	MacroKeyVastEvent   = "PBS-VASTEVENT"
View Source
const (
	CustomMacroPrefix = "PBS-MACRO-"


This section is empty.


func NewProvider added in v0.257.0

func NewProvider(reqWrapper *openrtb_ext.RequestWrapper) *macroProvider

NewBuilder returns the instance of macro buidler

func ResolveMacros

func ResolveMacros(aTemplate *template.Template, params interface{}) (string, error)

ResolveMacros resolves macros in the given template with the provided params


type EndpointTemplateParams

type EndpointTemplateParams struct {
	Host        string
	PublisherID string
	ZoneID      string
	SourceId    string
	AccountID   string
	AdUnit      string
	MediaType   string
	GvlID       string

EndpointTemplateParams specifies params for an endpoint template

type Replacer added in v0.257.0

type Replacer interface {
	// Replace the macros and returns replaced string
	// if any error the error will be returned
	Replace(url string, macroProvider *macroProvider) (string, error)

func NewStringIndexBasedReplacer added in v0.257.0

func NewStringIndexBasedReplacer() Replacer

NewStringIndexBasedReplacer will return instance of string index based macro replacer

type UserSyncTemplateParams

type UserSyncTemplateParams struct {
	GDPR        string
	GDPRConsent string
	USPrivacy   string
	GPP         string
	GPPSID      string

UserSyncTemplateParams specifies params for an user sync URL template

Jump to

Keyboard shortcuts

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