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)
* 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 EdgeDBSettings
- type Environment
- type ErrorResponse
- type Event
- type EventQueueOptions
- type Feature
- type FeatureVariation
- type FlushPayload
- type OptInColors
- type OptInSettings
- type PlatformData
- type PopulatedUser
- type Project
- type ProjectSettings
- type ReadOnlyVariable
- type User
- type UserDataAndEventsBody
- type UserEventsBatchRecord
- type UserFeatureData
- type Variable
Constants ¶
const ( EventType_VariableEvaluated = "variableEvaluated" EventType_AggVariableEvaluated = "aggVariableEvaluated" EventType_VariableDefaulted = "variableDefaulted" EventType_AggVariableDefaulted = "aggVariableDefaulted" EventType_CustomEvent = "customEvent" )
Variables ¶
This section is empty.
Functions ¶
func ChunkSlice ¶ added in v2.9.6
Types ¶
type BaseVariable ¶
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 EdgeDBSettings ¶
type EdgeDBSettings struct {
Enabled bool `json:"enabled"`
}
type Environment ¶
type ErrorResponse ¶
type ErrorResponse struct { // Error message Message string `json:"message"` // Additional error information detailing the error reasoning Data interface{} `json:"data,omitempty"` }
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 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 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 // Default variable value can be a string, number, boolean, or JSON DefaultValue interface{} `json:"defaultValue"` // Identifies if variable was returned with the default value IsDefaulted bool `json:"isDefaulted"` }