Documentation
¶
Index ¶
Constants ¶
const ( Required int8 = 2 // bid responses without DSA object will not be accepted RequiredOnlinePlatform int8 = 3 // bid responses without DSA object will not be accepted, Publisher is Online Platform )
Required values representing whether a DSA object is required
const ( PubRenderCannotRender int8 = 0 // publisher can't render PubRenderWillRender int8 = 2 // publisher will render )
PubRender values representing publisher rendering intentions
const (
AdRenderWillRender int8 = 1 // buyer/advertiser will render
)
AdRender values representing buyer/advertiser rendering intentions
Variables ¶
var ( ErrDsaMissing = errors.New("DSA object missing when required") ErrBehalfTooLong = errors.New("DSA behalf exceeds limit of 100 chars") ErrPaidTooLong = errors.New("DSA paid exceeds limit of 100 chars") ErrNeitherWillRender = errors.New("DSA publisher and buyer both signal will not render") ErrBothWillRender = errors.New("DSA publisher and buyer both signal will render") )
Functions ¶
func Validate ¶
func Validate(req *openrtb_ext.RequestWrapper, bid *entities.PbsOrtbBid) error
Validate determines whether a given bid is valid from a DSA perspective. A bid is considered valid unless the bid request indicates that a DSA object is required in bid responses and the object happens to be missing from the specified bid, or if the bid DSA object contents are invalid
Types ¶
type Writer ¶
type Writer struct { Config *config.AccountDSA GDPRInScope bool }
Writer is used to write the default DSA to the request (req.regs.ext.dsa)
func (Writer) Write ¶
func (dw Writer) Write(req *openrtb_ext.RequestWrapper) error
Write sets the default DSA object on the request at regs.ext.dsa if it is defined in the account config and it is not already present on the request