macros

package
v0.275.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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"
	MacroKeyVastCRTID   = "PBS-VASTCRTID"
	MacroKeyTimestamp   = "PBS-TIMESTAMP"
	MacroKeyAuctionID   = "PBS-AUCTIONID"
	MacroKeyChannel     = "PBS-CHANNEL"
	MacroKeyEventType   = "PBS-EVENTTYPE"
	MacroKeyVastEvent   = "PBS-VASTEVENT"
)
View Source
const (
	CustomMacroPrefix = "PBS-MACRO-"
)

Variables

This section is empty.

Functions

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

Types

type EndpointTemplateParams

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

EndpointTemplateParams specifies macros for bidder endpoints.

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 UserSyncPrivacy added in v0.274.0

type UserSyncPrivacy struct {
	GDPR        string
	GDPRConsent string
	USPrivacy   string
	GPP         string
	GPPSID      string
}

UserSyncPrivacy specifies privacy policy macros, represented as strings, for user sync urls.

Jump to

Keyboard shortcuts

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