config

package
v4.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RulesEngineSchemaFile = "rules-engine-schema.json"
View Source
const RulesEngineSchemaFilePath = "modules/prebid/rulesengine/config/" + RulesEngineSchemaFile

Variables

This section is empty.

Functions

func CreateSchemaValidator

func CreateSchemaValidator(jsonSchemaFile string) (*gojsonschema.Schema, error)

Types

type ModelGroup

type ModelGroup struct {
	Weight       int
	AnalyticsKey string
	Version      string

	Schema  []Schema `json:"schema,omitempty"`
	Rules   []Rule   `json:"rules,omitempty"`
	Default []Result `json:"default,omitempty"`
}

type PbRulesEngine

type PbRulesEngine struct {
	Enabled                       bool           `json:"enabled,omitempty"`
	GenerateRulesFromBidderConfig bool           `json:"generate_rules_from_bidderconfig,omitempty"`
	SetDefinitions                SetDefinitions `json:"set_definitions,omitempty"`
	Timestamp                     string         `json:"timestamp,omitempty"`
	RuleSets                      []RuleSet      `json:"rulesets,omitempty"`
}

func NewConfig

func NewConfig(jsonCfg json.RawMessage, validator *gojsonschema.Schema) (*PbRulesEngine, error)

type Result

type Result struct {
	Func string          `json:"function,omitempty"`
	Args json.RawMessage `json:"args,omitempty"`
}

type ResultFuncParams

type ResultFuncParams struct {
	Bidders        []string `json:"bidders,omitempty"`
	SeatNonBid     int      `json:"seatnonbid,omitempty"`
	AnalyticsValue string   `json:"analyticsvalue,omitempty"`
	IfSyncedId     bool     `json:"ifsyncedid,omitempty"`
}

ResultFuncParams is a struct that holds parameters for result functions and is used in ExcludeBidders and IncludeBidders.

type Rule

type Rule struct {
	Conditions []string `json:"conditions,omitempty"`
	Results    []Result `json:"results,omitempty"`
}

type RuleSet

type RuleSet struct {
	Stage       hooks.Stage  `json:"stage,omitempty"`
	Name        string       `json:"name,omitempty"`
	Version     string       `json:"version,omitempty"`
	ModelGroups []ModelGroup `json:"modelgroups,omitempty"`
}

type Schema

type Schema struct {
	Func string          `json:"function,omitempty"`
	Args json.RawMessage `json:"args,omitempty"`
}

type SetDefinitions

type SetDefinitions struct {
	CountryGroups map[string][]string `json:"country_groups,omitempty"`
}

Jump to

Keyboard shortcuts

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