Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Refactor TCF 1/2 Vendor List Fetcher Tests (prebid#1441)
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxNode authored Sep 8, 2020
1 parent 66e0076 commit 1c8e9dd
Show file tree
Hide file tree
Showing 4 changed files with 851 additions and 413 deletions.
9 changes: 5 additions & 4 deletions gdpr/gdpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ type Permissions interface {
AMPException() bool
}

// Versions of the GDPR TCF technical specification.
const (
tCF1 uint8 = 1
tCF2 uint8 = 2
tcf1SpecVersion uint8 = 1
tcf2SpecVersion uint8 = 2
)

// NewPermissions gets an instance of the Permissions for use elsewhere in the project.
Expand All @@ -45,8 +46,8 @@ func NewPermissions(ctx context.Context, cfg config.GDPR, vendorIDs map[openrtb_
cfg: cfg,
vendorIDs: vendorIDs,
fetchVendorList: map[uint8]func(ctx context.Context, id uint16) (vendorlist.VendorList, error){
tCF1: newVendorListFetcher(ctx, cfg, client, vendorListURLMaker, tCF1),
tCF2: newVendorListFetcher(ctx, cfg, client, vendorListURLMaker, tCF2)},
tcf1SpecVersion: newVendorListFetcher(ctx, cfg, client, vendorListURLMaker, tcf1SpecVersion),
tcf2SpecVersion: newVendorListFetcher(ctx, cfg, client, vendorListURLMaker, tcf2SpecVersion)},
}
}

Expand Down
Loading

0 comments on commit 1c8e9dd

Please sign in to comment.