account

package
v0.227.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertGDPREnforcePurposeFields added in v0.226.0

func ConvertGDPREnforcePurposeFields(config []byte) (newConfig []byte, err error)

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) (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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL