From 1459501aaf17bcb5c92014155eb8cc1cc60d1c7c Mon Sep 17 00:00:00 2001 From: Max Cherry Date: Fri, 28 Dec 2018 13:58:41 +0200 Subject: [PATCH] move everything from root package to openrtb2/native1 subpackages --- {native => native1}/README.md | 2 +- {native => native1}/ad_unit.go | 2 +- {native => native1}/context_sub_type.go | 2 +- {native => native1}/context_type.go | 2 +- {native => native1}/data_asset_type.go | 2 +- {native => native1}/event_tracking_method.go | 2 +- {native => native1}/event_type.go | 2 +- {native => native1}/image_asset_type.go | 2 +- {native => native1}/layout.go | 2 +- native/native.go => native1/native1.go | 4 +-- {native => native1}/placement_type.go | 2 +- {native => native1}/protocol.go | 2 +- {native => native1}/request/README.md | 2 +- {native => native1}/request/asset.go | 4 +-- {native => native1}/request/data.go | 8 +++--- {native => native1}/request/event_tracker.go | 6 ++--- {native => native1}/request/image.go | 4 +-- {native => native1}/request/request.go | 26 +++++++++---------- .../request/request_suite_test.go | 0 {native => native1}/request/request_test.go | 2 +- .../request/testdata/v1.1/README.md | 0 .../testdata/v1.1/content-context.json | 0 .../request/testdata/v1.1/social-context.json | 0 .../request/testdata/v1.2/README.md | 0 .../testdata/v1.2/content-context.json | 0 .../request/testdata/v1.2/social-context.json | 0 .../request/testdata/v1.2/third-party.json | 0 {native => native1}/request/title.go | 0 {native => native1}/request/video.go | 6 ++--- {native => native1}/response/README.md | 2 +- {native => native1}/response/asset.go | 0 {native => native1}/response/data.go | 8 +++--- {native => native1}/response/event_tracker.go | 6 ++--- {native => native1}/response/image.go | 4 +-- {native => native1}/response/link.go | 0 {native => native1}/response/response.go | 8 +++--- .../response/response_suite_test.go | 0 {native => native1}/response/response_test.go | 2 +- .../response/testdata/v1.1/README.md | 0 .../response/testdata/v1.1/clickout.json | 0 .../response/testdata/v1.1/video.json | 0 .../response/testdata/v1.2/README.md | 0 .../response/testdata/v1.2/clickout.json | 0 .../response/testdata/v1.2/third-party.json | 0 .../response/testdata/v1.2/video.json | 0 {native => native1}/response/title.go | 0 {native => native1}/response/video.go | 0 ad_position.go => openrtb2/ad_position.go | 2 +- api_framework.go => openrtb2/api_framework.go | 2 +- app.go => openrtb2/app.go | 2 +- audio.go => openrtb2/audio.go | 2 +- banner.go => openrtb2/banner.go | 2 +- .../banner_ad_type.go | 2 +- bid.go => openrtb2/bid.go | 2 +- bid_request.go => openrtb2/bid_request.go | 2 +- .../bid_request_test.go | 4 +-- bid_response.go => openrtb2/bid_response.go | 2 +- .../bid_response_test.go | 4 +-- .../companion_type.go | 2 +- .../connection_type.go | 2 +- content.go => openrtb2/content.go | 2 +- .../content_context.go | 2 +- .../content_delivery_method.go | 2 +- .../creative_attribute.go | 2 +- data.go => openrtb2/data.go | 2 +- deal.go => openrtb2/deal.go | 2 +- device.go => openrtb2/device.go | 2 +- device_type.go => openrtb2/device_type.go | 2 +- .../expandable_direction.go | 2 +- feed_type.go => openrtb2/feed_type.go | 2 +- format.go => openrtb2/format.go | 2 +- geo.go => openrtb2/geo.go | 2 +- imp.go => openrtb2/imp.go | 2 +- .../ip_location_service.go | 2 +- .../iqg_media_rating.go | 2 +- location_type.go => openrtb2/location_type.go | 2 +- .../loss_reason_code.go | 2 +- metric.go => openrtb2/metric.go | 2 +- native.go => openrtb2/native.go | 2 +- .../no_bid_reason_code.go | 2 +- openrtb.go => openrtb2/openrtb.go | 2 +- .../openrtb_suite_test.go | 6 ++--- .../playback_cessation_mode.go | 2 +- .../playback_method.go | 2 +- pmp.go => openrtb2/pmp.go | 2 +- producer.go => openrtb2/producer.go | 2 +- .../production_quality.go | 2 +- protocol.go => openrtb2/protocol.go | 2 +- ptr.go => openrtb2/ptr.go | 2 +- publisher.go => openrtb2/publisher.go | 2 +- regs.go => openrtb2/regs.go | 2 +- seat_bid.go => openrtb2/seat_bid.go | 2 +- segment.go => openrtb2/segment.go | 2 +- site.go => openrtb2/site.go | 2 +- source.go => openrtb2/source.go | 2 +- start_delay.go => openrtb2/start_delay.go | 2 +- {testdata => openrtb2/testdata}/README.md | 0 .../bid-request/expandable-creative.json | 0 .../testdata}/bid-request/mobile.json | 0 .../testdata}/bid-request/native-ad.json | 0 .../bid-request/pmp-with-direct-deal.json | 0 .../testdata}/bid-request/simple-banner.json | 0 .../testdata}/bid-request/video.json | 0 .../bid-response/ad-served-on-win-notice.json | 0 .../direct-deal-ad-served-on-win-notice.json | 0 .../native-markup-returned-inline.json | 0 .../vast-xml-document-returned-inline.json | 0 user.go => openrtb2/user.go | 2 +- video.go => openrtb2/video.go | 2 +- .../video_linearity.go | 2 +- .../video_placement_type.go | 2 +- .../volume_normalization_mode.go | 2 +- 112 files changed, 115 insertions(+), 115 deletions(-) rename {native => native1}/README.md (66%) rename {native => native1}/ad_unit.go (98%) rename {native => native1}/context_sub_type.go (99%) rename {native => native1}/context_type.go (98%) rename {native => native1}/data_asset_type.go (99%) rename {native => native1}/event_tracking_method.go (97%) rename {native => native1}/event_type.go (96%) rename {native => native1}/image_asset_type.go (99%) rename {native => native1}/layout.go (97%) rename native/native.go => native1/native1.go (68%) rename {native => native1}/placement_type.go (97%) rename {native => native1}/protocol.go (98%) rename {native => native1}/request/README.md (65%) rename {native => native1}/request/asset.go (94%) rename {native => native1}/request/data.go (77%) rename {native => native1}/request/event_tracker.go (88%) rename {native => native1}/request/image.go (96%) rename {native => native1}/request/request.go (82%) rename {native => native1}/request/request_suite_test.go (100%) rename {native => native1}/request/request_test.go (95%) rename {native => native1}/request/testdata/v1.1/README.md (100%) rename {native => native1}/request/testdata/v1.1/content-context.json (100%) rename {native => native1}/request/testdata/v1.1/social-context.json (100%) rename {native => native1}/request/testdata/v1.2/README.md (100%) rename {native => native1}/request/testdata/v1.2/content-context.json (100%) rename {native => native1}/request/testdata/v1.2/social-context.json (100%) rename {native => native1}/request/testdata/v1.2/third-party.json (100%) rename {native => native1}/request/title.go (100%) rename {native => native1}/request/video.go (91%) rename {native => native1}/response/README.md (65%) rename {native => native1}/response/asset.go (100%) rename {native => native1}/response/data.go (84%) rename {native => native1}/response/event_tracker.go (93%) rename {native => native1}/response/image.go (94%) rename {native => native1}/response/link.go (100%) rename {native => native1}/response/response.go (92%) rename {native => native1}/response/response_suite_test.go (100%) rename {native => native1}/response/response_test.go (95%) rename {native => native1}/response/testdata/v1.1/README.md (100%) rename {native => native1}/response/testdata/v1.1/clickout.json (100%) rename {native => native1}/response/testdata/v1.1/video.json (100%) rename {native => native1}/response/testdata/v1.2/README.md (100%) rename {native => native1}/response/testdata/v1.2/clickout.json (100%) rename {native => native1}/response/testdata/v1.2/third-party.json (100%) rename {native => native1}/response/testdata/v1.2/video.json (100%) rename {native => native1}/response/title.go (100%) rename {native => native1}/response/video.go (100%) rename ad_position.go => openrtb2/ad_position.go (98%) rename api_framework.go => openrtb2/api_framework.go (96%) rename app.go => openrtb2/app.go (99%) rename audio.go => openrtb2/audio.go (99%) rename banner.go => openrtb2/banner.go (99%) rename banner_ad_type.go => openrtb2/banner_ad_type.go (96%) rename bid.go => openrtb2/bid.go (99%) rename bid_request.go => openrtb2/bid_request.go (99%) rename bid_request_test.go => openrtb2/bid_request_test.go (94%) rename bid_response.go => openrtb2/bid_response.go (99%) rename bid_response_test.go => openrtb2/bid_response_test.go (94%) rename companion_type.go => openrtb2/companion_type.go (96%) rename connection_type.go => openrtb2/connection_type.go (98%) rename content.go => openrtb2/content.go (99%) rename content_context.go => openrtb2/content_context.go (98%) rename content_delivery_method.go => openrtb2/content_delivery_method.go (95%) rename creative_attribute.go => openrtb2/creative_attribute.go (99%) rename data.go => openrtb2/data.go (98%) rename deal.go => openrtb2/deal.go (99%) rename device.go => openrtb2/device.go (99%) rename device_type.go => openrtb2/device_type.go (98%) rename expandable_direction.go => openrtb2/expandable_direction.go (96%) rename feed_type.go => openrtb2/feed_type.go (93%) rename format.go => openrtb2/format.go (98%) rename geo.go => openrtb2/geo.go (99%) rename imp.go => openrtb2/imp.go (99%) rename ip_location_service.go => openrtb2/ip_location_service.go (96%) rename iqg_media_rating.go => openrtb2/iqg_media_rating.go (95%) rename location_type.go => openrtb2/location_type.go (95%) rename loss_reason_code.go => openrtb2/loss_reason_code.go (99%) rename metric.go => openrtb2/metric.go (98%) rename native.go => openrtb2/native.go (99%) rename no_bid_reason_code.go => openrtb2/no_bid_reason_code.go (98%) rename openrtb.go => openrtb2/openrtb.go (92%) rename openrtb_suite_test.go => openrtb2/openrtb_suite_test.go (55%) rename playback_cessation_mode.go => openrtb2/playback_cessation_mode.go (97%) rename playback_method.go => openrtb2/playback_method.go (97%) rename pmp.go => openrtb2/pmp.go (98%) rename producer.go => openrtb2/producer.go (98%) rename production_quality.go => openrtb2/production_quality.go (98%) rename protocol.go => openrtb2/protocol.go (97%) rename ptr.go => openrtb2/ptr.go (91%) rename publisher.go => openrtb2/publisher.go (98%) rename regs.go => openrtb2/regs.go (98%) rename seat_bid.go => openrtb2/seat_bid.go (98%) rename segment.go => openrtb2/segment.go (98%) rename site.go => openrtb2/site.go (99%) rename source.go => openrtb2/source.go (98%) rename start_delay.go => openrtb2/start_delay.go (97%) rename {testdata => openrtb2/testdata}/README.md (100%) rename {testdata => openrtb2/testdata}/bid-request/expandable-creative.json (100%) rename {testdata => openrtb2/testdata}/bid-request/mobile.json (100%) rename {testdata => openrtb2/testdata}/bid-request/native-ad.json (100%) rename {testdata => openrtb2/testdata}/bid-request/pmp-with-direct-deal.json (100%) rename {testdata => openrtb2/testdata}/bid-request/simple-banner.json (100%) rename {testdata => openrtb2/testdata}/bid-request/video.json (100%) rename {testdata => openrtb2/testdata}/bid-response/ad-served-on-win-notice.json (100%) rename {testdata => openrtb2/testdata}/bid-response/direct-deal-ad-served-on-win-notice.json (100%) rename {testdata => openrtb2/testdata}/bid-response/native-markup-returned-inline.json (100%) rename {testdata => openrtb2/testdata}/bid-response/vast-xml-document-returned-inline.json (100%) rename user.go => openrtb2/user.go (99%) rename video.go => openrtb2/video.go (99%) rename video_linearity.go => openrtb2/video_linearity.go (97%) rename video_placement_type.go => openrtb2/video_placement_type.go (98%) rename volume_normalization_mode.go => openrtb2/volume_normalization_mode.go (98%) diff --git a/native/README.md b/native1/README.md similarity index 66% rename from native/README.md rename to native1/README.md index c107b4c..32e59cb 100644 --- a/native/README.md +++ b/native1/README.md @@ -1,4 +1,4 @@ -# native [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native) +# native1 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native) [Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) types/enums. diff --git a/native/ad_unit.go b/native1/ad_unit.go similarity index 98% rename from native/ad_unit.go rename to native1/ad_unit.go index a3a758a..53ea841 100644 --- a/native/ad_unit.go +++ b/native1/ad_unit.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.2 Native Ad Unit IDs in version 1.1. // Deprecated/removed in version 1.2. diff --git a/native/context_sub_type.go b/native1/context_sub_type.go similarity index 99% rename from native/context_sub_type.go rename to native1/context_sub_type.go index f57d0bf..63a9bb2 100644 --- a/native/context_sub_type.go +++ b/native1/context_sub_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.2 Context Sub Type IDs // diff --git a/native/context_type.go b/native1/context_type.go similarity index 98% rename from native/context_type.go rename to native1/context_type.go index 5942576..ea89d0a 100644 --- a/native/context_type.go +++ b/native1/context_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.1 Context Type IDs // diff --git a/native/data_asset_type.go b/native1/data_asset_type.go similarity index 99% rename from native/data_asset_type.go rename to native1/data_asset_type.go index a8c3b74..9f9a431 100644 --- a/native/data_asset_type.go +++ b/native1/data_asset_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.4 Data Asset Types // diff --git a/native/event_tracking_method.go b/native1/event_tracking_method.go similarity index 97% rename from native/event_tracking_method.go rename to native1/event_tracking_method.go index 3be3b60..07d82f3 100644 --- a/native/event_tracking_method.go +++ b/native1/event_tracking_method.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.7 Event Tracking Methods Table type EventTrackingMethod int8 diff --git a/native/event_type.go b/native1/event_type.go similarity index 96% rename from native/event_type.go rename to native1/event_type.go index 2f8ebdb..abd05a9 100644 --- a/native/event_type.go +++ b/native1/event_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.6 Event Types Table type EventType int8 diff --git a/native/image_asset_type.go b/native1/image_asset_type.go similarity index 99% rename from native/image_asset_type.go rename to native1/image_asset_type.go index 2784198..2498b22 100644 --- a/native/image_asset_type.go +++ b/native1/image_asset_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.5 Image Asset Types // diff --git a/native/layout.go b/native1/layout.go similarity index 97% rename from native/layout.go rename to native1/layout.go index 0c81308..04689da 100644 --- a/native/layout.go +++ b/native1/layout.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.1 Native Layout IDs in version 1.1. // Deprecated/removed in version 1.2. diff --git a/native/native.go b/native1/native1.go similarity index 68% rename from native/native.go rename to native1/native1.go index 702e996..dd92b50 100644 --- a/native/native.go +++ b/native1/native1.go @@ -1,5 +1,5 @@ -// Package native provides OpenRTB Dynamic Native Ads API Specification Version 1.2 +// Package native1 provides OpenRTB Dynamic Native Ads API Specification Version 1.2 // section 7 Reference Lists/Enumerations types/constants: // https://www.iab.com/guidelines/real-time-bidding-rtb-project/ // https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf -package native +package native1 diff --git a/native/placement_type.go b/native1/placement_type.go similarity index 97% rename from native/placement_type.go rename to native1/placement_type.go index cb65f4e..b88560b 100644 --- a/native/placement_type.go +++ b/native1/placement_type.go @@ -1,4 +1,4 @@ -package native +package native1 // 7.3 Placement Type IDs // diff --git a/native/protocol.go b/native1/protocol.go similarity index 98% rename from native/protocol.go rename to native1/protocol.go index adfd902..23ab7ba 100644 --- a/native/protocol.go +++ b/native1/protocol.go @@ -1,4 +1,4 @@ -package native +package native1 // 5.8 Protocols (from OpenRTB spec 2.5) // diff --git a/native/request/README.md b/native1/request/README.md similarity index 65% rename from native/request/README.md rename to native1/request/README.md index 1fb7916..2b11ec7 100644 --- a/native/request/README.md +++ b/native1/request/README.md @@ -1,4 +1,4 @@ -# native/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/request?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/request) +# native1/request [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/request?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/request) [Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section 4 Native Ad Request Markup Details types. diff --git a/native/request/asset.go b/native1/request/asset.go similarity index 94% rename from native/request/asset.go rename to native1/request/asset.go index 6cd78db..73d8e54 100644 --- a/native/request/asset.go +++ b/native1/request/asset.go @@ -14,11 +14,11 @@ import "encoding/json" // So if a request for a title object is sent with id 1, then the response containing the title should have an id of 1. // // Since version 1.1 of the spec, there are recommended sizes/lengths/etc with some of the asset types. -// The goal for asset requirements standardization is to facilitate adoption of native by DSPs by limiting the diverse types/sizes/requirements of assets they must have available to purchase a native ad impression. +// The goal for asset requirements standardization is to facilitate adoption of native1 by DSPs by limiting the diverse types/sizes/requirements of assets they must have available to purchase a native ad impression. // While great diversity may exist in publishers, advertisers/DSPs can not be expected to provide infinite headline lengths, thumbnail aspect ratios, etc. // While we have not gone as far as creating a single standard, we've honed in on a few options that cover the most common cases. // SSPs can deviate from these standards, but should understand they may limit applicable DSP demand by doing so. -// DSPs should feel confident that if they support these standards they'll be able to access most native inventory. +// DSPs should feel confident that if they support these standards they'll be able to access most native1 inventory. type Asset struct { // Field: // id diff --git a/native/request/data.go b/native1/request/data.go similarity index 77% rename from native/request/data.go rename to native1/request/data.go index 1f9d31e..a7d4cbd 100644 --- a/native/request/data.go +++ b/native1/request/data.go @@ -3,13 +3,13 @@ package request import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 4.6 Data Object // -// The Data Object is to be used for all non-core elements of the native unit such as Brand Name, Ratings, Review Count, Stars, Download count, descriptions etc. -// It is also generic for future native elements not contemplated at the time of the writing of this document. +// The Data Object is to be used for all non-core elements of the native1 unit such as Brand Name, Ratings, Review Count, Stars, Download count, descriptions etc. +// It is also generic for future native1 elements not contemplated at the time of the writing of this document. // In some cases, additional recommendations are also included in the Data Asset Types table. type Data struct { @@ -23,7 +23,7 @@ type Data struct { // Type ID of the element supported by the publisher. // The publisher can display this information in an appropriate format. // See Data Asset Types table for commonly used examples. - Type native.DataAssetType `json:"type"` + Type native1.DataAssetType `json:"type"` // Field: // len diff --git a/native/request/event_tracker.go b/native1/request/event_tracker.go similarity index 88% rename from native/request/event_tracker.go rename to native1/request/event_tracker.go index 1e59c1e..13e8060 100644 --- a/native/request/event_tracker.go +++ b/native1/request/event_tracker.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 4.7 Event Trackers Request Object @@ -20,7 +20,7 @@ type EventTracker struct { // Description: // Type of event available for tracking. // See Event Types table. - Event native.EventType `json:"event"` + Event native1.EventType `json:"event"` // Field: // methods @@ -31,7 +31,7 @@ type EventTracker struct { // Description: // Array of the types of tracking available for the given event. // See Event Tracking Methods table - Methods []native.EventTrackingMethod `json:"methods"` + Methods []native1.EventTrackingMethod `json:"methods"` // Field: // ext diff --git a/native/request/image.go b/native1/request/image.go similarity index 96% rename from native/request/image.go rename to native1/request/image.go index 17d6c13..d7d7830 100644 --- a/native/request/image.go +++ b/native1/request/image.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 4.4 Image Object @@ -22,7 +22,7 @@ type Image struct { // Type ID of the image element supported by the publisher. // The publisher can display this information in an appropriate format. // See Table Image Asset Types. - Type native.ImageAssetType `json:"type,omitempty"` + Type native1.ImageAssetType `json:"type,omitempty"` // Field: // w diff --git a/native/request/request.go b/native1/request/request.go similarity index 82% rename from native/request/request.go rename to native1/request/request.go index 1b68f4c..067cfd3 100644 --- a/native/request/request.go +++ b/native1/request/request.go @@ -7,17 +7,17 @@ package request import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 4.1 Native Markup Request Object // -// The Native Object defines the native advertising opportunity available for bid via this bid request. -// It will be included as a JSON-encoded string in the bid request’s imp.native field or as a direct JSON object, depending on the choice of the exchange. +// The Native Object defines the native1 advertising opportunity available for bid via this bid request. +// It will be included as a JSON-encoded string in the bid request’s imp.native1 field or as a direct JSON object, depending on the choice of the exchange. // While OpenRTB 2.x officially supports only JSON-encoded strings, many exchanges have implemented a formal object. // Check with your integration docs. // -// Note: Prior to VERSION 1.1, the specification could be interpreted as requiring the native request to have a root node with a single field “native” that would contain the object above as its value. +// Note: Prior to VERSION 1.1, the specification could be interpreted as requiring the native1 request to have a root node with a single field “native” that would contain the object above as its value. // The Native Markup Request Object specified above is now the root object. type Request struct { @@ -40,9 +40,9 @@ type Request struct { // Type: // integer // Description: - // The Layout ID of the native ad unit. + // The Layout ID of the native1 ad unit. // See the Table of Layout IDs below. - Layout native.Layout `json:"layout,omitempty"` + Layout native1.Layout `json:"layout,omitempty"` // Field: // adunit @@ -51,9 +51,9 @@ type Request struct { // Type: // integer // Description: - // The Ad unit ID of the native ad unit. + // The Ad unit ID of the native1 ad unit. // See Table of Ad Unit IDs below for a list of supported core ad units. - AdUnit native.AdUnit `json:"adunit,omitempty"` + AdUnit native1.AdUnit `json:"adunit,omitempty"` // Field: // context @@ -64,7 +64,7 @@ type Request struct { // Description: // The context in which the ad appears. // See Table of Context IDs below for a list of supported context types. - Context native.ContextType `json:"context,omitempty"` + Context native1.ContextType `json:"context,omitempty"` // Field: // contextsubtype @@ -75,7 +75,7 @@ type Request struct { // Description: // A more detailed context in which the ad appears. // See Table of Context SubType IDs below for a list of supported context subtypes. - ContextSubType native.ContextSubType `json:"contextsubtype,omitempty"` + ContextSubType native1.ContextSubType `json:"contextsubtype,omitempty"` // Field: // plcmttype @@ -86,7 +86,7 @@ type Request struct { // Description: // The design/format/layout of the ad unit being offered. // See Table of Placement Type IDs below for a list of supported placement types. - PlcmtType native.PlacementType `json:"plcmttype,omitempty"` + PlcmtType native1.PlacementType `json:"plcmttype,omitempty"` // Field: // plcmtcnt @@ -171,8 +171,8 @@ type Request struct { // Default: // 0 // Description: - // Set to 1 when the native ad supports buyer-specific privacy notice. - // Set to 0 (or field absent) when the native ad doesn’t support custom privacy links or if support is unknown. + // Set to 1 when the native1 ad supports buyer-specific privacy notice. + // Set to 0 (or field absent) when the native1 ad doesn’t support custom privacy links or if support is unknown. Privacy int8 `json:"privacy,omitempty"` // Field: diff --git a/native/request/request_suite_test.go b/native1/request/request_suite_test.go similarity index 100% rename from native/request/request_suite_test.go rename to native1/request/request_suite_test.go diff --git a/native/request/request_test.go b/native1/request/request_test.go similarity index 95% rename from native/request/request_test.go rename to native1/request/request_test.go index 6ae8f48..8cb1673 100644 --- a/native/request/request_test.go +++ b/native1/request/request_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/mxmCherry/openrtb/native/request" + . "github.com/mxmCherry/openrtb/native1/request" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/native/request/testdata/v1.1/README.md b/native1/request/testdata/v1.1/README.md similarity index 100% rename from native/request/testdata/v1.1/README.md rename to native1/request/testdata/v1.1/README.md diff --git a/native/request/testdata/v1.1/content-context.json b/native1/request/testdata/v1.1/content-context.json similarity index 100% rename from native/request/testdata/v1.1/content-context.json rename to native1/request/testdata/v1.1/content-context.json diff --git a/native/request/testdata/v1.1/social-context.json b/native1/request/testdata/v1.1/social-context.json similarity index 100% rename from native/request/testdata/v1.1/social-context.json rename to native1/request/testdata/v1.1/social-context.json diff --git a/native/request/testdata/v1.2/README.md b/native1/request/testdata/v1.2/README.md similarity index 100% rename from native/request/testdata/v1.2/README.md rename to native1/request/testdata/v1.2/README.md diff --git a/native/request/testdata/v1.2/content-context.json b/native1/request/testdata/v1.2/content-context.json similarity index 100% rename from native/request/testdata/v1.2/content-context.json rename to native1/request/testdata/v1.2/content-context.json diff --git a/native/request/testdata/v1.2/social-context.json b/native1/request/testdata/v1.2/social-context.json similarity index 100% rename from native/request/testdata/v1.2/social-context.json rename to native1/request/testdata/v1.2/social-context.json diff --git a/native/request/testdata/v1.2/third-party.json b/native1/request/testdata/v1.2/third-party.json similarity index 100% rename from native/request/testdata/v1.2/third-party.json rename to native1/request/testdata/v1.2/third-party.json diff --git a/native/request/title.go b/native1/request/title.go similarity index 100% rename from native/request/title.go rename to native1/request/title.go diff --git a/native/request/video.go b/native1/request/video.go similarity index 91% rename from native/request/video.go rename to native1/request/video.go index bf4d9a6..7c36bb5 100644 --- a/native/request/video.go +++ b/native1/request/video.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 4.5 Video Object @@ -23,7 +23,7 @@ type Video struct { // Description: // Content MIME types supported. // Popular MIME types include,but are not limited to “video/x-mswmv” for Windows Media, and “video/x-flv” for Flash Video, or “video/mp4”. - // Note that native frequently does not support flash. + // Note that native1 frequently does not support flash. MIMEs []string `json:"mimes"` // Field: @@ -55,7 +55,7 @@ type Video struct { // Description: // An array of video protocols the publisher can accept in the bid response. // See OpenRTB Table ‘Video Bid Response Protocols’ for a list of possible values. - Protocols []native.Protocol `json:"protocols"` + Protocols []native1.Protocol `json:"protocols"` // Field: // ext diff --git a/native/response/README.md b/native1/response/README.md similarity index 65% rename from native/response/README.md rename to native1/response/README.md index 746ef15..c937b80 100644 --- a/native/response/README.md +++ b/native1/response/README.md @@ -1,4 +1,4 @@ -# native/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/response?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/response) +# native1/response [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/native/response?status.svg)](https://godoc.org/github.com/mxmCherry/openrtb/native/response) [Go](https://golang.org/) implementation of [OpenRTB](https://www.iab.com/guidelines/real-time-bidding-rtb-project/) [Dynamic Native Ads API Specification Version 1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section 5 Native Ad Response Markup Details types. diff --git a/native/response/asset.go b/native1/response/asset.go similarity index 100% rename from native/response/asset.go rename to native1/response/asset.go diff --git a/native/response/data.go b/native1/response/data.go similarity index 84% rename from native/response/data.go rename to native1/response/data.go index bf92bb5..d033e6f 100644 --- a/native/response/data.go +++ b/native1/response/data.go @@ -3,14 +3,14 @@ package response import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 5.5 Object: Data // // Corresponds to the Data Object in the request, with the value filled in. -// The Data Object is to be used for all miscellaneous elements of the native unit such as Brand Name, Ratings, Review Count, Stars, Downloads, Price count etc. -// It is also generic for future native elements not contemplated at the time of the writing of this document. +// The Data Object is to be used for all miscellaneous elements of the native1 unit such as Brand Name, Ratings, Review Count, Stars, Downloads, Price count etc. +// It is also generic for future native1 elements not contemplated at the time of the writing of this document. type Data struct { // Field: // type @@ -21,7 +21,7 @@ type Data struct { // Description: // Required for assetsurl/dcourl responses, not required for embedded asset responses. // The type of data element being submitted from the Data Asset Types table. - Type native.DataAssetType `json:"type,omitempty"` + Type native1.DataAssetType `json:"type,omitempty"` // Field: // len diff --git a/native/response/event_tracker.go b/native1/response/event_tracker.go similarity index 93% rename from native/response/event_tracker.go rename to native1/response/event_tracker.go index 53d0542..e907654 100644 --- a/native/response/event_tracker.go +++ b/native1/response/event_tracker.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 5.8 Event Tracker Response Object @@ -21,7 +21,7 @@ type EventTracker struct { // Description: // Type of event to track. // See Event Types table. - Event native.EventType `json:"event"` + Event native1.EventType `json:"event"` // Field: // method @@ -32,7 +32,7 @@ type EventTracker struct { // Description: // Type of tracking requested // See Event Tracking Methods table. - Method native.EventTrackingMethod `json:"method"` + Method native1.EventTrackingMethod `json:"method"` // Field: // url diff --git a/native/response/image.go b/native1/response/image.go similarity index 94% rename from native/response/image.go rename to native1/response/image.go index bd96ce2..0ae83c4 100644 --- a/native/response/image.go +++ b/native1/response/image.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/mxmCherry/openrtb/native" + "github.com/mxmCherry/openrtb/native1" ) // 5.4 Object: Image @@ -22,7 +22,7 @@ type Image struct { // Description: // Required for assetsurl or dcourl responses, not required for embedded asset responses. // The type of image element being submitted from the Image Asset Types table. - Type native.ImageAssetType `json:"type,omitempty"` + Type native1.ImageAssetType `json:"type,omitempty"` // Field: // url diff --git a/native/response/link.go b/native1/response/link.go similarity index 100% rename from native/response/link.go rename to native1/response/link.go diff --git a/native/response/response.go b/native1/response/response.go similarity index 92% rename from native/response/response.go rename to native1/response/response.go index 69cb927..898cd75 100644 --- a/native/response/response.go +++ b/native1/response/response.go @@ -8,8 +8,8 @@ import "encoding/json" // 5.1 Object: Response // -// The native object is the top level JSON object which identifies a native response. -// Note: Prior to VERSION 1.1, the native response’s root node was an object with a single field “native” that would contain the object above as its value. +// The native1 object is the top level JSON object which identifies a native response. +// Note: Prior to VERSION 1.1, the native1 response’s root node was an object with a single field “native” that would contain the object above as its value. // The Native Object specified above is now the root object. // // Note re: assetsurl format responses: In the case of assetsurl or dcourl (beta) bidding, since the ultimate buyer/creative engine cannot alter the assets response based on the details inside the assets request (as it does not receive said request), it is critical that all required assets are provided, and such communications will need to be handled offline for recommended/optional elements. @@ -44,7 +44,7 @@ type Response struct { // Type: // object array // Description: - // List of native ad’s assets. + // List of native1 ad’s assets. // Required if no assetsurl. // Recommended as fallback even if assetsurl is provided. Assets []Asset `json:"assets,omitempty"` @@ -70,7 +70,7 @@ type Response struct { // string // Description: // URL where a dynamic creative specification may be found for populating this ad, per the Dynamic Content Ads Specification. - // Note this is a beta option as the interpretation of the Dynamic Content Ads Specification and how to assign those elements into a native ad is outside the scope of this spec and must be agreed offline between the parties or as may be specified in a future revision of the Dynamic Content Ads spec. + // Note this is a beta option as the interpretation of the Dynamic Content Ads Specification and how to assign those elements into a native1 ad is outside the scope of this spec and must be agreed offline between the parties or as may be specified in a future revision of the Dynamic Content Ads spec. // Where present, overrides the asset object in the response. DCOURL string `json:"dcourl,omitempty"` diff --git a/native/response/response_suite_test.go b/native1/response/response_suite_test.go similarity index 100% rename from native/response/response_suite_test.go rename to native1/response/response_suite_test.go diff --git a/native/response/response_test.go b/native1/response/response_test.go similarity index 95% rename from native/response/response_test.go rename to native1/response/response_test.go index b7f7cca..63712ce 100644 --- a/native/response/response_test.go +++ b/native1/response/response_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/mxmCherry/openrtb/native/response" + . "github.com/mxmCherry/openrtb/native1/response" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/native/response/testdata/v1.1/README.md b/native1/response/testdata/v1.1/README.md similarity index 100% rename from native/response/testdata/v1.1/README.md rename to native1/response/testdata/v1.1/README.md diff --git a/native/response/testdata/v1.1/clickout.json b/native1/response/testdata/v1.1/clickout.json similarity index 100% rename from native/response/testdata/v1.1/clickout.json rename to native1/response/testdata/v1.1/clickout.json diff --git a/native/response/testdata/v1.1/video.json b/native1/response/testdata/v1.1/video.json similarity index 100% rename from native/response/testdata/v1.1/video.json rename to native1/response/testdata/v1.1/video.json diff --git a/native/response/testdata/v1.2/README.md b/native1/response/testdata/v1.2/README.md similarity index 100% rename from native/response/testdata/v1.2/README.md rename to native1/response/testdata/v1.2/README.md diff --git a/native/response/testdata/v1.2/clickout.json b/native1/response/testdata/v1.2/clickout.json similarity index 100% rename from native/response/testdata/v1.2/clickout.json rename to native1/response/testdata/v1.2/clickout.json diff --git a/native/response/testdata/v1.2/third-party.json b/native1/response/testdata/v1.2/third-party.json similarity index 100% rename from native/response/testdata/v1.2/third-party.json rename to native1/response/testdata/v1.2/third-party.json diff --git a/native/response/testdata/v1.2/video.json b/native1/response/testdata/v1.2/video.json similarity index 100% rename from native/response/testdata/v1.2/video.json rename to native1/response/testdata/v1.2/video.json diff --git a/native/response/title.go b/native1/response/title.go similarity index 100% rename from native/response/title.go rename to native1/response/title.go diff --git a/native/response/video.go b/native1/response/video.go similarity index 100% rename from native/response/video.go rename to native1/response/video.go diff --git a/ad_position.go b/openrtb2/ad_position.go similarity index 98% rename from ad_position.go rename to openrtb2/ad_position.go index 90ee34e..2f76994 100644 --- a/ad_position.go +++ b/openrtb2/ad_position.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.4 Ad Position // diff --git a/api_framework.go b/openrtb2/api_framework.go similarity index 96% rename from api_framework.go rename to openrtb2/api_framework.go index 835e46d..f5403bd 100644 --- a/api_framework.go +++ b/openrtb2/api_framework.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.6 API Frameworks // diff --git a/app.go b/openrtb2/app.go similarity index 99% rename from app.go rename to openrtb2/app.go index 589dace..ce08d67 100644 --- a/app.go +++ b/openrtb2/app.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/audio.go b/openrtb2/audio.go similarity index 99% rename from audio.go rename to openrtb2/audio.go index ddca515..9eec597 100644 --- a/audio.go +++ b/openrtb2/audio.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/banner.go b/openrtb2/banner.go similarity index 99% rename from banner.go rename to openrtb2/banner.go index 70968fc..2005be7 100644 --- a/banner.go +++ b/openrtb2/banner.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/banner_ad_type.go b/openrtb2/banner_ad_type.go similarity index 96% rename from banner_ad_type.go rename to openrtb2/banner_ad_type.go index 65b6efe..f597250 100644 --- a/banner_ad_type.go +++ b/openrtb2/banner_ad_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.2 Banner Ad Types // diff --git a/bid.go b/openrtb2/bid.go similarity index 99% rename from bid.go rename to openrtb2/bid.go index 956d7bb..47c47a9 100644 --- a/bid.go +++ b/openrtb2/bid.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/bid_request.go b/openrtb2/bid_request.go similarity index 99% rename from bid_request.go rename to openrtb2/bid_request.go index 6ac82dc..07ad36d 100644 --- a/bid_request.go +++ b/openrtb2/bid_request.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/bid_request_test.go b/openrtb2/bid_request_test.go similarity index 94% rename from bid_request_test.go rename to openrtb2/bid_request_test.go index c22b5b1..270304a 100644 --- a/bid_request_test.go +++ b/openrtb2/bid_request_test.go @@ -1,11 +1,11 @@ -package openrtb_test +package openrtb2_test import ( "encoding/json" "io/ioutil" "path/filepath" - . "github.com/mxmCherry/openrtb" + . "github.com/mxmCherry/openrtb/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/bid_response.go b/openrtb2/bid_response.go similarity index 99% rename from bid_response.go rename to openrtb2/bid_response.go index a9572cf..acc2c9a 100644 --- a/bid_response.go +++ b/openrtb2/bid_response.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/bid_response_test.go b/openrtb2/bid_response_test.go similarity index 94% rename from bid_response_test.go rename to openrtb2/bid_response_test.go index e2bc236..aba9e0a 100644 --- a/bid_response_test.go +++ b/openrtb2/bid_response_test.go @@ -1,11 +1,11 @@ -package openrtb_test +package openrtb2_test import ( "encoding/json" "io/ioutil" "path/filepath" - . "github.com/mxmCherry/openrtb" + . "github.com/mxmCherry/openrtb/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/companion_type.go b/openrtb2/companion_type.go similarity index 96% rename from companion_type.go rename to openrtb2/companion_type.go index 4c38e50..2c538db 100644 --- a/companion_type.go +++ b/openrtb2/companion_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.14 Companion Types // diff --git a/connection_type.go b/openrtb2/connection_type.go similarity index 98% rename from connection_type.go rename to openrtb2/connection_type.go index 7cc78fa..215121b 100644 --- a/connection_type.go +++ b/openrtb2/connection_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.22 Connection Type // diff --git a/content.go b/openrtb2/content.go similarity index 99% rename from content.go rename to openrtb2/content.go index 395abed..8790e73 100644 --- a/content.go +++ b/openrtb2/content.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/content_context.go b/openrtb2/content_context.go similarity index 98% rename from content_context.go rename to openrtb2/content_context.go index c0291f3..d3e89a1 100644 --- a/content_context.go +++ b/openrtb2/content_context.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.18 Content Context // diff --git a/content_delivery_method.go b/openrtb2/content_delivery_method.go similarity index 95% rename from content_delivery_method.go rename to openrtb2/content_delivery_method.go index f33bd00..d84b4bc 100644 --- a/content_delivery_method.go +++ b/openrtb2/content_delivery_method.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.15 Content Delivery Methods // diff --git a/creative_attribute.go b/openrtb2/creative_attribute.go similarity index 99% rename from creative_attribute.go rename to openrtb2/creative_attribute.go index 32f3908..326340d 100644 --- a/creative_attribute.go +++ b/openrtb2/creative_attribute.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.3 Creative Attributes // diff --git a/data.go b/openrtb2/data.go similarity index 98% rename from data.go rename to openrtb2/data.go index 77387a7..b255410 100644 --- a/data.go +++ b/openrtb2/data.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/deal.go b/openrtb2/deal.go similarity index 99% rename from deal.go rename to openrtb2/deal.go index 98bf652..9919f84 100644 --- a/deal.go +++ b/openrtb2/deal.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/device.go b/openrtb2/device.go similarity index 99% rename from device.go rename to openrtb2/device.go index 4d1ef8c..5128f26 100644 --- a/device.go +++ b/openrtb2/device.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/device_type.go b/openrtb2/device_type.go similarity index 98% rename from device_type.go rename to openrtb2/device_type.go index b710f6b..33dfa5a 100644 --- a/device_type.go +++ b/openrtb2/device_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.21 Device Type // diff --git a/expandable_direction.go b/openrtb2/expandable_direction.go similarity index 96% rename from expandable_direction.go rename to openrtb2/expandable_direction.go index d51a28d..3f90291 100644 --- a/expandable_direction.go +++ b/openrtb2/expandable_direction.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.5 Expandable Direction // diff --git a/feed_type.go b/openrtb2/feed_type.go similarity index 93% rename from feed_type.go rename to openrtb2/feed_type.go index 785edab..5f62578 100644 --- a/feed_type.go +++ b/openrtb2/feed_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.16 Feed Types // diff --git a/format.go b/openrtb2/format.go similarity index 98% rename from format.go rename to openrtb2/format.go index f15835c..6628348 100644 --- a/format.go +++ b/openrtb2/format.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/geo.go b/openrtb2/geo.go similarity index 99% rename from geo.go rename to openrtb2/geo.go index a709449..cad1ee3 100644 --- a/geo.go +++ b/openrtb2/geo.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/imp.go b/openrtb2/imp.go similarity index 99% rename from imp.go rename to openrtb2/imp.go index b636845..d46411e 100644 --- a/imp.go +++ b/openrtb2/imp.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/ip_location_service.go b/openrtb2/ip_location_service.go similarity index 96% rename from ip_location_service.go rename to openrtb2/ip_location_service.go index 1053a00..012ccf8 100644 --- a/ip_location_service.go +++ b/openrtb2/ip_location_service.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.23 IP Location Services // diff --git a/iqg_media_rating.go b/openrtb2/iqg_media_rating.go similarity index 95% rename from iqg_media_rating.go rename to openrtb2/iqg_media_rating.go index eeeb773..5130d5f 100644 --- a/iqg_media_rating.go +++ b/openrtb2/iqg_media_rating.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.19 IQG Media Ratings // diff --git a/location_type.go b/openrtb2/location_type.go similarity index 95% rename from location_type.go rename to openrtb2/location_type.go index ec44166..6799687 100644 --- a/location_type.go +++ b/openrtb2/location_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.20 Location Type // diff --git a/loss_reason_code.go b/openrtb2/loss_reason_code.go similarity index 99% rename from loss_reason_code.go rename to openrtb2/loss_reason_code.go index ff0eff9..c22ce12 100644 --- a/loss_reason_code.go +++ b/openrtb2/loss_reason_code.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.25 Loss Reason Codes // diff --git a/metric.go b/openrtb2/metric.go similarity index 98% rename from metric.go rename to openrtb2/metric.go index e160860..2d6f98b 100644 --- a/metric.go +++ b/openrtb2/metric.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/native.go b/openrtb2/native.go similarity index 99% rename from native.go rename to openrtb2/native.go index 377d865..0888e09 100644 --- a/native.go +++ b/openrtb2/native.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/no_bid_reason_code.go b/openrtb2/no_bid_reason_code.go similarity index 98% rename from no_bid_reason_code.go rename to openrtb2/no_bid_reason_code.go index 9ac8555..785cfad 100644 --- a/no_bid_reason_code.go +++ b/openrtb2/no_bid_reason_code.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.24 No-Bid Reason Codes // diff --git a/openrtb.go b/openrtb2/openrtb.go similarity index 92% rename from openrtb.go rename to openrtb2/openrtb.go index 1df57e1..a76d11e 100644 --- a/openrtb.go +++ b/openrtb2/openrtb.go @@ -1,4 +1,4 @@ // Package openrtb provides OpenRTB v2.5 types: // https://www.iab.com/guidelines/real-time-bidding-rtb-project/ // https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf -package openrtb +package openrtb2 diff --git a/openrtb_suite_test.go b/openrtb2/openrtb_suite_test.go similarity index 55% rename from openrtb_suite_test.go rename to openrtb2/openrtb_suite_test.go index 9487389..e3aa765 100644 --- a/openrtb_suite_test.go +++ b/openrtb2/openrtb_suite_test.go @@ -1,4 +1,4 @@ -package openrtb_test +package openrtb2_test import ( . "github.com/onsi/ginkgo" @@ -7,7 +7,7 @@ import ( "testing" ) -func TestOpenrtb(t *testing.T) { +func TestOpenrtb2(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Openrtb Suite") + RunSpecs(t, "Openrtb2 Suite") } diff --git a/playback_cessation_mode.go b/openrtb2/playback_cessation_mode.go similarity index 97% rename from playback_cessation_mode.go rename to openrtb2/playback_cessation_mode.go index 3ef3d56..0d28218 100644 --- a/playback_cessation_mode.go +++ b/openrtb2/playback_cessation_mode.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.11 Playback Cessation Modes // diff --git a/playback_method.go b/openrtb2/playback_method.go similarity index 97% rename from playback_method.go rename to openrtb2/playback_method.go index 87d8289..4f01e6a 100644 --- a/playback_method.go +++ b/openrtb2/playback_method.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.10 Playback Methods // diff --git a/pmp.go b/openrtb2/pmp.go similarity index 98% rename from pmp.go rename to openrtb2/pmp.go index 24d43d3..c969f2e 100644 --- a/pmp.go +++ b/openrtb2/pmp.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/producer.go b/openrtb2/producer.go similarity index 98% rename from producer.go rename to openrtb2/producer.go index c03f961..2acd6ee 100644 --- a/producer.go +++ b/openrtb2/producer.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/production_quality.go b/openrtb2/production_quality.go similarity index 98% rename from production_quality.go rename to openrtb2/production_quality.go index 67f4aa6..2403240 100644 --- a/production_quality.go +++ b/openrtb2/production_quality.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.13 Production Quality // diff --git a/protocol.go b/openrtb2/protocol.go similarity index 97% rename from protocol.go rename to openrtb2/protocol.go index 9b2860c..2e12345 100644 --- a/protocol.go +++ b/openrtb2/protocol.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.8 Protocols // diff --git a/ptr.go b/openrtb2/ptr.go similarity index 91% rename from ptr.go rename to openrtb2/ptr.go index 65b8a2a..4b6d364 100644 --- a/ptr.go +++ b/openrtb2/ptr.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // Int8Ptr returns pointer to passed argument. func Int8Ptr(n int8) *int8 { diff --git a/publisher.go b/openrtb2/publisher.go similarity index 98% rename from publisher.go rename to openrtb2/publisher.go index 51b2fa5..fdeeff1 100644 --- a/publisher.go +++ b/openrtb2/publisher.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/regs.go b/openrtb2/regs.go similarity index 98% rename from regs.go rename to openrtb2/regs.go index 6413859..84a9231 100644 --- a/regs.go +++ b/openrtb2/regs.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/seat_bid.go b/openrtb2/seat_bid.go similarity index 98% rename from seat_bid.go rename to openrtb2/seat_bid.go index e01f700..6ab7956 100644 --- a/seat_bid.go +++ b/openrtb2/seat_bid.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/segment.go b/openrtb2/segment.go similarity index 98% rename from segment.go rename to openrtb2/segment.go index d5c4d07..625be07 100644 --- a/segment.go +++ b/openrtb2/segment.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/site.go b/openrtb2/site.go similarity index 99% rename from site.go rename to openrtb2/site.go index dcbeab3..e07a47b 100644 --- a/site.go +++ b/openrtb2/site.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/source.go b/openrtb2/source.go similarity index 98% rename from source.go rename to openrtb2/source.go index f341d44..d622121 100644 --- a/source.go +++ b/openrtb2/source.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/start_delay.go b/openrtb2/start_delay.go similarity index 97% rename from start_delay.go rename to openrtb2/start_delay.go index 07546f7..dcde3e2 100644 --- a/start_delay.go +++ b/openrtb2/start_delay.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.12 Start Delay // diff --git a/testdata/README.md b/openrtb2/testdata/README.md similarity index 100% rename from testdata/README.md rename to openrtb2/testdata/README.md diff --git a/testdata/bid-request/expandable-creative.json b/openrtb2/testdata/bid-request/expandable-creative.json similarity index 100% rename from testdata/bid-request/expandable-creative.json rename to openrtb2/testdata/bid-request/expandable-creative.json diff --git a/testdata/bid-request/mobile.json b/openrtb2/testdata/bid-request/mobile.json similarity index 100% rename from testdata/bid-request/mobile.json rename to openrtb2/testdata/bid-request/mobile.json diff --git a/testdata/bid-request/native-ad.json b/openrtb2/testdata/bid-request/native-ad.json similarity index 100% rename from testdata/bid-request/native-ad.json rename to openrtb2/testdata/bid-request/native-ad.json diff --git a/testdata/bid-request/pmp-with-direct-deal.json b/openrtb2/testdata/bid-request/pmp-with-direct-deal.json similarity index 100% rename from testdata/bid-request/pmp-with-direct-deal.json rename to openrtb2/testdata/bid-request/pmp-with-direct-deal.json diff --git a/testdata/bid-request/simple-banner.json b/openrtb2/testdata/bid-request/simple-banner.json similarity index 100% rename from testdata/bid-request/simple-banner.json rename to openrtb2/testdata/bid-request/simple-banner.json diff --git a/testdata/bid-request/video.json b/openrtb2/testdata/bid-request/video.json similarity index 100% rename from testdata/bid-request/video.json rename to openrtb2/testdata/bid-request/video.json diff --git a/testdata/bid-response/ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/ad-served-on-win-notice.json similarity index 100% rename from testdata/bid-response/ad-served-on-win-notice.json rename to openrtb2/testdata/bid-response/ad-served-on-win-notice.json diff --git a/testdata/bid-response/direct-deal-ad-served-on-win-notice.json b/openrtb2/testdata/bid-response/direct-deal-ad-served-on-win-notice.json similarity index 100% rename from testdata/bid-response/direct-deal-ad-served-on-win-notice.json rename to openrtb2/testdata/bid-response/direct-deal-ad-served-on-win-notice.json diff --git a/testdata/bid-response/native-markup-returned-inline.json b/openrtb2/testdata/bid-response/native-markup-returned-inline.json similarity index 100% rename from testdata/bid-response/native-markup-returned-inline.json rename to openrtb2/testdata/bid-response/native-markup-returned-inline.json diff --git a/testdata/bid-response/vast-xml-document-returned-inline.json b/openrtb2/testdata/bid-response/vast-xml-document-returned-inline.json similarity index 100% rename from testdata/bid-response/vast-xml-document-returned-inline.json rename to openrtb2/testdata/bid-response/vast-xml-document-returned-inline.json diff --git a/user.go b/openrtb2/user.go similarity index 99% rename from user.go rename to openrtb2/user.go index ad1783f..271c3a8 100644 --- a/user.go +++ b/openrtb2/user.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/video.go b/openrtb2/video.go similarity index 99% rename from video.go rename to openrtb2/video.go index d7d7d4e..488411e 100644 --- a/video.go +++ b/openrtb2/video.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 import "encoding/json" diff --git a/video_linearity.go b/openrtb2/video_linearity.go similarity index 97% rename from video_linearity.go rename to openrtb2/video_linearity.go index 9440910..07fc9bb 100644 --- a/video_linearity.go +++ b/openrtb2/video_linearity.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.7 Video Linearity // diff --git a/video_placement_type.go b/openrtb2/video_placement_type.go similarity index 98% rename from video_placement_type.go rename to openrtb2/video_placement_type.go index 18e6e06..41b6042 100644 --- a/video_placement_type.go +++ b/openrtb2/video_placement_type.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.9 Video Placement Types // diff --git a/volume_normalization_mode.go b/openrtb2/volume_normalization_mode.go similarity index 98% rename from volume_normalization_mode.go rename to openrtb2/volume_normalization_mode.go index 6cbee27..44e6475 100644 --- a/volume_normalization_mode.go +++ b/openrtb2/volume_normalization_mode.go @@ -1,4 +1,4 @@ -package openrtb +package openrtb2 // 5.17 Volume Normalization Modes //