ortb2blocking

package
v0.255.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

Overview

Prebid Server doesn't provide all services an SSP normally provides, including account configuration of blocked:

  • advertiser domains
  • advertiser categories
  • creative types
  • creative attributes
  • apps

This module allows Prebid Server host companies to better support adapters that require blocking config.

Maintainer contacts

Any suggestions or questions can be directed to example@site.com e-mail.

Or just open new issue or pull request in this repository.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder(_ json.RawMessage, _ moduledeps.ModuleDeps) (interface{}, error)

Types

type ActionOverride

type ActionOverride struct {
	Conditions Conditions `json:"conditions"`
	Override   Override   `json:"override"`
}

type Attributes

type Attributes struct {
	Badv  Badv  `json:"badv"`
	Bcat  Bcat  `json:"bcat"`
	Bapp  Bapp  `json:"bapp"`
	Btype Btype `json:"btype"`
	Battr Battr `json:"battr"`
}

type Badv

type Badv struct {
	ActionOverrides        BadvActionOverride `json:"action_overrides"`
	AllowedAdomainForDeals []string           `json:"allowed_adomain_for_deals"`
	BlockedAdomain         []string           `json:"blocked_adomain"`
	BlockUnknownAdomain    bool               `json:"block_unknown_adomain"`
	EnforceBlocks          bool               `json:"enforce_blocks"`
}

type BadvActionOverride

type BadvActionOverride struct {
	AllowedAdomainForDeals []ActionOverride `json:"allowed_adomain_for_deals"`
	BlockedAdomain         []ActionOverride `json:"blocked_adomain"`
	BlockUnknownAdomain    []ActionOverride `json:"block_unknown_adomain"`
	EnforceBlocks          []ActionOverride `json:"enforce_blocks"`
}

type Bapp

type Bapp struct {
	ActionOverrides    BappActionOverride `json:"action_overrides"`
	AllowedAppForDeals []string           `json:"allowed_app_for_deals"`
	BlockedApp         []string           `json:"blocked_app"`
	EnforceBlocks      bool               `json:"enforce_blocks"`
}

type BappActionOverride

type BappActionOverride struct {
	AllowedAppForDeals []ActionOverride `json:"allowed_app_for_deals"`
	BlockedApp         []ActionOverride `json:"blocked_app"`
	EnforceBlocks      []ActionOverride `json:"enforce_blocks"`
}

type Battr

type Battr struct {
	ActionOverrides           BattrActionOverride `json:"action_overrides"`
	AllowedBannerAttrForDeals []int               `json:"allowed_banner_attr_for_deals"`
	BlockedBannerAttr         []int               `json:"blocked_banner_attr"`
	EnforceBlocks             bool                `json:"enforce_blocks"`
}

type BattrActionOverride

type BattrActionOverride struct {
	AllowedBannerAttrForDeals []ActionOverride `json:"allowed_banner_attr_for_deals"`
	BlockedBannerAttr         []ActionOverride `json:"blocked_banner_attr"`
	EnforceBlocks             []ActionOverride `json:"enforce_blocks"`
}

type Bcat

type Bcat struct {
	ActionOverrides       BcatActionOverride      `json:"action_overrides"`
	AllowedAdvCatForDeals []string                `json:"allowed_adv_cat_for_deals"`
	BlockedAdvCat         []string                `json:"blocked_adv_cat"`
	BlockUnknownAdvCat    bool                    `json:"block_unknown_adv_cat"`
	CategoryTaxonomy      adcom1.CategoryTaxonomy `json:"category_taxonomy"`
	EnforceBlocks         bool                    `json:"enforce_blocks"`
}

type BcatActionOverride

type BcatActionOverride struct {
	AllowedAdvCatForDeals []ActionOverride `json:"allowed_adv_cat_for_deals"`
	BlockedAdvCat         []ActionOverride `json:"blocked_adv_cat"`
	BlockUnknownAdvCat    []ActionOverride `json:"block_unknown_adv_cat"`
	EnforceBlocks         []ActionOverride `json:"enforce_blocks"`
}

type Btype

type Btype struct {
	ActionOverrides   BtypeActionOverride `json:"action_overrides"`
	BlockedBannerType []int               `json:"blocked_banner_type"`
}

type BtypeActionOverride

type BtypeActionOverride struct {
	BlockedBannerType []ActionOverride `json:"blocked_banner_type"`
}

type Conditions

type Conditions struct {
	Bidders    []string `json:"bidders"`
	MediaTypes []string `json:"media_types"`
	DealIds    []string `json:"deal_ids"`
}

type Module

type Module struct{}

func (Module) HandleBidderRequestHook added in v0.239.0

HandleBidderRequestHook updates blocking fields on the openrtb2.BidRequest. Fields are updated only if request satisfies conditions provided by the module config.

func (Module) HandleRawBidderResponseHook added in v0.239.0

HandleRawBidderResponseHook rejects bids for a specific bidder if they fail the attribute check.

type Override

type Override struct {
	IsActive bool
	Ids      []int
	Names    []string
}

func (*Override) UnmarshalJSON

func (o *Override) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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