Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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. @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 @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]
type EvaluateError ¶
type EvaluateError struct {
// contains filtered or unexported fields
}
func NewEvaluateError ¶
func NewEvaluateError(errorCode flag.ErrorCode, errorDetails string) *EvaluateError
func (*EvaluateError) Error ¶
func (m *EvaluateError) Error() string
func (*EvaluateError) ToOFRErrorResponse ¶
func (m *EvaluateError) ToOFRErrorResponse() model.OFREPCommonErrorResponse