Documentation ¶
Index ¶
- type AlwaysAllow
- func (a AlwaysAllow) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName, consent string) (bool, error)
- func (a AlwaysAllow) HostCookiesAllowed(ctx context.Context, consent string) (bool, error)
- func (a AlwaysAllow) PersonalInfoAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, ...) (bool, error)
- type ErrorMalformedConsent
- type Permissions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlwaysAllow ¶
type AlwaysAllow struct{}
Exporting to allow for easy test setups
func (AlwaysAllow) BidderSyncAllowed ¶
func (a AlwaysAllow) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName, consent string) (bool, error)
func (AlwaysAllow) HostCookiesAllowed ¶
func (AlwaysAllow) PersonalInfoAllowed ¶
func (a AlwaysAllow) PersonalInfoAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, consent string) (bool, error)
type ErrorMalformedConsent ¶
type ErrorMalformedConsent struct {
// contains filtered or unexported fields
}
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 nonsenical, the returned error will be an ErrorMalformedConsent. HostCookiesAllowed(ctx context.Context, consent string) (bool, error) // Determines whether or not the given bidder is allowed to user personal info for ad targeting. // // If the consent string was nonsenical, the returned error will be an ErrorMalformedConsent. BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.BidderName, consent string) (bool, error) // Determines whether or not to send PI information to a bidder, or mask it out. // // If the consent string was nonsenical, the returned error will be an ErrorMalformedConsent. PersonalInfoAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, consent string) (bool, error) }
func NewPermissions ¶
func NewPermissions(ctx context.Context, cfg config.GDPR, vendorIDs map[openrtb_ext.BidderName]uint16, client *http.Client) Permissions
NewPermissions gets an instance of the Permissions for use elsewhere in the project.
Click to show internal directories.
Click to hide internal directories.