-
Notifications
You must be signed in to change notification settings - Fork 27
/
openrtb3.go
62 lines (57 loc) · 2.15 KB
/
openrtb3.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
// Package openrtb3 provides OpenRTB 3.0 types
//
// https://iabtechlab.com/standards/openrtb/
// https://github.com/InteractiveAdvertisingBureau/openrtb
package openrtb3
// OpenRTB top-level object is the root for both request and response payloads.
// It includes versioning information and references to the Layer-4 domain model on which transactions are based.
// By default, the domain model used by OpenRTB is the Advertising Common Object Model (AdCOM).
//
// Some of these attributes are optional.
// The ver attribute, for example, indicates the OpenRTB specification version to which this payload conforms.
// This is also conveyed in Layer-1 via an HTTP header.
// Its utility here is more to assist in diagnostics by making the payload more self-documenting outside the context of a runtime transaction.
//
// The domainver attribute, however, does have runtime utility since the structures of Layer-4 objects may vary over time based on their specification versions.
// This attribute can assist in invoking the correct domain object parser or unmarshalling code.
type OpenRTB struct {
// Attribute:
// ver
// Type:
// string
// Definition:
// Version of the Layer-3 OpenRTB specification (e.g., "3.0").
Ver string `json:"ver,omitempty"`
// Attribute:
// domainspec
// Type:
// string; default “adcom”
// Definition:
// Identifier of the Layer-4 domain model used to define items for sale, media associated with bids, etc.
DomainSpec string `json:"domainspec,omitempty"`
// Attribute:
// domainver
// Type:
// string; required
// Definition:
// Specification version of the Layer-4 domain model referenced in the domainspec attribute.
DomainVer string `json:"domainver"`
// Attribute:
// request
// Type:
// object; required *
// Definition:
// Bid request container.
// * Required only for request payloads.
// Refer to Object: Request.
Request *Request `json:"request,omitempty"`
// Attribute:
// response
// Type:
// object; required *
// Definition:
// Bid response container.
// * Required only for response payloads.
// Refer to Object: Response.
Response *Response `json:"response,omitempty"`
}