ofrep

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEvaluateError

func NewEvaluateError(key string, errorCode flag.ErrorCode, errorDetails string) *model.OFREPEvaluateErrorResponse

func NewOFREPCommonError added in v1.25.1

func NewOFREPCommonError(errorCode flag.ErrorCode, errorDetails string) *model.OFREPCommonErrorResponse

Types

type EvaluateCtrl

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

func NewOFREPEvaluate

func NewOFREPEvaluate(goFF *ffclient.GoFeatureFlag, metrics metric.Metrics) EvaluateCtrl

func (*EvaluateCtrl) BulkEvaluate

func (h *EvaluateCtrl) BulkEvaluate(c echo.Context) error

BulkEvaluate is the entry point to evaluate in bulk flags using the OpenFeature Remote Evaluation Protocol @Summary Open-Feature Remote Evaluation Protocol bulk evaluation API. @Tags OpenFeature Remote Evaluation Protocol (OFREP) @Description Making a **POST** request to the URL `/ofrep/v1/evaluate/flags` will give you the value of the list @Description of feature flags for this evaluation context. @Description @Description If no flags are provided, the API will evaluate all available flags in the configuration. @Security ApiKeyAuth @Produce json @Accept json @Param If-None-Match header string false "The request will be processed only if ETag doesn't match." @Param data body model.OFREPEvalFlagRequest true "Evaluation Context and list of flag for this API call" @Success 200 {object} model.OFREPBulkEvaluateSuccessResponse "OFREP successful evaluation response" @Failure 400 {object} model.OFREPCommonErrorResponse "Bad evaluation request" @Failure 401 {object} modeldocs.HTTPErrorDoc "Unauthorized - You need credentials to access the API" @Failure 403 {object} modeldocs.HTTPErrorDoc "Forbidden - You are not authorized to access the API" @Failure 500 {object} modeldocs.HTTPErrorDoc "Internal server error" @Router /ofrep/v1/evaluate/flags [post]

func (*EvaluateCtrl) Evaluate

func (h *EvaluateCtrl) Evaluate(c echo.Context) error

Evaluate is the entry point to evaluate a flag using the OpenFeature Remote Evaluation Protocol @Summary Evaluate a feature flag using the OpenFeature Remote Evaluation Protocol @Tags OpenFeature Remote Evaluation Protocol (OFREP) @Description Making a **POST** request to the URL `/ofrep/v1/evaluate/flags/{your_flag_name}` will give you the @Description value of the flag for this evaluation context @Description @Security ApiKeyAuth @Produce json @Accept json @Param data body model.OFREPEvalFlagRequest true "Evaluation Context for this API call" @Param flag_key path string true "Name of your feature flag" @Success 200 {object} model.OFREPEvaluateSuccessResponse "Success" @Failure 400 {object} model.OFREPEvaluateErrorResponse "Bad Request" @Failure 401 {object} modeldocs.HTTPErrorDoc "Unauthorized" @Failure 404 {object} model.OFREPEvaluateErrorResponse "Flag Not Found" @Failure 500 {object} modeldocs.HTTPErrorDoc "Internal server error" @Router /ofrep/v1/evaluate/flags/{flag_key} [post]

Jump to

Keyboard shortcuts

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