Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoubleClickPricer ¶
type DoubleClickPricer struct {
// contains filtered or unexported fields
}
DoubleClickPricer implementing price encryption and decryption Specs : https://developers.google.com/ad-exchange/rtb/response-guide/decrypt-price
func NewDoubleClickPricer ¶
func NewDoubleClickPricer( encryptionKey string, integrityKey string, isBase64Keys bool, keyDecodingMode helpers.KeyDecodingMode, scaleFactor float64, isDebugMode bool) (*DoubleClickPricer, error)
NewDoubleClickPricer returns a DoubleClickPricer struct. Keys are either base 64 websafe of hexa. keyDecodingMode should be used to specify how keys should be decoded. Factor the clear price will be multiplied by before encryption. from specs, scaleFactor is 1,000,000, but you can set something else. Be aware that the price is stored as an int64 so depending on the digits precision you want, picking a scale factor smaller than 1,000,000 may lead to price to be rounded and loose some digits precision.