dsa

package
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Required               int8 = 2 // bid responses without DSA object will not be accepted
	RequiredOnlinePlatform int8 = 3 // bid responses without DSA object will not be accepted, Publisher is Online Platform
)

Required values representing whether a DSA object is required

View Source
const (
	PubRenderCannotRender int8 = 0 // publisher can't render
	PubRenderWillRender   int8 = 2 // publisher will render
)

PubRender values representing publisher rendering intentions

View Source
const (
	AdRenderWillRender int8 = 1 // buyer/advertiser will render
)

AdRender values representing buyer/advertiser rendering intentions

Variables

View Source
var (
	ErrDsaMissing        = errors.New("DSA object missing when required")
	ErrBehalfTooLong     = errors.New("DSA behalf exceeds limit of 100 chars")
	ErrPaidTooLong       = errors.New("DSA paid exceeds limit of 100 chars")
	ErrNeitherWillRender = errors.New("DSA publisher and buyer both signal will not render")
	ErrBothWillRender    = errors.New("DSA publisher and buyer both signal will render")
)

Functions

func Validate

func Validate(req *openrtb_ext.RequestWrapper, bid *entities.PbsOrtbBid) error

Validate determines whether a given bid is valid from a DSA perspective. A bid is considered valid unless the bid request indicates that a DSA object is required in bid responses and the object happens to be missing from the specified bid, or if the bid DSA object contents are invalid

Types

type Writer added in v2.15.0

type Writer struct {
	Config      *config.AccountDSA
	GDPRInScope bool
}

Writer is used to write the default DSA to the request (req.regs.ext.dsa)

func (Writer) Write added in v2.15.0

func (dw Writer) Write(req *openrtb_ext.RequestWrapper) error

Write sets the default DSA object on the request at regs.ext.dsa if it is defined in the account config and it is not already present on the request

Jump to

Keyboard shortcuts

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