-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4492a17
commit 324d293
Showing
4 changed files
with
66 additions
and
0 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
File renamed without changes.
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,26 @@ | ||
package config | ||
|
||
type AllowActivities struct { | ||
SyncUser Activity `mapstructure:"syncUser" json:"syncUser"` | ||
FetchBids Activity `mapstructure:"fetchBids" json:"fetchBids"` | ||
EnrichUserFPD Activity `mapstructure:"enrichUfpd" json:"enrichUfpd"` | ||
ReportAnalytics Activity `mapstructure:"reportAnalytics" json:"reportAnalytics"` | ||
TransmitUserFPD Activity `mapstructure:"transmitUfpd" json:"transmitUfpd"` | ||
TransmitPreciseGeo Activity `mapstructure:"transmitPreciseGeo" json:"transmitPreciseGeo"` | ||
TransmitUniqueRequestIds Activity `mapstructure:"transmitUniqueRequestIds" json:"transmitUniqueRequestIds"` | ||
} | ||
|
||
type Activity struct { | ||
Default *bool `mapstructure:"default" json:"default"` | ||
Rules []ActivityRule `mapstructure:"rules" json:"rules"` | ||
Allow bool `mapstructure:"allow" json:"allow"` | ||
} | ||
|
||
type ActivityRule struct { | ||
Condition ActivityCondition `mapstructure:"condition" json:"condition"` | ||
} | ||
|
||
type ActivityCondition struct { | ||
ComponentName []string `mapstructure:"componentName" json:"componentName"` | ||
ComponentType []string `mapstructure:"componentType" json:"componentType"` | ||
} |
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,35 @@ | ||
package privacy | ||
|
||
// Activity defines privileges which can be controlled directly by the publisher or via privacy policies. | ||
type Activity int | ||
|
||
const ( | ||
ActivitySyncUser Activity = iota + 1 | ||
ActivityFetchBids | ||
ActivityEnrichUserFPD | ||
ActivityReportAnalytics | ||
ActivityTransmitUserFPD | ||
ActivityTransmitPreciseGeo | ||
ActivityTransmitUniqueRequestIds | ||
) | ||
|
||
func (a Activity) String() string { | ||
switch a { | ||
case ActivitySyncUser: | ||
return "syncUser" | ||
case ActivityFetchBids: | ||
return "fetchBids" | ||
case ActivityEnrichUserFPD: | ||
return "enrichUfpd" | ||
case ActivityReportAnalytics: | ||
return "reportAnalytics" | ||
case ActivityTransmitUserFPD: | ||
return "transmitUfpd" | ||
case ActivityTransmitPreciseGeo: | ||
return "transmitPreciseGeo" | ||
case ActivityTransmitUniqueRequestIds: | ||
return "transmitUniqueRequestIds" | ||
} | ||
|
||
return "" | ||
} |