controller

package
v0.0.0-...-d328d9e Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(w http.ResponseWriter, statusCode int, err error, requestId *string)

func LogFetchTreatmentError

func LogFetchTreatmentError(
	projectId uint32,
	statusCode int,
	err error,
	request api.FetchTreatmentRequestBody,
	filters map[string][]*_segmenters.SegmenterValue)

func NewCacheDumpHandler

func NewCacheDumpHandler(ctx *appcontext.AppContext, cfg *config.Config) http.Handler

func Ok

func Ok(w http.ResponseWriter, jsonBody interface{}, requestId *string)

Types

type InternalController

type InternalController struct {
	http.Handler
	*appcontext.AppContext
	Config *config.Config
}

func NewInternalController

func NewInternalController(ctx *appcontext.AppContext, cfg *config.Config) *InternalController

type Response

type Response struct {
	// contains filtered or unexported fields
}

Response contains the status code and data to return to the caller

func (*Response) WriteTo

func (r *Response) WriteTo(w http.ResponseWriter)

WriteTo writes a Response to the provided http.ResponseWriter

type TreatmentController

type TreatmentController struct {
	*appcontext.AppContext
	Config *config.Config
}

func NewTreatmentController

func NewTreatmentController(ctx appcontext.AppContext, cfg config.Config) *TreatmentController

func (TreatmentController) FetchTreatment

func (t TreatmentController) FetchTreatment(w http.ResponseWriter, r *http.Request, projectId_ int64, params api.FetchTreatmentParams)

Jump to

Keyboard shortcuts

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