doubleclick protobuf file load to project
1,download protobuf file to localwget https://developers.google.com/ad-exchange/rtb/downloads/openrtb-proto.txt
wget https://developers.google.com/ad-exchange/rtb/downloads/openrtb-adx-proto.txt
2,move to protofile
mv openrtb-proto.txtopenrtb.proto
mv openrtb-adx-proto.txt openrtb_adx.proto
3,edit two protofile to same package
update openrtb_adx.proto usenew package name "your self package name " not "com.google.doubleclick"
eg:package openrtb;
4,generate to go file
protoc--go_out=. openrtb.proto openrtb_adx.proto
5,set protobuf exten fieldexample:
if err := proto.SetExtension(&seatBidBid, openrtb.E_Bid, bidExt); err != nil {
logger.Warn( exchange, " set impTrackers Error[", err, "]")
return false
}
页:
[1]