From e642f66bd4f9b51c99b0c7b51188b751969465cb Mon Sep 17 00:00:00 2001 From: Max Cherry Date: Sat, 3 Mar 2018 10:09:50 +0200 Subject: [PATCH] Moved native/request.Protocol (copied from openrtb.Protocol) to native.Protocol (for consistency) --- native/{request => }/protocol.go | 4 +++- native/request/video.go | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename native/{request => }/protocol.go (82%) diff --git a/native/request/protocol.go b/native/protocol.go similarity index 82% rename from native/request/protocol.go rename to native/protocol.go index 47dde72..adfd902 100644 --- a/native/request/protocol.go +++ b/native/protocol.go @@ -1,8 +1,10 @@ -package request +package native // 5.8 Protocols (from OpenRTB spec 2.5) // // Options for the various bid response protocols that could be supported by an exchange. +// +// Dev note: this enum is copied to native package to allow requiring native/{request,response} in root openrtb package in future. type Protocol int8 const ( diff --git a/native/request/video.go b/native/request/video.go index 0eaa23a..bf4d9a6 100644 --- a/native/request/video.go +++ b/native/request/video.go @@ -1,6 +1,10 @@ package request -import "encoding/json" +import ( + "encoding/json" + + "github.com/mxmCherry/openrtb/native" +) // 4.5 Video Object // @@ -51,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 []Protocol `json:"protocols"` + Protocols []native.Protocol `json:"protocols"` // Field: // ext