Documentation ¶
Index ¶
- Constants
- Variables
- type Activity
- type ActivityControl
- type ActivityPlan
- type ActivityResult
- type Component
- type ComponentEnforcementRule
- type EnabledPolicyEnforcer
- type Enforcement
- type NilPolicyEnforcer
- type NilPolicyWriter
- type Policies
- type PolicyEnforcer
- type PolicyWriter
- type Rule
- type ScrubStrategyDeviceID
- type ScrubStrategyGeo
- type ScrubStrategyIPV4
- type ScrubStrategyIPV6
- type ScrubStrategyUser
- type Scrubber
Constants ¶
const ( ComponentTypeBidder = "bidder" ComponentTypeAnalytics = "analytics" ComponentTypeRealTimeData = "rtd" ComponentTypeGeneral = "general" )
Variables ¶
var ErrComponentEmpty = errors.New("unable to parse empty component")
Functions ¶
This section is empty.
Types ¶
type Activity ¶ added in v0.256.0
type Activity int
Activity defines privileges which can be controlled directly by the publisher or via privacy policies.
type ActivityControl ¶ added in v0.263.0
type ActivityControl struct {
// contains filtered or unexported fields
}
func NewActivityControl ¶ added in v0.263.0
func NewActivityControl(privacyConf *config.AccountPrivacy) (ActivityControl, error)
type ActivityPlan ¶ added in v0.263.0
type ActivityPlan struct {
// contains filtered or unexported fields
}
func (ActivityPlan) Evaluate ¶ added in v0.268.0
func (p ActivityPlan) Evaluate(target Component) bool
type ActivityResult ¶ added in v0.263.0
type ActivityResult int
const ( ActivityAbstain ActivityResult = iota ActivityAllow ActivityDeny )
type Component ¶ added in v0.271.0
func ParseComponent ¶ added in v0.271.0
type ComponentEnforcementRule ¶ added in v0.263.0
type ComponentEnforcementRule struct {
// contains filtered or unexported fields
}
func (ComponentEnforcementRule) Evaluate ¶ added in v0.268.0
func (r ComponentEnforcementRule) Evaluate(target Component) ActivityResult
type EnabledPolicyEnforcer ¶
type EnabledPolicyEnforcer struct { Enabled bool PolicyEnforcer PolicyEnforcer }
EnabledPolicyEnforcer decorates a PolicyEnforcer with an enabled flag.
func (EnabledPolicyEnforcer) CanEnforce ¶
func (p EnabledPolicyEnforcer) CanEnforce() bool
CanEnforce returns true when the PolicyEnforcer can enforce.
func (EnabledPolicyEnforcer) ShouldEnforce ¶
func (p EnabledPolicyEnforcer) ShouldEnforce(bidder string) bool
ShouldEnforce returns true when the enforcer is enabled the PolicyEnforcer allows enforcement.
type Enforcement ¶
type Enforcement struct { CCPA bool COPPA bool GDPRGeo bool GDPRID bool LMT bool // activities UFPD bool Eids bool PreciseGeo bool TID bool }
Enforcement represents the privacy policies to enforce for an OpenRTB bid request.
func (Enforcement) AnyActivities ¶ added in v0.267.0
func (e Enforcement) AnyActivities() bool
func (Enforcement) AnyLegacy ¶ added in v0.267.0
func (e Enforcement) AnyLegacy() bool
Any returns true if at least one privacy policy requires enforcement.
func (Enforcement) Apply ¶
func (e Enforcement) Apply(bidRequest *openrtb2.BidRequest)
Apply cleans personally identifiable information from an OpenRTB bid request.
type NilPolicyEnforcer ¶
type NilPolicyEnforcer struct{}
NilPolicyEnforcer implements the PolicyEnforcer interface but will always return false.
func (NilPolicyEnforcer) CanEnforce ¶
func (NilPolicyEnforcer) CanEnforce() bool
CanEnforce is hardcoded to always return false.
func (NilPolicyEnforcer) ShouldEnforce ¶
func (NilPolicyEnforcer) ShouldEnforce(bidder string) bool
ShouldEnforce is hardcoded to always return false.
type NilPolicyWriter ¶
type NilPolicyWriter struct{}
NilPolicyWriter implements the PolicyWriter interface but performs no action.
func (NilPolicyWriter) Write ¶
func (NilPolicyWriter) Write(req *openrtb2.BidRequest) error
Write is hardcoded to perform no action with the OpenRTB bid request.
type PolicyEnforcer ¶
type PolicyEnforcer interface { // CanEnforce returns true when policy information is specifically provided by the publisher. CanEnforce() bool // ShouldEnforce returns true when the OpenRTB request should have personally identifiable // information (PII) removed or anonymized per the policy. ShouldEnforce(bidder string) bool }
PolicyEnforcer determines if personally identifiable information (PII) should be removed or anonymized per the policy.
type PolicyWriter ¶
type PolicyWriter interface {
Write(req *openrtb2.BidRequest) error
}
PolicyWriter mutates an OpenRTB bid request with a policy's regulatory information.
type Rule ¶ added in v0.271.0
type Rule interface {
Evaluate(target Component) ActivityResult
}
type ScrubStrategyDeviceID ¶
type ScrubStrategyDeviceID int
ScrubStrategyDeviceID defines the approach to remove hardware id and device id data.
const ( // ScrubStrategyDeviceIDNone does not remove hardware id and device id data. ScrubStrategyDeviceIDNone ScrubStrategyDeviceID = iota // ScrubStrategyDeviceIDAll removes all hardware and device id data (ifa, mac hashes device id hashes) ScrubStrategyDeviceIDAll )
type ScrubStrategyGeo ¶
type ScrubStrategyGeo int
ScrubStrategyGeo defines the approach to scrub PII from geographical data.
const ( // ScrubStrategyGeoNone does not remove any geographical data. ScrubStrategyGeoNone ScrubStrategyGeo = iota // ScrubStrategyGeoFull removes all geographical data. ScrubStrategyGeoFull // ScrubStrategyGeoReducedPrecision anonymizes geographical data with rounding. ScrubStrategyGeoReducedPrecision )
type ScrubStrategyIPV4 ¶
type ScrubStrategyIPV4 int
ScrubStrategyIPV4 defines the approach to scrub PII from an IPV4 address.
const ( // ScrubStrategyIPV4None does not remove any part of an IPV4 address. ScrubStrategyIPV4None ScrubStrategyIPV4 = iota // ScrubStrategyIPV4Lowest8 zeroes out the last 8 bits of an IPV4 address. ScrubStrategyIPV4Lowest8 )
type ScrubStrategyIPV6 ¶
type ScrubStrategyIPV6 int
ScrubStrategyIPV6 defines the approach to scrub PII from an IPV6 address.
const ( // ScrubStrategyIPV6None does not remove any part of an IPV6 address. ScrubStrategyIPV6None ScrubStrategyIPV6 = iota // ScrubStrategyIPV6Lowest16 zeroes out the last 16 bits of an IPV6 address. ScrubStrategyIPV6Lowest16 // ScrubStrategyIPV6Lowest32 zeroes out the last 32 bits of an IPV6 address. ScrubStrategyIPV6Lowest32 )
type ScrubStrategyUser ¶
type ScrubStrategyUser int
ScrubStrategyUser defines the approach to scrub PII from user data.
const ( // ScrubStrategyUserNone does not remove non-location data. ScrubStrategyUserNone ScrubStrategyUser = iota // ScrubStrategyUserIDAndDemographic removes the user's buyer id, exchange id year of birth, and gender. ScrubStrategyUserIDAndDemographic )
type Scrubber ¶
type Scrubber interface { ScrubRequest(bidRequest *openrtb2.BidRequest, enforcement Enforcement) *openrtb2.BidRequest ScrubDevice(device *openrtb2.Device, id ScrubStrategyDeviceID, ipv4 ScrubStrategyIPV4, ipv6 ScrubStrategyIPV6, geo ScrubStrategyGeo) *openrtb2.Device ScrubUser(user *openrtb2.User, strategy ScrubStrategyUser, geo ScrubStrategyGeo) *openrtb2.User }
Scrubber removes PII from parts of an OpenRTB request.