Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 PolicyWriter interface for CCPA.
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)
ReadFromRequest extracts the CCPA regulatory information from an OpenRTB bid request.