-
-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathuser_request.go
35 lines (28 loc) · 2.11 KB
/
user_request.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
package model
type AllFlagRequest struct {
// Deprecated: User The representation of a user for your feature flag system.
User *UserRequest `json:"user,omitempty" xml:"user,omitempty" form:"user" query:"user" deprecated:"true" swaggerignore:"true"` // nolint: lll
// EvaluationContext The representation of a EvaluationContext for your feature flag system.
EvaluationContext *EvaluationContextRequest `json:"evaluationContext,omitempty" xml:"evaluationContext,omitempty" form:"evaluationContext" query:"evaluationContext"` // nolint: lll
}
type EvalFlagRequest struct {
AllFlagRequest `json:",inline"`
// The value will we use if we are not able to get the variation of the flag.
DefaultValue interface{} `json:"defaultValue" xml:"defaultValue" form:"defaultValue" query:"defaultValue"`
}
// Deprecated: UserRequest The representation of a user for your feature flag system.
type UserRequest struct {
// Key is the identifier of the UserRequest.
Key string `json:"key" xml:"key" form:"key" query:"key" example:"08b5ffb7-7109-42f4-a6f2-b85560fbd20f"`
// Anonymous set if this is a logged-in user or not.
Anonymous bool `json:"anonymous" xml:"anonymous" form:"anonymous" query:"anonymous" example:"false"`
// Custom is a map containing all extra information for this user.
Custom map[string]interface{} `json:"custom" xml:"custom" form:"custom" query:"custom" swaggertype:"object,string" example:"email:contact@gofeatureflag.org,firstname:John,lastname:Doe,company:GO Feature Flag"` // nolint: lll
}
// EvaluationContextRequest The representation of a EvaluationContext for your feature flag system.
type EvaluationContextRequest struct {
// Key is the identifier of the UserRequest.
Key string `json:"key" xml:"key" form:"key" query:"key" example:"08b5ffb7-7109-42f4-a6f2-b85560fbd20f"`
// Custom is a map containing all extra information for this user.
Custom map[string]interface{} `json:"custom" xml:"custom" form:"custom" query:"custom" swaggertype:"object,string" example:"email:contact@gofeatureflag.org,firstname:John,lastname:Doe,company:GO Feature Flag"` // nolint: lll
}