Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TCF2Enforcements = map[string]config.TCF2EnforcementAlgo{ config.TCF2EnforceAlgoBasic: config.TCF2BasicEnforcement, config.TCF2EnforceAlgoFull: config.TCF2FullEnforcement, }
TCF2Enforcements maps enforcement algo string values to their integer representation and is used to limit string compares
Functions ¶
func ConvertGDPREnforcePurposeFields ¶ added in v0.226.0
func ConvertGDPREnforcePurposeFields(config []byte) (newConfig []byte, err error, deprecatedPurposeFields []string)
ConvertGDPREnforcePurposeFields is responsible for ensuring account GDPR config backwards compatibility given the recent type change of gdpr.purpose{1-10}.enforce_purpose from a string to a bool. This function iterates over each GDPR purpose config and sets enforce_purpose and enforce_algo to the appropriate bool and string values respectively if enforce_purpose is a string and enforce_algo is not set
func GetAccount ¶
func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_requests.AccountFetcher, accountID string, me metrics.MetricsEngine) (account *config.Account, errs []error)
GetAccount looks up the config.Account object referenced by the given accountID, with access rules applied
Types ¶
type PatchAccount ¶ added in v0.226.0
type PatchAccount struct {
GDPR map[string]*PatchAccountGDPRPurpose `json:"gdpr"`
}
PatchAccount represents the GDPR portion of a publisher account configuration that can be mutated for backwards compatibility reasons
type PatchAccountGDPRPurpose ¶ added in v0.226.0
type PatchAccountGDPRPurpose struct { EnforceAlgo string `json:"enforce_algo,omitempty"` EnforcePurpose *bool `json:"enforce_purpose,omitempty"` }
PatchAccountGDPRPurpose represents account-specific GDPR purpose configuration data that can be mutated for backwards compatibility reasons