forked from thomaspoignant/go-feature-flag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflag.go
28 lines (21 loc) · 760 Bytes
/
flag.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
package flag
import (
"github.com/thomaspoignant/go-feature-flag/ffcontext"
)
type Flag interface {
// Value is returning the Value associate to the flag
Value(flagName string, evaluationContext ffcontext.Context, flagContext Context) (interface{}, ResolutionDetails)
// GetVersion is the getter for the field Version
// Default: 0.0
GetVersion() string
// IsTrackEvents is the getter of the field TrackEvents
// Default: true
IsTrackEvents() bool
// IsDisable is the getter for the field Disable
// Default: false
IsDisable() bool
// GetVariationValue return the value of variation from his name
GetVariationValue(name string) interface{}
// GetMetadata return the metadata associated to the flag
GetMetadata() map[string]interface{}
}