-
Notifications
You must be signed in to change notification settings - Fork 726
/
imp.go
86 lines (66 loc) · 2.85 KB
/
imp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package openrtb_ext
import (
"encoding/json"
)
// AuctionEnvironmentType is a Google Privacy Sandbox flag indicating where the auction may take place
type AuctionEnvironmentType int8
const (
// 0 Standard server-side auction
ServerSideAuction AuctionEnvironmentType = 0
// 1 On-device interest group auction (FLEDGE)
OnDeviceIGAuctionFledge AuctionEnvironmentType = 1
// 2 Server-side with interest group simulation
ServerSideWithIGSimulation AuctionEnvironmentType = 2
)
// IsRewardedInventoryKey is the json key for ExtImpPrebid.IsRewardedInventory
const IsRewardedInventoryKey = "is_rewarded_inventory"
// OptionsKey is the json key for ExtImpPrebid.Options
const OptionsKey = "options"
// ExtImpPrebid defines the contract for bidrequest.imp[i].ext.prebid
type ExtImpPrebid struct {
// StoredRequest specifies which stored impression to use, if any.
StoredRequest *ExtStoredRequest `json:"storedrequest,omitempty"`
// StoredResponse specifies which stored impression to use, if any.
StoredAuctionResponse *ExtStoredAuctionResponse `json:"storedauctionresponse,omitempty"`
// Stored bid response determines if imp has stored bid response for bidder
StoredBidResponse []ExtStoredBidResponse `json:"storedbidresponse,omitempty"`
// IsRewardedInventory is a signal intended for video impressions. Must be 0 or 1.
IsRewardedInventory *int8 `json:"is_rewarded_inventory,omitempty"`
// Bidder is the preferred approach for providing parameters to be interpreted by the bidder's adapter.
Bidder map[string]json.RawMessage `json:"bidder,omitempty"`
Options *Options `json:"options,omitempty"`
Passthrough json.RawMessage `json:"passthrough,omitempty"`
Floors *ExtImpPrebidFloors `json:"floors,omitempty"`
}
type ExtImpDataAdServer struct {
Name string `json:"name"`
AdSlot string `json:"adslot"`
}
type ExtImpData struct {
PbAdslot string `json:"pbadslot,omitempty"`
AdServer *ExtImpDataAdServer `json:"adserver,omitempty"`
}
type ExtImpPrebidFloors struct {
FloorRule string `json:"floorrule,omitempty"`
FloorRuleValue float64 `json:"floorrulevalue,omitempty"`
FloorValue float64 `json:"floorvalue,omitempty"`
FloorMin float64 `json:"floormin,omitempty"`
FloorMinCur string `json:"floorminCur,omitempty"`
}
// ExtStoredRequest defines the contract for bidrequest.imp[i].ext.prebid.storedrequest
type ExtStoredRequest struct {
ID string `json:"id"`
}
// ExtStoredAuctionResponse defines the contract for bidrequest.imp[i].ext.prebid.storedauctionresponse
type ExtStoredAuctionResponse struct {
ID string `json:"id"`
}
// ExtStoredBidResponse defines the contract for bidrequest.imp[i].ext.prebid.storedbidresponse
type ExtStoredBidResponse struct {
ID string `json:"id"`
Bidder string `json:"bidder"`
ReplaceImpId *bool `json:"replaceimpid"`
}
type Options struct {
EchoVideoAttrs bool `json:"echovideoattrs"`
}