forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Account configurations (PBID-727,prebid#1402)
- Defines the Account object with per-publisher settings - Adds a cfg.DefaultAccount for global settings that are overrideable per publisher - Expands account validation to require a valid account not just any non-empty value - Makes the resolved account object available to auction and analytics - Cache TTL can now be controlled at account level - Uses fetcher framework to retrieve accounts from individual <id>.json files or HTTP API (database to be added later) Example configuration for accounts stored in `stored_requests/data/by_id/accounts/<id>.json` ```yaml accounts: filesystem: enabled: true directorypath: "./stored_requests/data/by_id" ```
- Loading branch information
Showing
24 changed files
with
314 additions
and
51 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
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 @@ | ||
package config | ||
|
||
// Account represents a publisher account configuration | ||
type Account struct { | ||
ID string `mapstructure:"id" json:"id"` | ||
Disabled bool `mapstructure:"disabled" json:"disabled"` | ||
PriceGranularity string `mapstructure:"price_granularity" json:"price_granularity"` | ||
CacheTTL DefaultTTLs `mapstructure:"cache_ttl" json:"cache_ttl"` | ||
Analytics PubAnalytics `mapstructure:"analytics" json:"analytics"` | ||
} | ||
|
||
// PubAnalytics contains analytics settings for an account | ||
type PubAnalytics struct { | ||
} |
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
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
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
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
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
Oops, something went wrong.