Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectCCPAConsent ¶
func ValidateConsent ¶
ValidateConsent returns true if the consent string is empty or valid per the IAB CCPA spec.
Types ¶
type ConsentWriter ¶
type ConsentWriter struct {
Consent string
}
ConsentWriter implements the old PolicyWriter interface for CCPA. This is used where we have not converted to RequestWrapper yet
func (ConsentWriter) Write ¶
func (c ConsentWriter) Write(req *openrtb2.BidRequest) error
Write mutates an OpenRTB bid request with the CCPA consent string.
type ParsedPolicy ¶
type ParsedPolicy struct {
// contains filtered or unexported fields
}
ParsedPolicy represents parsed and validated CCPA regulatory information. Use this struct to make enforcement decisions.
func (ParsedPolicy) CanEnforce ¶
func (p ParsedPolicy) CanEnforce() bool
CanEnforce returns true when consent is specifically provided by the publisher, as opposed to an empty string.
func (ParsedPolicy) ShouldEnforce ¶
func (p ParsedPolicy) ShouldEnforce(bidder string) bool
ShouldEnforce returns true when the opt-out signal is explicitly detected.
type Policy ¶
Policy represents the CCPA regulatory information from an OpenRTB bid request.
func ReadFromRequest ¶
func ReadFromRequest(req *openrtb2.BidRequest) (Policy, error)
func ReadFromRequestWrapper ¶
func ReadFromRequestWrapper(req *openrtb_ext.RequestWrapper, gpp gpplib.GppContainer) (Policy, error)
ReadFromRequestWrapper extracts the CCPA regulatory information from an OpenRTB bid request.
func (Policy) Parse ¶
func (p Policy) Parse(validBidders map[string]struct{}) (ParsedPolicy, error)
Parse returns a parsed and validated ParsedPolicy intended for use in enforcement decisions.
func (Policy) Write ¶
func (p Policy) Write(req *openrtb_ext.RequestWrapper) error
Write mutates an OpenRTB bid request with the CCPA regulatory information.