handlers

package
v0.0.0-...-dda1418 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2016 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExperiments

func CheckExperiments(experiments map[string][]string, uid string, cfg config.Config) map[string]string

func CheckFeatures

func CheckFeatures(features map[string]float32, uid string, cfg config.Config) map[string]bool

func ErrorHandler

func ErrorHandler(handler http.Handler) http.Handler

func ListExperiments

func ListExperiments(cfg ConfigFactory) func(http.ResponseWriter, *http.Request)

func ListFeatures

func ListFeatures(cfg ConfigFactory) func(http.ResponseWriter, *http.Request)

func ListGroups

func ListGroups(cfg ConfigFactory) func(http.ResponseWriter, *http.Request)

func Participate

func Participate(config ConfigFactory, logger func(interface{})) func(http.ResponseWriter, *http.Request)

func Root

func Root(w http.ResponseWriter, req *http.Request)

Types

type ConfigFactory

type ConfigFactory func() *config.Config

type Context

type Context struct {
	Uid string `json:"uid"`
}

type ParticipateRequest

type ParticipateRequest struct {
	Context     Context             `json:"context"`
	Experiments map[string][]string `json:"experiments,omitempty"`
	Features    map[string]float32  `json:"features,omitempty"`
}

type ParticipateResponse

type ParticipateResponse struct {
	Experiments map[string]string `json:"experiments,omitempty"`
	Features    map[string]bool   `json:"features,omitempty"`
}

Jump to

Keyboard shortcuts

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