macros

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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 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
	PageID      string
	SupplyId    string
}

EndpointTemplateParams specifies macros for bidder endpoints.

type MacroProvider added in v2.16.0

type MacroProvider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(reqWrapper *openrtb_ext.RequestWrapper) *MacroProvider

NewBuilder returns the instance of macro buidler

func (*MacroProvider) GetMacro added in v2.16.0

func (b *MacroProvider) GetMacro(key string) string

func (*MacroProvider) PopulateBidMacros added in v2.16.0

func (b *MacroProvider) PopulateBidMacros(bid *entities.PbsOrtbBid, seat string)

func (*MacroProvider) PopulateEventMacros added in v2.16.0

func (b *MacroProvider) PopulateEventMacros(vastCreativeID, eventType, vastEvent string)

type Replacer

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

func NewStringIndexBasedReplacer

func NewStringIndexBasedReplacer() Replacer

NewStringIndexBasedReplacer will return instance of string index based macro replacer

type UserSyncPrivacy

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