forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.go
36 lines (29 loc) · 1.21 KB
/
user.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
package openrtb_ext
import "encoding/json"
// ExtUser defines the contract for bidrequest.user.ext
type ExtUser struct {
// Consent is a GDPR consent string. See "Advised Extensions" of
// https://iabtechlab.com/wp-content/uploads/2018/02/OpenRTB_Advisory_GDPR_2018-02.pdf
Consent string `json:"consent,omitempty"`
Prebid *ExtUserPrebid `json:"prebid,omitempty"`
Eids []ExtUserEid `json:"eids,omitempty"`
}
// ExtUserPrebid defines the contract for bidrequest.user.ext.prebid
type ExtUserPrebid struct {
BuyerUIDs map[string]string `json:"buyeruids,omitempty"`
}
// ExtUserEid defines the contract for bidrequest.user.ext.eids
// Responsible for the Universal User ID support: establishing pseudonymous IDs for users.
// See https://github.com/prebid/Prebid.js/issues/3900 for details.
type ExtUserEid struct {
Source string `json:"source"`
ID string `json:"id,omitempty"`
Uids []ExtUserEidUid `json:"uids,omitempty"`
Ext json.RawMessage `json:"ext,omitempty"`
}
// ExtUserEidUid defines the contract for bidrequest.user.ext.eids[i].uids[j]
type ExtUserEidUid struct {
ID string `json:"id"`
Atype int `json:"atype,omitempty"`
Ext json.RawMessage `json:"ext,omitempty"`
}