Documentation
¶
Index ¶
- Constants
- func GetUIDs(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func InitUsersyncHandlers(router *httprouter.Router, metricsRegistry metrics.Registry, cdomain string, ...)
- func OptOut(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func SetUID(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func SetUIDCookie(w http.ResponseWriter, pc *PBSCookie)
- func VerifyRecaptcha(response string) error
- type AdUnit
- type BidderDebug
- type Bids
- type ConfigCache
- type PBSAdUnit
- type PBSBid
- type PBSBidSlice
- type PBSBidder
- type PBSCookie
- type PBSRequest
- type PBSResponse
- type UsersyncInfo
Constants ¶
View Source
const MAX_BIDDERS = 8
Variables ¶
This section is empty.
Functions ¶
func GetUIDs ¶
func GetUIDs(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func InitUsersyncHandlers ¶
func InitUsersyncHandlers(router *httprouter.Router, metricsRegistry metrics.Registry, cdomain string, xternal_url string, captcha_secret string)
split this for testability
func OptOut ¶
func OptOut(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func SetUID ¶
func SetUID(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func SetUIDCookie ¶
func SetUIDCookie(w http.ResponseWriter, pc *PBSCookie)
func VerifyRecaptcha ¶
Types ¶
type BidderDebug ¶
type Bids ¶
type Bids struct {
BidderCode string `json:"bidder"`
BidID string `json:"bid_id"`
Params json.RawMessage `json:"params"`
}
type ConfigCache ¶
type PBSBid ¶
type PBSBid struct {
BidID string `json:"bid_id"`
AdUnitCode string `json:"code"`
Creative_id string `json:"creative_id,omitempty"`
BidderCode string `json:"bidder"`
BidHash string `json:"-"` // this is the hash of the bidder's unique bid identifier for blockchain. Should not be sent to browser.
Price float64 `json:"price"`
Currency string `json:"currency,omitempty"`
NURL string `json:"nurl,omitempty"`
Adm string `json:"adm,omitempty"`
Width uint64 `json:"width,omitempty"`
Height uint64 `json:"height,omitempty"`
DealId string `json:"deal_id,omitempty"`
CacheID string `json:"cache_id,omitempty"`
}
type PBSBidSlice ¶
type PBSBidSlice []*PBSBid
func (PBSBidSlice) Less ¶
func (bids PBSBidSlice) Less(i, j int) bool
func (PBSBidSlice) Swap ¶
func (bids PBSBidSlice) Swap(i, j int)
type PBSBidder ¶
type PBSBidder struct {
BidderCode string `json:"bidder"`
AdUnitCode string `json:"ad_unit,omitempty"` // for index to dedup responses
ResponseTime int `json:"response_time_ms,omitempty"`
NumBids int `json:"num_bids,omitempty"`
Error string `json:"error,omitempty"`
NoCookie bool `json:"no_cookie,omitempty"`
NoBid bool `json:"no_bid,omitempty"`
UsersyncInfo *UsersyncInfo `json:"usersync,omitempty"`
Debug []*BidderDebug `json:"debug,omitempty"`
AdUnits []PBSAdUnit `json:"-"`
}
func (*PBSBidder) LookupBidID ¶
type PBSCookie ¶
type PBSCookie struct {
UIDs map[string]string `json:"uids,omitempty"`
OptOut bool `json:"optout,omitempty"`
Birthday *time.Time `json:"bday,omitempty"`
}
func ParseUIDCookie ¶
type PBSRequest ¶
type PBSRequest struct {
AccountID string `json:"account_id"`
Tid string `json:"tid"`
CacheMarkup int8 `json:"cache_markup"`
Secure int8 `json:"secure"`
TimeoutMillis uint64 `json:"timeout_millis"`
AdUnits []AdUnit `json:"ad_units"`
IsDebug bool `json:"is_debug"`
App *openrtb.App `json:"app"`
Device *openrtb.Device `json:"device"`
// internal
Bidders []*PBSBidder `json:"-"`
UserIDs map[string]string `json:"-"`
Url string `json:"-"`
Domain string `json:"-"`
Start time.Time
}
func ParsePBSRequest ¶
func (PBSRequest) Elapsed ¶
func (req PBSRequest) Elapsed() int
func (PBSRequest) GetUserID ¶
func (req PBSRequest) GetUserID(BidderCode string) string
func (PBSRequest) String ¶
func (p PBSRequest) String() string
type PBSResponse ¶
type PBSResponse struct {
TID string `json:"tid,omitempty"`
Status string `json:"status,omitempty"`
BidderStatus []*PBSBidder `json:"bidder_status,omitempty"`
Bids PBSBidSlice `json:"bids,omitempty"`
BUrl string `json:"burl,omitempty"`
}
type UsersyncInfo ¶
Click to show internal directories.
Click to hide internal directories.