-
Notifications
You must be signed in to change notification settings - Fork 730
/
event.go
39 lines (32 loc) · 1.16 KB
/
event.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
package analytics
// EventType enumerates the values of events Prebid Server can receive for an ad.
type EventType string
// Possible values of events Prebid Server can receive for an ad.
const (
Win EventType = "win"
Imp EventType = "imp"
)
// ResponseFormat enumerates the values of a Prebid Server event.
type ResponseFormat string
const (
// Blank describes an event which returns an HTTP 200 with an empty body.
Blank ResponseFormat = "b"
// Image describes an event which returns an HTTP 200 with a PNG body.
Image ResponseFormat = "i"
)
// Analytics indicates if the notification event should be handled or not
type Analytics string
const (
Enabled Analytics = "1"
Disabled Analytics = "0"
)
type EventRequest struct {
Type EventType `json:"type,omitempty"`
Format ResponseFormat `json:"format,omitempty"`
Analytics Analytics `json:"analytics,omitempty"`
BidID string `json:"bidid,omitempty"`
AccountID string `json:"account_id,omitempty"`
Bidder string `json:"bidder,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Integration string `json:"integration,omitempty"`
}