metrics

package
v0.192.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 18

Documentation

Index

Constants

View Source
const PublisherUnknown = "unknown"

PublisherUnknown : Default value for Labels.PubID

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterBid

type AdapterBid string

AdapterBid : Whether or not the adapter returned bids

const (
	AdapterBidPresent AdapterBid = "bid"
	AdapterBidNone    AdapterBid = "nobid"
)

Adapter bid response status.

func AdapterBids

func AdapterBids() []AdapterBid

type AdapterError

type AdapterError string

AdapterError : Errors which may have occurred during the adapter's execution

const (
	AdapterErrorBadInput            AdapterError = "badinput"
	AdapterErrorBadServerResponse   AdapterError = "badserverresponse"
	AdapterErrorTimeout             AdapterError = "timeout"
	AdapterErrorFailedToRequestBids AdapterError = "failedtorequestbid"
	AdapterErrorUnknown             AdapterError = "unknown_error"
)

Adapter execution status

func AdapterErrors

func AdapterErrors() []AdapterError

type AdapterLabels

type AdapterLabels struct {
	Source        DemandSource
	RType         RequestType
	Adapter       openrtb_ext.BidderName
	PubID         string // exchange specific ID, so we cannot compile in values
	CookieFlag    CookieFlag
	AdapterBids   AdapterBid
	AdapterErrors map[AdapterError]struct{}
}

AdapterLabels defines the labels that can be attached to the adapter metrics.

type AdapterMetrics

type AdapterMetrics struct {
	NoCookieMeter      metrics.Meter
	ErrorMeters        map[AdapterError]metrics.Meter
	NoBidMeter         metrics.Meter
	GotBidsMeter       metrics.Meter
	RequestTimer       metrics.Timer
	PriceHistogram     metrics.Histogram
	BidsReceivedMeter  metrics.Meter
	PanicMeter         metrics.Meter
	MarkupMetrics      map[openrtb_ext.BidType]*MarkupDeliveryMetrics
	ConnCreated        metrics.Counter
	ConnReused         metrics.Counter
	ConnWaitTime       metrics.Timer
	GDPRRequestBlocked metrics.Meter
}

AdapterMetrics houses the metrics for a particular adapter

type CacheResult

type CacheResult string

CacheResult : Cache hit/miss

const (
	// CacheHit represents a cache hit i.e the key was found in cache
	CacheHit CacheResult = "hit"
	// CacheMiss represents a cache miss i.e that key wasn't found in cache
	// and had to be fetched from the backend
	CacheMiss CacheResult = "miss"
)

func CacheResults

func CacheResults() []CacheResult

CacheResults returns possible cache results i.e. cache hit or miss

type CookieFlag

type CookieFlag string

CookieFlag : User ID cookie exists flag

const (
	CookieFlagYes     CookieFlag = "exists"
	CookieFlagNo      CookieFlag = "no"
	CookieFlagUnknown CookieFlag = "unknown"
)

Cookie flag

func CookieTypes

func CookieTypes() []CookieFlag

type CookieSyncStatus added in v0.173.0

type CookieSyncStatus string

CookieSyncStatus is a status code resulting from a call to the /cookie_sync endpoint.

const (
	CookieSyncOK                    CookieSyncStatus = "ok"
	CookieSyncBadRequest            CookieSyncStatus = "bad_request"
	CookieSyncOptOut                CookieSyncStatus = "opt_out"
	CookieSyncGDPRHostCookieBlocked CookieSyncStatus = "gdpr_blocked_host_cookie"
)

func CookieSyncStatuses added in v0.173.0

func CookieSyncStatuses() []CookieSyncStatus

CookieSyncStatuses returns possible cookie sync statuses.

type DemandSource

type DemandSource string

DemandSource : Demand source enumeration

const (
	DemandWeb     DemandSource = "web"
	DemandApp     DemandSource = "app"
	DemandUnknown DemandSource = "unknown"
)

The demand sources

func DemandTypes

func DemandTypes() []DemandSource

type ImpLabels

type ImpLabels struct {
	BannerImps bool
	VideoImps  bool
	AudioImps  bool
	NativeImps bool
}

ImpLabels defines metric labels describing the impression type.

type ImpMediaType

type ImpMediaType string

ImpMediaType : Media type described in the "imp" JSON object TODO is this still needed?

const (
	ImpTypeBanner ImpMediaType = "banner"
	ImpTypeVideo  ImpMediaType = "video"
	ImpTypeAudio  ImpMediaType = "audio"
	ImpTypeNative ImpMediaType = "native"
)

The media types described in the "imp" json objects

func ImpTypes

func ImpTypes() []ImpMediaType

type Labels

type Labels struct {
	Source        DemandSource
	RType         RequestType
	PubID         string // exchange specific ID, so we cannot compile in values
	CookieFlag    CookieFlag
	RequestStatus RequestStatus
}

Labels defines the labels that can be attached to the metrics.

type MarkupDeliveryMetrics

type MarkupDeliveryMetrics struct {
	AdmMeter  metrics.Meter
	NurlMeter metrics.Meter
}

type Metrics

type Metrics struct {
	MetricsRegistry                metrics.Registry
	ConnectionCounter              metrics.Counter
	ConnectionAcceptErrorMeter     metrics.Meter
	ConnectionCloseErrorMeter      metrics.Meter
	ImpMeter                       metrics.Meter
	AppRequestMeter                metrics.Meter
	NoCookieMeter                  metrics.Meter
	RequestTimer                   metrics.Timer
	RequestsQueueTimer             map[RequestType]map[bool]metrics.Timer
	PrebidCacheRequestTimerSuccess metrics.Timer
	PrebidCacheRequestTimerError   metrics.Timer
	StoredDataFetchTimer           map[StoredDataType]map[StoredDataFetchType]metrics.Timer
	StoredDataErrorMeter           map[StoredDataType]map[StoredDataError]metrics.Meter
	StoredReqCacheMeter            map[CacheResult]metrics.Meter
	StoredImpCacheMeter            map[CacheResult]metrics.Meter
	AccountCacheMeter              map[CacheResult]metrics.Meter
	DNSLookupTimer                 metrics.Timer
	TLSHandshakeTimer              metrics.Timer

	// Metrics for OpenRTB requests specifically. So we can track what % of RequestsMeter are OpenRTB
	// and know when legacy requests have been abandoned.
	RequestStatuses       map[RequestType]map[RequestStatus]metrics.Meter
	AmpNoCookieMeter      metrics.Meter
	CookieSyncMeter       metrics.Meter
	CookieSyncStatusMeter map[CookieSyncStatus]metrics.Meter
	SyncerRequestsMeter   map[string]map[SyncerCookieSyncStatus]metrics.Meter
	SetUidMeter           metrics.Meter
	SetUidStatusMeter     map[SetUidStatus]metrics.Meter
	SyncerSetsMeter       map[string]map[SyncerSetUidStatus]metrics.Meter

	// Media types found in the "imp" JSON object
	ImpsTypeBanner metrics.Meter
	ImpsTypeVideo  metrics.Meter
	ImpsTypeAudio  metrics.Meter
	ImpsTypeNative metrics.Meter

	// Notification timeout metrics
	TimeoutNotificationSuccess metrics.Meter
	TimeoutNotificationFailure metrics.Meter

	// TCF adaption metrics
	PrivacyCCPARequest       metrics.Meter
	PrivacyCCPARequestOptOut metrics.Meter
	PrivacyCOPPARequest      metrics.Meter
	PrivacyLMTRequest        metrics.Meter
	PrivacyTCFRequestVersion map[TCFVersionValue]metrics.Meter

	AdapterMetrics map[openrtb_ext.BidderName]*AdapterMetrics

	// Will hold boolean values to help us disable metric collection if needed
	MetricsDisabled config.DisabledMetrics
	// contains filtered or unexported fields
}

Metrics is the legacy Metrics object (go-metrics) expanded to also satisfy the MetricsEngine interface

func NewBlankMetrics

func NewBlankMetrics(registry metrics.Registry, exchanges []openrtb_ext.BidderName, disabledMetrics config.DisabledMetrics) *Metrics

NewBlankMetrics creates a new Metrics object with all blank metrics object. This may also be useful for testing routines to ensure that no metrics are written anywhere.

This will be useful when removing endpoints, we can just run will the blank metrics function rather than loading legacy metrics that never get filled. This will also eventually let us configure metrics, such as setting a limited set of metrics for a production instance, and then expanding again when we need more debugging.

func NewMetrics

func NewMetrics(registry metrics.Registry, exchanges []openrtb_ext.BidderName, disableAccountMetrics config.DisabledMetrics, syncerKeys []string) *Metrics

NewMetrics creates a new Metrics object with needed metrics defined. In time we may develop to the point where Metrics contains all the metrics we might want to record, and then we build the actual metrics object to contain only the metrics we are interested in. This would allow for debug mode metrics. The code would allways try to record the metrics, but effectively noop if we are using a blank meter/timer.

func (*Metrics) RecordAccountCacheResult

func (me *Metrics) RecordAccountCacheResult(cacheResult CacheResult, inc int)

RecordAccountCacheResult implements a part of the MetricsEngine interface. Records the cache hits and misses when looking up accounts.

func (*Metrics) RecordAdapterBidReceived

func (me *Metrics) RecordAdapterBidReceived(labels AdapterLabels, bidType openrtb_ext.BidType, hasAdm bool)

RecordAdapterBidReceived implements a part of the MetricsEngine interface. This tracks how many bids from each Bidder use `adm` vs. `nurl.

func (*Metrics) RecordAdapterConnections

func (me *Metrics) RecordAdapterConnections(adapterName openrtb_ext.BidderName,
	connWasReused bool,
	connWaitTime time.Duration)

Keeps track of created and reused connections to adapter bidders and the time from the connection request, to the connection creation, or reuse from the pool across all engines

func (*Metrics) RecordAdapterGDPRRequestBlocked

func (me *Metrics) RecordAdapterGDPRRequestBlocked(adapterName openrtb_ext.BidderName)

func (*Metrics) RecordAdapterPanic

func (me *Metrics) RecordAdapterPanic(labels AdapterLabels)

RecordAdapterPanic implements a part of the MetricsEngine interface

func (*Metrics) RecordAdapterPrice

func (me *Metrics) RecordAdapterPrice(labels AdapterLabels, cpm float64)

RecordAdapterPrice implements a part of the MetricsEngine interface. Generates a histogram of winning bid prices

func (*Metrics) RecordAdapterRequest

func (me *Metrics) RecordAdapterRequest(labels AdapterLabels)

RecordAdapterRequest implements a part of the MetricsEngine interface

func (*Metrics) RecordAdapterTime

func (me *Metrics) RecordAdapterTime(labels AdapterLabels, length time.Duration)

RecordAdapterTime implements a part of the MetricsEngine interface. Records the adapter response time

func (*Metrics) RecordConnectionAccept

func (me *Metrics) RecordConnectionAccept(success bool)

func (*Metrics) RecordConnectionClose

func (me *Metrics) RecordConnectionClose(success bool)

func (*Metrics) RecordCookieSync

func (me *Metrics) RecordCookieSync(status CookieSyncStatus)

RecordCookieSync implements a part of the MetricsEngine interface. Records a cookie sync request

func (*Metrics) RecordDNSTime

func (me *Metrics) RecordDNSTime(dnsLookupTime time.Duration)

func (*Metrics) RecordImps

func (me *Metrics) RecordImps(labels ImpLabels)

func (*Metrics) RecordPrebidCacheRequestTime

func (me *Metrics) RecordPrebidCacheRequestTime(success bool, length time.Duration)

RecordPrebidCacheRequestTime implements a part of the MetricsEngine interface. Records the amount of time taken to store the auction result in Prebid Cache.

func (*Metrics) RecordRequest

func (me *Metrics) RecordRequest(labels Labels)

RecordRequest implements a part of the MetricsEngine interface

func (*Metrics) RecordRequestPrivacy

func (me *Metrics) RecordRequestPrivacy(privacy PrivacyLabels)

func (*Metrics) RecordRequestQueueTime

func (me *Metrics) RecordRequestQueueTime(success bool, requestType RequestType, length time.Duration)

func (*Metrics) RecordRequestTime

func (me *Metrics) RecordRequestTime(labels Labels, length time.Duration)

RecordRequestTime implements a part of the MetricsEngine interface. The calling code is responsible for determining the call duration.

func (*Metrics) RecordSetUid added in v0.173.0

func (me *Metrics) RecordSetUid(status SetUidStatus)

RecordSetUid implements a part of the MetricsEngine interface. Records a set uid sync request

func (*Metrics) RecordStoredDataError

func (me *Metrics) RecordStoredDataError(labels StoredDataLabels)

RecordStoredDataError implements a part of the MetricsEngine interface

func (*Metrics) RecordStoredDataFetchTime

func (me *Metrics) RecordStoredDataFetchTime(labels StoredDataLabels, length time.Duration)

RecordStoredDataFetchTime implements a part of the MetricsEngine interface

func (*Metrics) RecordStoredImpCacheResult

func (me *Metrics) RecordStoredImpCacheResult(cacheResult CacheResult, inc int)

RecordStoredImpCacheResult implements a part of the MetricsEngine interface. Records the cache hits and misses when looking up stored impressions.

func (*Metrics) RecordStoredReqCacheResult

func (me *Metrics) RecordStoredReqCacheResult(cacheResult CacheResult, inc int)

RecordStoredReqCacheResult implements a part of the MetricsEngine interface. Records the cache hits and misses when looking up stored requests

func (*Metrics) RecordSyncerRequest added in v0.173.0

func (me *Metrics) RecordSyncerRequest(key string, status SyncerCookieSyncStatus)

RecordSyncerRequest implements a part of the MetricsEngine interface. Records a cookie sync syncer request and status

func (*Metrics) RecordSyncerSet added in v0.173.0

func (me *Metrics) RecordSyncerSet(key string, status SyncerSetUidStatus)

RecordSyncerSet implements a part of the MetricsEngine interface. Records a set uid sync request and status

func (*Metrics) RecordTLSHandshakeTime

func (me *Metrics) RecordTLSHandshakeTime(tlsHandshakeTime time.Duration)

func (*Metrics) RecordTimeoutNotice

func (me *Metrics) RecordTimeoutNotice(success bool)

type MetricsEngine

type MetricsEngine interface {
	RecordConnectionAccept(success bool)
	RecordConnectionClose(success bool)
	RecordRequest(labels Labels)                           // ignores adapter. only statusOk and statusErr fom status
	RecordImps(labels ImpLabels)                           // RecordImps across openRTB2 engines that support the 'Native' Imp Type
	RecordRequestTime(labels Labels, length time.Duration) // ignores adapter. only statusOk and statusErr fom status
	RecordAdapterRequest(labels AdapterLabels)
	RecordAdapterConnections(adapterName openrtb_ext.BidderName, connWasReused bool, connWaitTime time.Duration)
	RecordDNSTime(dnsLookupTime time.Duration)
	RecordTLSHandshakeTime(tlsHandshakeTime time.Duration)
	RecordAdapterPanic(labels AdapterLabels)
	// This records whether or not a bid of a particular type uses `adm` or `nurl`.
	// Since the legacy endpoints don't have a bid type, it can only count bids from OpenRTB and AMP.
	RecordAdapterBidReceived(labels AdapterLabels, bidType openrtb_ext.BidType, hasAdm bool)
	RecordAdapterPrice(labels AdapterLabels, cpm float64)
	RecordAdapterTime(labels AdapterLabels, length time.Duration)
	RecordCookieSync(status CookieSyncStatus)
	RecordSyncerRequest(key string, status SyncerCookieSyncStatus)
	RecordSetUid(status SetUidStatus)
	RecordSyncerSet(key string, status SyncerSetUidStatus)
	RecordStoredReqCacheResult(cacheResult CacheResult, inc int)
	RecordStoredImpCacheResult(cacheResult CacheResult, inc int)
	RecordAccountCacheResult(cacheResult CacheResult, inc int)
	RecordStoredDataFetchTime(labels StoredDataLabels, length time.Duration)
	RecordStoredDataError(labels StoredDataLabels)
	RecordPrebidCacheRequestTime(success bool, length time.Duration)
	RecordRequestQueueTime(success bool, requestType RequestType, length time.Duration)
	RecordTimeoutNotice(sucess bool)
	RecordRequestPrivacy(privacy PrivacyLabels)
	RecordAdapterGDPRRequestBlocked(adapterName openrtb_ext.BidderName)
}

MetricsEngine is a generic interface to record PBS metrics into the desired backend The first three metrics function fire off once per incoming request, so total metrics will equal the total number of incoming requests. The remaining 5 fire off per outgoing request to a bidder adapter, so will record a number of hits per incoming request. The two groups should be consistent within themselves, but comparing numbers between groups is generally not useful.

type MetricsEngineMock

type MetricsEngineMock struct {
	mock.Mock
}

MetricsEngineMock is mock for the MetricsEngine interface

func (*MetricsEngineMock) RecordAccountCacheResult

func (me *MetricsEngineMock) RecordAccountCacheResult(cacheResult CacheResult, inc int)

RecordAccountCacheResult mock

func (*MetricsEngineMock) RecordAdapterBidReceived

func (me *MetricsEngineMock) RecordAdapterBidReceived(labels AdapterLabels, bidType openrtb_ext.BidType, hasAdm bool)

RecordAdapterBidReceived mock

func (*MetricsEngineMock) RecordAdapterConnections

func (me *MetricsEngineMock) RecordAdapterConnections(bidderName openrtb_ext.BidderName, connWasReused bool, connWaitTime time.Duration)

RecordAdapterConnections mock

func (*MetricsEngineMock) RecordAdapterGDPRRequestBlocked

func (me *MetricsEngineMock) RecordAdapterGDPRRequestBlocked(adapterName openrtb_ext.BidderName)

RecordAdapterGDPRRequestBlocked mock

func (*MetricsEngineMock) RecordAdapterPanic

func (me *MetricsEngineMock) RecordAdapterPanic(labels AdapterLabels)

RecordAdapterPanic mock

func (*MetricsEngineMock) RecordAdapterPrice

func (me *MetricsEngineMock) RecordAdapterPrice(labels AdapterLabels, cpm float64)

RecordAdapterPrice mock

func (*MetricsEngineMock) RecordAdapterRequest

func (me *MetricsEngineMock) RecordAdapterRequest(labels AdapterLabels)

RecordAdapterRequest mock

func (*MetricsEngineMock) RecordAdapterTime

func (me *MetricsEngineMock) RecordAdapterTime(labels AdapterLabels, length time.Duration)

RecordAdapterTime mock

func (*MetricsEngineMock) RecordConnectionAccept

func (me *MetricsEngineMock) RecordConnectionAccept(success bool)

RecordConnectionAccept mock

func (*MetricsEngineMock) RecordConnectionClose

func (me *MetricsEngineMock) RecordConnectionClose(success bool)

RecordConnectionClose mock

func (*MetricsEngineMock) RecordCookieSync

func (me *MetricsEngineMock) RecordCookieSync(status CookieSyncStatus)

RecordCookieSync mock

func (*MetricsEngineMock) RecordDNSTime

func (me *MetricsEngineMock) RecordDNSTime(dnsLookupTime time.Duration)

RecordDNSTime mock

func (*MetricsEngineMock) RecordImps

func (me *MetricsEngineMock) RecordImps(labels ImpLabels)

RecordImps mock

func (*MetricsEngineMock) RecordPrebidCacheRequestTime

func (me *MetricsEngineMock) RecordPrebidCacheRequestTime(success bool, length time.Duration)

RecordPrebidCacheRequestTime mock

func (*MetricsEngineMock) RecordRequest

func (me *MetricsEngineMock) RecordRequest(labels Labels)

RecordRequest mock

func (*MetricsEngineMock) RecordRequestPrivacy

func (me *MetricsEngineMock) RecordRequestPrivacy(privacy PrivacyLabels)

RecordRequestPrivacy mock

func (*MetricsEngineMock) RecordRequestQueueTime

func (me *MetricsEngineMock) RecordRequestQueueTime(success bool, requestType RequestType, length time.Duration)

RecordRequestQueueTime mock

func (*MetricsEngineMock) RecordRequestTime

func (me *MetricsEngineMock) RecordRequestTime(labels Labels, length time.Duration)

RecordRequestTime mock

func (*MetricsEngineMock) RecordSetUid added in v0.173.0

func (me *MetricsEngineMock) RecordSetUid(status SetUidStatus)

RecordSetUid mock

func (*MetricsEngineMock) RecordStoredDataError

func (me *MetricsEngineMock) RecordStoredDataError(labels StoredDataLabels)

RecordStoredDataError mock

func (*MetricsEngineMock) RecordStoredDataFetchTime

func (me *MetricsEngineMock) RecordStoredDataFetchTime(labels StoredDataLabels, length time.Duration)

RecordStoredDataFetchTime mock

func (*MetricsEngineMock) RecordStoredImpCacheResult

func (me *MetricsEngineMock) RecordStoredImpCacheResult(cacheResult CacheResult, inc int)

RecordStoredImpCacheResult mock

func (*MetricsEngineMock) RecordStoredReqCacheResult

func (me *MetricsEngineMock) RecordStoredReqCacheResult(cacheResult CacheResult, inc int)

RecordStoredReqCacheResult mock

func (*MetricsEngineMock) RecordSyncerRequest added in v0.173.0

func (me *MetricsEngineMock) RecordSyncerRequest(key string, status SyncerCookieSyncStatus)

RecordSyncerRequest mock

func (*MetricsEngineMock) RecordSyncerSet added in v0.173.0

func (me *MetricsEngineMock) RecordSyncerSet(key string, status SyncerSetUidStatus)

RecordSyncerSet mock

func (*MetricsEngineMock) RecordTLSHandshakeTime

func (me *MetricsEngineMock) RecordTLSHandshakeTime(tlsHandshakeTime time.Duration)

func (*MetricsEngineMock) RecordTimeoutNotice

func (me *MetricsEngineMock) RecordTimeoutNotice(success bool)

RecordTimeoutNotice mock

type PrivacyLabels

type PrivacyLabels struct {
	CCPAEnforced   bool
	CCPAProvided   bool
	COPPAEnforced  bool
	GDPREnforced   bool
	GDPRTCFVersion TCFVersionValue
	LMTEnforced    bool
}

PrivacyLabels defines metrics describing the result of privacy enforcement.

type RequestLabels

type RequestLabels struct {
	RequestStatus RequestStatus
}

RequestLabels defines metric labels describing the result of a network request.

type RequestStatus

type RequestStatus string

RequestStatus : The request return status

const (
	RequestStatusOK           RequestStatus = "ok"
	RequestStatusBadInput     RequestStatus = "badinput"
	RequestStatusErr          RequestStatus = "err"
	RequestStatusNetworkErr   RequestStatus = "networkerr"
	RequestStatusBlacklisted  RequestStatus = "blacklistedacctorapp"
	RequestStatusQueueTimeout RequestStatus = "queuetimeout"
)

Request/return status

func RequestStatuses

func RequestStatuses() []RequestStatus

type RequestType

type RequestType string

RequestType : Request type enumeration

const (
	ReqTypeLegacy   RequestType = "legacy"
	ReqTypeORTB2Web RequestType = "openrtb2-web"
	ReqTypeORTB2App RequestType = "openrtb2-app"
	ReqTypeAMP      RequestType = "amp"
	ReqTypeVideo    RequestType = "video"
)

The request types (endpoints)

func RequestTypes

func RequestTypes() []RequestType

type SetUidStatus added in v0.173.0

type SetUidStatus string

SetUidStatus is a status code resulting from a call to the /setuid endpoint.

const (
	SetUidOK                    SetUidStatus = "ok"
	SetUidBadRequest            SetUidStatus = "bad_request"
	SetUidOptOut                SetUidStatus = "opt_out"
	SetUidGDPRHostCookieBlocked SetUidStatus = "gdpr_blocked_host_cookie"
	SetUidSyncerUnknown         SetUidStatus = "syncer_unknown"
)

/setuid action labels

func SetUidStatuses added in v0.173.0

func SetUidStatuses() []SetUidStatus

SetUidStatuses returns possible setuid statuses.

type StoredDataError

type StoredDataError string
const (
	StoredDataErrorNetwork   StoredDataError = "network"
	StoredDataErrorUndefined StoredDataError = "undefined"
)

func StoredDataErrors

func StoredDataErrors() []StoredDataError

type StoredDataFetchType

type StoredDataFetchType string
const (
	FetchAll   StoredDataFetchType = "all"
	FetchDelta StoredDataFetchType = "delta"
)

func StoredDataFetchTypes

func StoredDataFetchTypes() []StoredDataFetchType

type StoredDataLabels

type StoredDataLabels struct {
	DataType      StoredDataType
	DataFetchType StoredDataFetchType
	Error         StoredDataError
}

type StoredDataType

type StoredDataType string
const (
	AccountDataType  StoredDataType = "account"
	AMPDataType      StoredDataType = "amp"
	CategoryDataType StoredDataType = "category"
	RequestDataType  StoredDataType = "request"
	VideoDataType    StoredDataType = "video"
)

func StoredDataTypes

func StoredDataTypes() []StoredDataType

type SyncerCookieSyncStatus added in v0.173.0

type SyncerCookieSyncStatus string

SyncerCookieSyncStatus is a status code from an invocation of a syncer resulting from a call to the /cookie_sync endpoint.

const (
	SyncerCookieSyncOK               SyncerCookieSyncStatus = "ok"
	SyncerCookieSyncPrivacyBlocked   SyncerCookieSyncStatus = "privacy_blocked"
	SyncerCookieSyncAlreadySynced    SyncerCookieSyncStatus = "already_synced"
	SyncerCookieSyncTypeNotSupported SyncerCookieSyncStatus = "type_not_supported"
)

func SyncerRequestStatuses added in v0.173.0

func SyncerRequestStatuses() []SyncerCookieSyncStatus

SyncerRequestStatuses returns possible syncer statuses.

type SyncerSetUidStatus added in v0.173.0

type SyncerSetUidStatus string

SyncerSetUidStatus is a status code from an invocation of a syncer resulting from a call to the /setuid endpoint.

const (
	SyncerSetUidOK      SyncerSetUidStatus = "ok"
	SyncerSetUidCleared SyncerSetUidStatus = "cleared"
)

func SyncerSetUidStatuses added in v0.173.0

func SyncerSetUidStatuses() []SyncerSetUidStatus

SyncerSetUidStatuses returns possible syncer set statuses.

type TCFVersionValue

type TCFVersionValue string

TCFVersionValue : The possible values for TCF versions

const (
	TCFVersionErr TCFVersionValue = "err"
	TCFVersionV2  TCFVersionValue = "v2"
)

func TCFVersionToValue

func TCFVersionToValue(version int) TCFVersionValue

TCFVersionToValue takes an integer TCF version and returns the corresponding TCFVersionValue

func TCFVersions

func TCFVersions() []TCFVersionValue

TCFVersions returns the possible values for the TCF version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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