Documentation
¶
Overview ¶
* DevCycle Bucketing API * * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs. * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* DevCycle Bucketing API * * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs. * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* DevCycle Bucketing API * * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs. * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* DevCycle Bucketing API * * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs. * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* DevCycle Bucketing API * * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs. * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Constants
- func ChunkSlice(slice []Event, chunkSize int) [][]Event
- type BaseVariable
- type BatchEventsBody
- type BucketedUserConfig
- type ClientEvent
- type ClientEventType
- type DefaultReason
- type EdgeDBSettings
- type Environment
- type EnvironmentMetadata
- type ErrorResponse
- type EvalDetails
- type EvaluationReason
- type Event
- type EventQueueOptions
- type Feature
- type FeatureVariation
- type FlushPayload
- type MinimalConfig
- type OptInColors
- type OptInSettings
- type PlatformData
- type PopulatedUser
- type Project
- type ProjectMetadata
- type ProjectSettings
- type ReadOnlyVariable
- type SSEHost
- type User
- type UserDataAndEventsBody
- type UserEventsBatchRecord
- type UserFeatureData
- type Variable
- type VariableMetadata
Constants ¶
const ( EventType_VariableEvaluated = "variableEvaluated" EventType_AggVariableEvaluated = "aggVariableEvaluated" EventType_VariableDefaulted = "variableDefaulted" EventType_AggVariableDefaulted = "aggVariableDefaulted" EventType_SDKConfig = "sdkConfig" EventType_CustomEvent = "customEvent" )
Variables ¶
This section is empty.
Functions ¶
func ChunkSlice ¶ added in v2.9.6
Types ¶
type BaseVariable ¶
type BaseVariable struct {
// Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id.
Key string `json:"key"`
// Variable type
Type_ string `json:"type"`
// Variable value can be a string, number, boolean, or JSON
Value interface{} `json:"value"`
Eval EvalDetails `json:"eval"`
}
type BatchEventsBody ¶
type BatchEventsBody struct {
Batch []UserEventsBatchRecord `json:"batch"`
}
type BucketedUserConfig ¶
type BucketedUserConfig struct {
Project Project `json:"project"`
Environment Environment `json:"environment"`
Features map[string]Feature `json:"features"`
FeatureVariationMap map[string]string `json:"featureVariationMap"`
VariableVariationMap map[string]FeatureVariation `json:"variableVariationMap"`
Variables map[string]ReadOnlyVariable `json:"variables"`
KnownVariableKeys []float64 `json:"knownVariableKeys"`
User *User `json:"-"`
}
type ClientEvent ¶ added in v2.16.0
type ClientEvent struct {
EventType ClientEventType `json:"eventType"`
EventData interface{} `json:"eventData"`
Status string `json:"status"`
Error error `json:"error"`
}
type ClientEventType ¶ added in v2.16.0
type ClientEventType string
const ( ClientEventType_Initialized ClientEventType = "initialized" ClientEventType_Error ClientEventType = "error" ClientEventType_ConfigUpdated ClientEventType = "configUpdated" ClientEventType_RealtimeUpdates ClientEventType = "realtimeUpdates" ClientEventType_InternalSSEFailure ClientEventType = "internalSSEFailure" ClientEventType_InternalNewConfigAvailable ClientEventType = "internalNewConfigAvailable" ClientEventType_InternalSSEConnected ClientEventType = "internalSSEConnected" )
type DefaultReason ¶ added in v2.23.0
type DefaultReason string
const ( DefaultReasonMissingConfig DefaultReason = "Missing Config" DefaultReasonMissingVariable DefaultReason = "Missing Variable" DefaultReasonMissingFeature DefaultReason = "Missing Feature" DefaultReasonMissingVariation DefaultReason = "Missing Variation" DefaultReasonMissingVariableForVariation DefaultReason = "Missing Variable for Variation" DefaultReasonUserNotInRollout DefaultReason = "User Not in Rollout" DefaultReasonUserNotTargeted DefaultReason = "User Not Targeted" DefaultReasonInvalidVariableType DefaultReason = "Invalid Variable Type" DefaultReasonVariableTypeMismatch DefaultReason = "Variable Type Mismatch" DefaultReasonUnknown DefaultReason = "Unknown" DefaultReasonError DefaultReason = "Error" DefaultReasonNotDefaulted DefaultReason = "" )
type EdgeDBSettings ¶
type EdgeDBSettings struct {
Enabled bool `json:"enabled"`
}
type Environment ¶
type EnvironmentMetadata ¶ added in v2.23.0
type ErrorResponse ¶
type ErrorResponse struct {
// Error message
Message string `json:"message"`
// Additional error information detailing the error reasoning
Data interface{} `json:"data,omitempty"`
}
type EvalDetails ¶ added in v2.23.0
type EvalDetails struct {
Reason EvaluationReason `json:"reason"`
Details string `json:"details"`
TargetId string `json:"target_id,omitempty"`
}
type EvaluationReason ¶ added in v2.23.0
type EvaluationReason string
const ( EvaluationReasonTargetingMatch EvaluationReason = "TARGETING_MATCH" EvaluationReasonSplit EvaluationReason = "SPLIT" EvaluationReasonDefault EvaluationReason = "DEFAULT" EvaluationReasonDisabled EvaluationReason = "DISABLED" EvaluationReasonError EvaluationReason = "ERROR" )
type Event ¶ added in v2.10.0
type Event struct {
Type_ string `json:"type"`
Target string `json:"target,omitempty"`
CustomType string `json:"customType,omitempty"`
UserId string `json:"user_id"`
ClientDate time.Time `json:"clientDate"`
Value float64 `json:"value,omitempty"`
FeatureVars map[string]string `json:"featureVars"`
MetaData map[string]interface{} `json:"metaData,omitempty"`
}
type EventQueueOptions ¶ added in v2.9.6
type EventQueueOptions struct {
FlushEventsInterval time.Duration `json:"flushEventsMS"`
DisableAutomaticEventLogging bool `json:"disableAutomaticEventLogging"`
DisableCustomEventLogging bool `json:"disableCustomEventLogging"`
MaxEventQueueSize int `json:"maxEventsPerFlush,omitempty"`
FlushEventQueueSize int `json:"minEventsPerFlush,omitempty"`
EventRequestChunkSize int `json:"eventRequestChunkSize,omitempty"`
EventsAPIBasePath string `json:"eventsAPIBasePath,omitempty"`
}
func (*EventQueueOptions) CheckBounds ¶ added in v2.9.6
func (o *EventQueueOptions) CheckBounds()
func (*EventQueueOptions) IsEventLoggingDisabled ¶ added in v2.9.6
func (o *EventQueueOptions) IsEventLoggingDisabled(eventType string) bool
type Feature ¶
type Feature struct {
// unique database id
Id string `json:"_id"`
// Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id.
Key string `json:"key"`
// Feature type
Type_ string `json:"type"`
// Bucketed feature variation
Variation string `json:"_variation"`
// Bucketed feature variation key
VariationKey string `json:"variationKey"`
// Bucketed feature variation name
VariationName string `json:"variationName"`
// Evaluation reasoning
EvalReason string `json:"evalReason,omitempty"`
}
type FeatureVariation ¶
type FlushPayload ¶
type FlushPayload struct {
PayloadId string `json:"payloadId"`
EventCount int `json:"eventCount"`
Records []UserEventsBatchRecord `json:"records"`
Status string
}
func (*FlushPayload) AddBatchRecordForUser ¶ added in v2.9.6
func (fp *FlushPayload) AddBatchRecordForUser(record UserEventsBatchRecord, chunkSize int)
type MinimalConfig ¶ added in v2.16.0
type MinimalConfig struct {
SSE *SSEHost `json:"sse,omitempty"`
Project *Project `json:"project,omitempty"`
Environment *Environment `json:"environment,omitempty"`
ConfigETag string `json:"configETag,omitempty"`
ConfigLastModified string `json:"configLastModified,omitempty"`
}
type OptInColors ¶
type OptInSettings ¶
type OptInSettings struct {
Enabled bool `json:"enabled"`
Title string `json:"title"`
Description string `json:"description"`
ImageURL string `json:"imageURL"`
Colors OptInColors `json:"colors"`
}
type PlatformData ¶
type PlatformData struct {
SdkType string `json:"sdkType"`
SdkVersion string `json:"sdkVersion"`
PlatformVersion string `json:"platformVersion"`
DeviceModel string `json:"deviceModel"`
Platform string `json:"platform"`
Hostname string `json:"hostname"`
}
func (PlatformData) Default ¶ added in v2.9.6
func (p PlatformData) Default() *PlatformData
type PopulatedUser ¶ added in v2.10.0
type PopulatedUser struct {
User
*PlatformData
// Date the user was created, Unix epoch timestamp format
CreatedDate time.Time `json:"createdDate,omitempty"`
}
func (*PopulatedUser) CombinedCustomData ¶ added in v2.10.0
func (p *PopulatedUser) CombinedCustomData() map[string]interface{}
func (*PopulatedUser) MergeClientCustomData ¶ added in v2.10.0
func (p *PopulatedUser) MergeClientCustomData(ccd map[string]interface{})
type Project ¶
type Project struct {
Id string `json:"_id" validate:"required"`
Key string `json:"key" validate:"required"`
A0OrganizationId string `json:"a0_organization" validate:"required"`
Settings ProjectSettings `json:"settings" validate:"required"`
}
type ProjectMetadata ¶ added in v2.23.0
type ProjectSettings ¶
type ProjectSettings struct {
EdgeDB EdgeDBSettings `json:"edgeDB"`
OptIn OptInSettings `json:"optIn"`
DisablePassthroughRollouts bool `json:"disablePassthroughRollouts"`
}
type ReadOnlyVariable ¶
type ReadOnlyVariable struct {
BaseVariable
// unique database id
Id string `json:"_id"`
}
type User ¶ added in v2.10.0
type User struct {
// Unique id to identify the user
UserId string `json:"user_id"`
// User's email used to identify the user on the dashboard / target audiences
Email string `json:"email,omitempty"`
// User's name used to identify the user on the dashboard / target audiences
Name string `json:"name,omitempty"`
// User's language in ISO 639-1 format
Language string `json:"language,omitempty"`
// User's country in ISO 3166 alpha-2 format
Country string `json:"country,omitempty"`
// App Version of the running application
AppVersion string `json:"appVersion,omitempty"`
// App Build number of the running application
AppBuild string `json:"appBuild,omitempty"`
// User's custom data to target the user with, data will be logged to DevCycle for use in dashboard.
CustomData map[string]interface{} `json:"customData,omitempty"`
// User's custom data to target the user with, data will not be logged to DevCycle only used for feature bucketing.
PrivateCustomData map[string]interface{} `json:"privateCustomData,omitempty"`
// User's device model
DeviceModel string `json:"deviceModel,omitempty"`
// Date the user was created, Unix epoch timestamp format
LastSeenDate time.Time `json:"lastSeenDate,omitempty"`
}
func (User) GetPopulatedUser ¶ added in v2.10.0
func (user User) GetPopulatedUser(platformData *PlatformData) PopulatedUser
func (User) GetPopulatedUserWithTime ¶ added in v2.10.0
func (user User) GetPopulatedUserWithTime(platformData *PlatformData, createDate time.Time) PopulatedUser
GetPopulatedUserWithTime returns a populated user with a specific created date
type UserDataAndEventsBody ¶
type UserDataAndEventsBody struct {
Events []Event `json:"events,omitempty"`
User *PopulatedUser `json:"user,omitempty"`
}
type UserEventsBatchRecord ¶
type UserEventsBatchRecord struct {
User PopulatedUser `json:"user"`
Events []Event `json:"events"`
}
type UserFeatureData ¶
type Variable ¶
type Variable struct {
BaseVariable
DefaultValue interface{} `json:"defaultValue"`
IsDefaulted bool `json:"isDefaulted"`
}
type VariableMetadata ¶ added in v2.24.0
type VariableMetadata struct {
FeatureId string `json:"featureId,omitempty"`
}