Documentation ¶
Index ¶
- Constants
- Variables
- func PrepareLogMessage(tID, pubId, adUnitId, bidID, details string, args ...interface{}) string
- type Adapter
- type AppNexusAdapter
- func (a *AppNexusAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *AppNexusAdapter) FamilyName() string
- func (a *AppNexusAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *AppNexusAdapter) Name() string
- func (a *AppNexusAdapter) SkipNoCookies() bool
- type FacebookAdapter
- func (a *FacebookAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *FacebookAdapter) FamilyName() string
- func (a *FacebookAdapter) GenerateRequestsForFacebook(req *pbs.PBSRequest, bidder *pbs.PBSBidder) ([]*openrtb.BidRequest, error)
- func (a *FacebookAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *FacebookAdapter) MakeOpenRtbBidRequest(req *pbs.PBSRequest, bidder *pbs.PBSBidder, placementId string, ...) (openrtb.BidRequest, error)
- func (a *FacebookAdapter) Name() string
- func (a *FacebookAdapter) SkipNoCookies() bool
- func (a *FacebookAdapter) SplitAdUnits() bool
- type HTTPAdapter
- type HTTPAdapterConfig
- type IndexAdapter
- func (a *IndexAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *IndexAdapter) FamilyName() string
- func (a *IndexAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *IndexAdapter) Name() string
- func (a *IndexAdapter) SkipNoCookies() bool
- type KeyVal
- type LifestreetAdapter
- func (a *LifestreetAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *LifestreetAdapter) FamilyName() string
- func (a *LifestreetAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *LifestreetAdapter) MakeOpenRtbBidRequest(req *pbs.PBSRequest, bidder *pbs.PBSBidder, slotTag string, ...) (openrtb.BidRequest, error)
- func (a *LifestreetAdapter) Name() string
- func (a *LifestreetAdapter) SkipNoCookies() bool
- type PubmaticAdapter
- func (a *PubmaticAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *PubmaticAdapter) FamilyName() string
- func (a *PubmaticAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *PubmaticAdapter) Name() string
- func (a *PubmaticAdapter) SkipNoCookies() bool
- type PulsePointAdapter
- func (a *PulsePointAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *PulsePointAdapter) FamilyName() string
- func (a *PulsePointAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *PulsePointAdapter) Name() string
- func (a *PulsePointAdapter) SkipNoCookies() bool
- type PulsepointParams
- type RubiconAdapter
- func (a *RubiconAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
- func (a *RubiconAdapter) FamilyName() string
- func (a *RubiconAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
- func (a *RubiconAdapter) Name() string
- func (a *RubiconAdapter) SkipNoCookies() bool
Constants ¶
const MAX_IMPRESSIONS_PUBMATIC = 30
Variables ¶
var DefaultHTTPAdapterConfig = &HTTPAdapterConfig{ MaxConns: 50, MaxConnsPerHost: 10, IdleConnTimeout: 60 * time.Second, }
DefaultHTTPAdapterConfig is an HTTPAdapterConfig that chooses sensible default values.
Functions ¶
func PrepareLogMessage ¶
Types ¶
type Adapter ¶
type Adapter interface { // Name uniquely identifies this adapter. This must be identical to the code in Prebid.js, // but cannot overlap with any other adapters in prebid-server. Name() string // FamilyName identifies the space of cookies which this adapter accesses. For example, an adapter // using the adnxs.com cookie space should return "adnxs". FamilyName() string // Determines whether this adapter should get callouts if there is not a synched user ID SkipNoCookies() bool // GetUsersyncInfo returns the parameters which are needed to do sync users with this bidder. // For more information, see http://clearcode.cc/2015/12/cookie-syncing/ GetUsersyncInfo() *pbs.UsersyncInfo // Call produces bids which should be considered, given the auction params. // // In practice, implementations almost always make one call to an external server here. // However, that is not a requirement for satisfying this interface. Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error) }
Adapters connect prebid-server to a demand partner. Their primary purpose is to produce bids in response to Auction requests.
type AppNexusAdapter ¶
type AppNexusAdapter struct { URI string // contains filtered or unexported fields }
func NewAppNexusAdapter ¶
func NewAppNexusAdapter(config *HTTPAdapterConfig, externalURL string) *AppNexusAdapter
func (*AppNexusAdapter) Call ¶
func (a *AppNexusAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*AppNexusAdapter) FamilyName ¶
func (a *AppNexusAdapter) FamilyName() string
used for cookies and such
func (*AppNexusAdapter) GetUsersyncInfo ¶
func (a *AppNexusAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*AppNexusAdapter) SkipNoCookies ¶
func (a *AppNexusAdapter) SkipNoCookies() bool
type FacebookAdapter ¶
type FacebookAdapter struct { URI string // contains filtered or unexported fields }
func NewFacebookAdapter ¶
func NewFacebookAdapter(config *HTTPAdapterConfig, partnerID string, usersyncURL string) *FacebookAdapter
func (*FacebookAdapter) Call ¶
func (a *FacebookAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*FacebookAdapter) FamilyName ¶
func (a *FacebookAdapter) FamilyName() string
used for cookies and such
func (*FacebookAdapter) GenerateRequestsForFacebook ¶
func (a *FacebookAdapter) GenerateRequestsForFacebook(req *pbs.PBSRequest, bidder *pbs.PBSBidder) ([]*openrtb.BidRequest, error)
func (*FacebookAdapter) GetUsersyncInfo ¶
func (a *FacebookAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*FacebookAdapter) MakeOpenRtbBidRequest ¶
func (a *FacebookAdapter) MakeOpenRtbBidRequest(req *pbs.PBSRequest, bidder *pbs.PBSBidder, placementId string, mtype pbs.MediaType, pubId string, unitInd int) (openrtb.BidRequest, error)
func (*FacebookAdapter) SkipNoCookies ¶
func (a *FacebookAdapter) SkipNoCookies() bool
func (*FacebookAdapter) SplitAdUnits ¶
func (a *FacebookAdapter) SplitAdUnits() bool
Facebook likes to parallelize to minimize latency
type HTTPAdapter ¶
func NewHTTPAdapter ¶
func NewHTTPAdapter(c *HTTPAdapterConfig) *HTTPAdapter
NewHTTPAdapter creates an HTTPAdapter which obeys the rules given by the config, and has all the available SSL certs available in the project.
type HTTPAdapterConfig ¶
type HTTPAdapterConfig struct { // See IdleConnTimeout on https://golang.org/pkg/net/http/#Transport IdleConnTimeout time.Duration // See MaxIdleConns on https://golang.org/pkg/net/http/#Transport MaxConns int // See MaxIdleConnsPerHost on https://golang.org/pkg/net/http/#Transport MaxConnsPerHost int }
HTTPAdapterConfig groups options which control how HTTP requests are made by adapters.
type IndexAdapter ¶
type IndexAdapter struct { URI string // contains filtered or unexported fields }
func NewIndexAdapter ¶
func NewIndexAdapter(config *HTTPAdapterConfig, uri string, userSyncURL string) *IndexAdapter
func (*IndexAdapter) Call ¶
func (a *IndexAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*IndexAdapter) FamilyName ¶
func (a *IndexAdapter) FamilyName() string
used for cookies and such
func (*IndexAdapter) GetUsersyncInfo ¶
func (a *IndexAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*IndexAdapter) SkipNoCookies ¶
func (a *IndexAdapter) SkipNoCookies() bool
type LifestreetAdapter ¶
type LifestreetAdapter struct { URI string // contains filtered or unexported fields }
func NewLifestreetAdapter ¶
func NewLifestreetAdapter(config *HTTPAdapterConfig, externalURL string) *LifestreetAdapter
func (*LifestreetAdapter) Call ¶
func (a *LifestreetAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*LifestreetAdapter) FamilyName ¶
func (a *LifestreetAdapter) FamilyName() string
used for cookies and such
func (*LifestreetAdapter) GetUsersyncInfo ¶
func (a *LifestreetAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*LifestreetAdapter) MakeOpenRtbBidRequest ¶
func (a *LifestreetAdapter) MakeOpenRtbBidRequest(req *pbs.PBSRequest, bidder *pbs.PBSBidder, slotTag string, mtype pbs.MediaType, unitInd int) (openrtb.BidRequest, error)
func (*LifestreetAdapter) Name ¶
func (a *LifestreetAdapter) Name() string
Name - export adapter name
func (*LifestreetAdapter) SkipNoCookies ¶
func (a *LifestreetAdapter) SkipNoCookies() bool
type PubmaticAdapter ¶
type PubmaticAdapter struct { URI string // contains filtered or unexported fields }
func NewPubmaticAdapter ¶
func NewPubmaticAdapter(config *HTTPAdapterConfig, uri string, externalURL string) *PubmaticAdapter
func (*PubmaticAdapter) Call ¶
func (a *PubmaticAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*PubmaticAdapter) FamilyName ¶
func (a *PubmaticAdapter) FamilyName() string
used for cookies and such
func (*PubmaticAdapter) GetUsersyncInfo ¶
func (a *PubmaticAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*PubmaticAdapter) SkipNoCookies ¶
func (a *PubmaticAdapter) SkipNoCookies() bool
type PulsePointAdapter ¶
type PulsePointAdapter struct { URI string // contains filtered or unexported fields }
func NewPulsePointAdapter ¶
func NewPulsePointAdapter(config *HTTPAdapterConfig, uri string, externalURL string) *PulsePointAdapter
func (*PulsePointAdapter) Call ¶
func (a *PulsePointAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*PulsePointAdapter) FamilyName ¶
func (a *PulsePointAdapter) FamilyName() string
used for cookies and such
func (*PulsePointAdapter) GetUsersyncInfo ¶
func (a *PulsePointAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*PulsePointAdapter) SkipNoCookies ¶
func (a *PulsePointAdapter) SkipNoCookies() bool
type PulsepointParams ¶
type PulsepointParams struct { PublisherId int `json:"cp"` TagId int `json:"ct"` AdSize string `json:"cf"` }
parameters for pulsepoint adapter.
type RubiconAdapter ¶
type RubiconAdapter struct { URI string XAPIUsername string XAPIPassword string // contains filtered or unexported fields }
func NewRubiconAdapter ¶
func NewRubiconAdapter(config *HTTPAdapterConfig, uri string, xuser string, xpass string, tracker string, usersyncURL string) *RubiconAdapter
func (*RubiconAdapter) Call ¶
func (a *RubiconAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder *pbs.PBSBidder) (pbs.PBSBidSlice, error)
func (*RubiconAdapter) FamilyName ¶
func (a *RubiconAdapter) FamilyName() string
used for cookies and such
func (*RubiconAdapter) GetUsersyncInfo ¶
func (a *RubiconAdapter) GetUsersyncInfo() *pbs.UsersyncInfo
func (*RubiconAdapter) SkipNoCookies ¶
func (a *RubiconAdapter) SkipNoCookies() bool