handle

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decision

func Decision(handleRequest *Request, tracker *common.Tracker) error

Decision returns a DecisionResponse from the DecisionRequest and the campaign information

Types

type Request

type Request struct {
	DecisionRequest    *decision_request.DecisionRequest
	DecisionContext    *connectors.DecisionContext
	DecisionResponse   *decision_response.DecisionResponse
	FullVisitorContext *targeting.Context
	Environment        *models.Environment
	CampaignID         string
	Mode               string
	Extras             []string
	ExposeAllKeys      bool
	SendContextEvent   bool
	Time               time.Time
	Logger             *logger.Logger
}

Request represents the infos of the requests needed for the decision API

func NewRequestFromHTTP

func NewRequestFromHTTP(req *http.Request) Request

func (Request) HasExtra

func (r Request) HasExtra(extra string) bool

Jump to

Keyboard shortcuts

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