Documentation ¶
Index ¶
- func ErrorResponse(w http.ResponseWriter, statusCode int, err error, requestId *string)
- func LogFetchTreatmentError(projectId uint32, statusCode int, err error, ...)
- func NewCacheDumpHandler(ctx *appcontext.AppContext, cfg *config.Config) http.Handler
- func Ok(w http.ResponseWriter, jsonBody interface{}, requestId *string)
- type InternalController
- type Response
- type TreatmentController
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)
Click to show internal directories.
Click to hide internal directories.