Documentation ¶
Index ¶
- Variables
- func VendorListURLMaker(vendorListVersion uint16) string
- type AllowHostCookies
- func (p AllowHostCookies) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, ...) (permissions AuctionPermissions, err error)
- func (p AllowHostCookies) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName) (bool, error)
- func (p *AllowHostCookies) HostCookiesAllowed(ctx context.Context) (bool, error)
- type AlwaysAllow
- func (a AlwaysAllow) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, ...) (permissions AuctionPermissions, err error)
- func (a AlwaysAllow) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName) (bool, error)
- func (a AlwaysAllow) HostCookiesAllowed(ctx context.Context) (bool, error)
- type AuctionPermissions
- type ErrorMalformedConsent
- type Permissions
- type PermissionsBuilder
- type RequestInfo
- type Signal
- type TCF2ConfigBuilder
- type TCF2ConfigReader
- type VendorListFetcher
Constants ¶
This section is empty.
Variables ¶
var AllowAll = AuctionPermissions{ AllowBidRequest: true, PassGeo: true, PassID: true, }
var AllowBidRequestOnly = AuctionPermissions{ AllowBidRequest: true, PassGeo: false, PassID: false, }
var DenyAll = AuctionPermissions{ AllowBidRequest: false, PassGeo: false, PassID: false, }
Functions ¶
func VendorListURLMaker ¶ added in v0.206.0
Make a URL which can be used to fetch a given version of the Global Vendor List. If the version is 0, this will fetch the latest version.
Types ¶
type AllowHostCookies ¶
type AllowHostCookies struct {
// contains filtered or unexported fields
}
AllowHostCookies represents a GDPR permissions policy with host cookie syncing always allowed
func (AllowHostCookies) AuctionActivitiesAllowed ¶
func (p AllowHostCookies) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName) (permissions AuctionPermissions, err error)
func (AllowHostCookies) BidderSyncAllowed ¶
func (p AllowHostCookies) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName) (bool, error)
func (*AllowHostCookies) HostCookiesAllowed ¶
func (p *AllowHostCookies) HostCookiesAllowed(ctx context.Context) (bool, error)
HostCookiesAllowed always returns true
type AlwaysAllow ¶
type AlwaysAllow struct{}
Exporting to allow for easy test setups
func (AlwaysAllow) AuctionActivitiesAllowed ¶
func (a AlwaysAllow) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName) (permissions AuctionPermissions, err error)
func (AlwaysAllow) BidderSyncAllowed ¶
func (a AlwaysAllow) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName) (bool, error)
func (AlwaysAllow) HostCookiesAllowed ¶
func (a AlwaysAllow) HostCookiesAllowed(ctx context.Context) (bool, error)
type AuctionPermissions ¶ added in v0.211.0
type ErrorMalformedConsent ¶
An ErrorMalformedConsent will be returned by the Permissions interface if the consent string argument was the reason for the failure.
func (*ErrorMalformedConsent) Error ¶
func (e *ErrorMalformedConsent) Error() string
type Permissions ¶
type Permissions interface { // Determines whether or not the host company is allowed to read/write cookies. // // If the consent string was nonsensical, the returned error will be an ErrorMalformedConsent. HostCookiesAllowed(ctx context.Context) (bool, error) // Determines whether or not the given bidder is allowed to user personal info for ad targeting. // // If the consent string was nonsensical, the returned error will be an ErrorMalformedConsent. BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName) (bool, error) // Determines whether or not to send PI information to a bidder, or mask it out. // // If the consent string was nonsensical, the returned error will be an ErrorMalformedConsent. AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName) (permissions AuctionPermissions, err error) }
func NewPermissions ¶
func NewPermissions(cfg config.GDPR, tcf2Config TCF2ConfigReader, vendorIDs map[openrtb_ext.BidderName]uint16, fetcher VendorListFetcher, requestInfo RequestInfo) Permissions
NewPermissions gets a per-request Permissions object that can then be used to check GDPR permissions for a given bidder.
type PermissionsBuilder ¶ added in v0.206.0
type PermissionsBuilder func(TCF2ConfigReader, RequestInfo) Permissions
func NewPermissionsBuilder ¶ added in v0.213.0
func NewPermissionsBuilder(cfg config.GDPR, gvlVendorIDs map[openrtb_ext.BidderName]uint16, vendorListFetcher VendorListFetcher) PermissionsBuilder
NewPermissionsBuilder is of type PermissionsBuilderMaker It takes host config data used to configure the builder function it returns
type RequestInfo ¶ added in v0.215.0
type Signal ¶
type Signal int
func SignalNormalize ¶ added in v0.173.0
SignalNormalize normalizes a GDPR signal to ensure it's always either SignalYes or SignalNo.
func SignalParse ¶
SignalParse returns a parsed GDPR signal or a parse error.
type TCF2ConfigBuilder ¶ added in v0.206.0
type TCF2ConfigBuilder func(hostConfig config.TCF2, accountConfig config.AccountGDPR) TCF2ConfigReader
type TCF2ConfigReader ¶ added in v0.206.0
type TCF2ConfigReader interface { BasicEnforcementVendor(openrtb_ext.BidderName) bool FeatureOneEnforced() bool FeatureOneVendorException(openrtb_ext.BidderName) bool IntegrationEnabled(config.IntegrationType) bool IsEnabled() bool PurposeEnforced(consentconstants.Purpose) bool PurposeEnforcingVendors(consentconstants.Purpose) bool PurposeVendorException(consentconstants.Purpose, openrtb_ext.BidderName) bool PurposeOneTreatmentEnabled() bool PurposeOneTreatmentAccessAllowed() bool }
TCF2ConfigReader is an interface to access TCF2 configurations
func NewTCF2Config ¶ added in v0.206.0
func NewTCF2Config(hostConfig config.TCF2, accountConfig config.AccountGDPR) TCF2ConfigReader
NewTCF2Config creates an instance of tcf2Config which implements the TCF2ConfigReader interface
type VendorListFetcher ¶ added in v0.206.0
type VendorListFetcher func(ctx context.Context, id uint16) (vendorlist.VendorList, error)