-
Notifications
You must be signed in to change notification settings - Fork 6
/
eval_details.go
47 lines (40 loc) · 1.39 KB
/
eval_details.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package configcat
import (
"time"
)
// EvaluationDetailsData holds the additional evaluation information of a feature flag or setting.
type EvaluationDetailsData struct {
Key string
VariationID string
User User
IsDefaultValue bool
Error error
FetchTime time.Time
MatchedTargetingRule *TargetingRule
MatchedPercentageOption *PercentageOption
}
// EvaluationDetails holds the additional evaluation information along with the value of a feature flag or setting.
type EvaluationDetails struct {
Data EvaluationDetailsData
Value interface{}
}
// BoolEvaluationDetails holds the additional evaluation information along with the value of a bool flag.
type BoolEvaluationDetails struct {
Data EvaluationDetailsData
Value bool
}
// IntEvaluationDetails holds the additional evaluation information along with the value of a whole number flag.
type IntEvaluationDetails struct {
Data EvaluationDetailsData
Value int
}
// StringEvaluationDetails holds the additional evaluation information along with the value of a string flag.
type StringEvaluationDetails struct {
Data EvaluationDetailsData
Value string
}
// FloatEvaluationDetails holds the additional evaluation information along with the value of a decimal number flag.
type FloatEvaluationDetails struct {
Data EvaluationDetailsData
Value float64
}