-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conditionally configure fiftyonedegrees.
- Loading branch information
Showing
4 changed files
with
24 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
package modules | ||
|
||
import ( | ||
fiftyonedegreesDevicedetection "github.com/prebid/prebid-server/v3/modules/fiftyonedegrees/devicedetection" | ||
prebidOrtb2blocking "github.com/prebid/prebid-server/v3/modules/prebid/ortb2blocking" | ||
) | ||
|
||
// builders returns mapping between module name and its builder | ||
// vendor and module names are chosen based on the module directory name | ||
func builders() ModuleBuilders { | ||
return ModuleBuilders{ | ||
"fiftyonedegrees": { | ||
"devicedetection": fiftyonedegreesDevicedetection.Builder, | ||
}, | ||
ret := ModuleBuilders{ | ||
"prebid": { | ||
"ortb2blocking": prebidOrtb2blocking.Builder, | ||
}, | ||
} | ||
addFiftyonedegreesDevicedetection(ret) | ||
return ret | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build cgo | ||
|
||
package modules | ||
|
||
import ( | ||
fiftyonedegreesDevicedetection "github.com/prebid/prebid-server/v3/modules/fiftyonedegrees/devicedetection" | ||
) | ||
|
||
func addFiftyonedegreesDevicedetection(b ModuleBuilders) { | ||
if b["fiftyonedegrees"] == nil { | ||
b["fiftyonedegrees"] = make(map[string]ModuleBuilderFn) | ||
} | ||
b["fiftyonedegrees"]["devicedetection"] = fiftyonedegreesDevicedetection.Builder | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build !cgo | ||
|
||
package modules | ||
|
||
func addFiftyonedegreesDevicedetection(b ModuleBuilders) { | ||
// Do nothing - fiftyonedegrees module is not supported without cgo | ||
} |