Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEvaluateError ¶
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" @Success 304 {string} string "Etag: \"117-0193435c612c50d93b798619d9464856263dbf9f\"" @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) Configuration ¶ added in v1.27.0
func (h *EvaluateCtrl) Configuration(c echo.Context) error
Configuration is the entry point to get the configuration for OFREP. @Summary OFREP provider configuration @Tags OpenFeature Remote Evaluation Protocol (OFREP) @Description OFREP configuration to provide information about the remote flag management system, to configure the @Description OpenFeature SDK providers. @Description @Description This endpoint will be called during the initialization of the provider. @Security ApiKeyAuth @Produce json @Accept json @Param If-None-Match header string false "The request will be processed only if ETag doesn't match." @Success 200 {object} model.OFREPConfiguration "Success" @Success 304 {string} string "Etag: \"117-0193435c612c50d93b798619d9464856263dbf9f\"" @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/configuration [get]
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]