Documentation ¶
Overview ¶
Package servicedef contains definitions for the REST protocol that test services must implement. See the top-level README.md for more details.
The package is used by the test harness, but can also be imported by any test service code that is Go-based.
Index ¶
- Constants
- type AttributeDefinition
- type BigSegmentStoreStatusResponse
- type CommandParams
- type ContextBuildParams
- type ContextBuildResponse
- type ContextBuildSingleParams
- type ContextComparisonPairParams
- type ContextComparisonParams
- type ContextComparisonResponse
- type ContextComparisonSingleParams
- type ContextConvertParams
- type CreateInstanceParams
- type CustomEventParams
- type EvaluateAllFlagsParams
- type EvaluateAllFlagsResponse
- type EvaluateFlagParams
- type EvaluateFlagResponse
- type IdentifyEventParams
- type MigrationOperationParams
- type MigrationOperationResponse
- type MigrationVariationParams
- type MigrationVariationResponse
- type PrivateAttribute
- type SDKConfigBigSegmentsParams
- type SDKConfigClientSideParams
- type SDKConfigEventParams
- type SDKConfigParams
- type SDKConfigPersistentDataStoreParams
- type SDKConfigPollingParams
- type SDKConfigServiceEndpointsParams
- type SDKConfigStreamingParams
- type SDKConfigTagsParams
- type SecureModeHashParams
- type SecureModeHashResponse
- type StatusRep
- type ValueType
Constants ¶
View Source
const ( CommandEvaluateFlag = "evaluate" CommandEvaluateAllFlags = "evaluateAll" CommandIdentifyEvent = "identifyEvent" CommandCustomEvent = "customEvent" CommandAliasEvent = "aliasEvent" CommandFlushEvents = "flushEvents" CommandGetBigSegmentStoreStatus = "getBigSegmentStoreStatus" CommandContextBuild = "contextBuild" CommandContextConvert = "contextConvert" CommandContextComparison = "contextComparison" CommandSecureModeHash = "secureModeHash" CommandMigrationVariation = "migrationVariation" CommandMigrationOperation = "migrationOperation" )
View Source
const ( ValueTypeBool = "bool" ValueTypeInt = "int" ValueTypeDouble = "double" ValueTypeString = "string" ValueTypeAny = "any" )
View Source
const ( CapabilityClientSide = "client-side" CapabilityServerSide = "server-side" CapabilityStronglyTyped = "strongly-typed" CapabilityMobile = "mobile" CapabilityPHP = "php" CapabilityRoku = "roku" CapabilitySingleton = "singleton" CapabilityAllFlagsWithReasons = "all-flags-with-reasons" CapabilityAllFlagsClientSideOnly = "all-flags-client-side-only" CapabilityAllFlagsDetailsOnlyForTrackedFlags = "all-flags-details-only-for-tracked-flags" CapabilityBigSegments = "big-segments" CapabilityContextType = "context-type" CapabilityContextComparison = "context-comparison" CapabilitySecureModeHash = "secure-mode-hash" CapabilityServerSidePolling = "server-side-polling" CapabilityServiceEndpoints = "service-endpoints" CapabilityTags = "tags" CapabilityUserType = "user-type" CapabilityFiltering = "filtering" CapabilityAutoEnvAttributes = "auto-env-attributes" CapabilityMigrations = "migrations" CapabilityEventSampling = "event-sampling" CapabilityETagCaching = "etag-caching" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeDefinition ¶ added in v2.3.0
type CommandParams ¶
type CommandParams struct { Command string `json:"command"` Evaluate o.Maybe[EvaluateFlagParams] `json:"evaluate,omitempty"` EvaluateAll o.Maybe[EvaluateAllFlagsParams] `json:"evaluateAll,omitempty"` CustomEvent o.Maybe[CustomEventParams] `json:"customEvent,omitempty"` IdentifyEvent o.Maybe[IdentifyEventParams] `json:"identifyEvent,omitempty"` ContextBuild o.Maybe[ContextBuildParams] `json:"contextBuild,omitempty"` ContextConvert o.Maybe[ContextConvertParams] `json:"contextConvert,omitempty"` ContextComparison o.Maybe[ContextComparisonPairParams] `json:"contextComparison,omitempty"` SecureModeHash o.Maybe[SecureModeHashParams] `json:"secureModeHash,omitempty"` MigrationVariation o.Maybe[MigrationVariationParams] `json:"migrationVariation,omitempty"` MigrationOperation o.Maybe[MigrationOperationParams] `json:"migrationOperation,omitempty"` }
type ContextBuildParams ¶
type ContextBuildParams struct { Single *ContextBuildSingleParams `json:"single,omitempty"` Multi []ContextBuildSingleParams `json:"multi,omitempty"` }
type ContextBuildResponse ¶
type ContextComparisonPairParams ¶ added in v2.3.0
type ContextComparisonPairParams struct { Context1 ContextComparisonParams `json:"context1"` Context2 ContextComparisonParams `json:"context2"` }
type ContextComparisonParams ¶ added in v2.3.0
type ContextComparisonParams struct { Single *ContextComparisonSingleParams `json:"single,omitempty"` Multi []ContextComparisonSingleParams `json:"multi,omitempty"` }
type ContextComparisonResponse ¶ added in v2.3.0
type ContextComparisonResponse struct {
Equals bool `json:"equals"`
}
type ContextComparisonSingleParams ¶ added in v2.3.0
type ContextComparisonSingleParams struct { Kind string `json:"kind"` Key string `json:"key"` Attributes []AttributeDefinition `json:"attributes,omitempty"` PrivateAttributes []PrivateAttribute `json:"privateAttributes:omitempty"` }
type ContextConvertParams ¶
type ContextConvertParams struct {
Input string `json:"input"`
}
type CreateInstanceParams ¶
type CreateInstanceParams struct { Configuration SDKConfigParams `json:"configuration"` Tag string `json:"tag"` }
type CustomEventParams ¶
type CustomEventParams struct { EventKey string `json:"eventKey"` Context o.Maybe[ldcontext.Context] `json:"context,omitempty"` User json.RawMessage `json:"user,omitempty"` Data ldvalue.Value `json:"data,omitempty"` OmitNullData bool `json:"omitNullData"` MetricValue o.Maybe[float64] `json:"metricValue,omitempty"` }
type EvaluateAllFlagsParams ¶
type EvaluateFlagParams ¶
type EvaluateFlagResponse ¶
type IdentifyEventParams ¶
type MigrationOperationParams ¶ added in v2.2.0
type MigrationOperationParams struct { Key string `json:"key"` Context ldcontext.Context `json:"context"` DefaultStage ldmigration.Stage `json:"defaultStage"` ReadExecutionOrder ldmigration.ExecutionOrder `json:"readExecutionOrder"` Operation ldmigration.Operation `json:"operation"` OldEndpoint string `json:"oldEndpoint"` NewEndpoint string `json:"newEndpoint"` Payload o.Maybe[string] `json:"payload,omitempty"` TrackLatency bool `json:"trackLatency"` TrackErrors bool `json:"trackErrors"` TrackConsistency bool `json:"trackConsistency"` }
type MigrationOperationResponse ¶ added in v2.2.0
type MigrationOperationResponse struct {
Result string `json:"result"`
}
type MigrationVariationParams ¶ added in v2.2.0
type MigrationVariationParams struct { Key string `json:"key"` Context ldcontext.Context `json:"context"` DefaultStage ldmigration.Stage `json:"defaultStage"` }
type MigrationVariationResponse ¶ added in v2.2.0
type MigrationVariationResponse struct {
Result string `json:"result"`
}
type PrivateAttribute ¶ added in v2.3.0
type SDKConfigBigSegmentsParams ¶
type SDKConfigBigSegmentsParams struct { CallbackURI string `json:"callbackUri"` UserCacheSize o.Maybe[int] `json:"userCacheSize,omitempty"` UserCacheTimeMS o.Maybe[ldtime.UnixMillisecondTime] `json:"userCacheTimeMs,omitempty"` StatusPollIntervalMS o.Maybe[ldtime.UnixMillisecondTime] `json:"statusPollIntervalMs,omitempty"` StaleAfterMS o.Maybe[ldtime.UnixMillisecondTime] `json:"staleAfterMs,omitempty"` }
type SDKConfigClientSideParams ¶
type SDKConfigClientSideParams struct { InitialContext o.Maybe[ldcontext.Context] `json:"initialContext,omitempty"` InitialUser json.RawMessage `json:"initialUser,omitempty"` EvaluationReasons o.Maybe[bool] `json:"evaluationReasons,omitempty"` UseReport o.Maybe[bool] `json:"useReport,omitempty"` IncludeEnvironmentAttributes o.Maybe[bool] `json:"includeEnvironmentAttributes,omitempty"` }
type SDKConfigEventParams ¶
type SDKConfigEventParams struct { BaseURI string `json:"baseUri,omitempty"` Capacity o.Maybe[int] `json:"capacity,omitempty"` EnableDiagnostics bool `json:"enableDiagnostics"` AllAttributesPrivate bool `json:"allAttributesPrivate,omitempty"` GlobalPrivateAttributes []string `json:"globalPrivateAttributes,omitempty"` FlushIntervalMS o.Maybe[ldtime.UnixMillisecondTime] `json:"flushIntervalMs,omitempty"` }
type SDKConfigParams ¶
type SDKConfigParams struct { Credential string `json:"credential"` StartWaitTimeMS o.Maybe[ldtime.UnixMillisecondTime] `json:"startWaitTimeMs,omitempty"` InitCanFail bool `json:"initCanFail,omitempty"` ServiceEndpoints o.Maybe[SDKConfigServiceEndpointsParams] `json:"serviceEndpoints,omitempty"` Streaming o.Maybe[SDKConfigStreamingParams] `json:"streaming,omitempty"` Polling o.Maybe[SDKConfigPollingParams] `json:"polling,omitempty"` Events o.Maybe[SDKConfigEventParams] `json:"events,omitempty"` PersistentDataStore o.Maybe[SDKConfigPersistentDataStoreParams] `json:"persistentDataStore,omitempty"` BigSegments o.Maybe[SDKConfigBigSegmentsParams] `json:"bigSegments,omitempty"` Tags o.Maybe[SDKConfigTagsParams] `json:"tags,omitempty"` ClientSide o.Maybe[SDKConfigClientSideParams] `json:"clientSide,omitempty"` }
type SDKConfigPersistentDataStoreParams ¶
type SDKConfigPersistentDataStoreParams struct {
CallbackURI string `json:"callbackURI"`
}
type SDKConfigPollingParams ¶
type SDKConfigTagsParams ¶
type SecureModeHashParams ¶
type SecureModeHashResponse ¶
type SecureModeHashResponse struct {
Result string `json:"result"`
}
type StatusRep ¶
type StatusRep struct { harness.TestServiceInfo ClientVersion string `json:"clientVersion"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package callbackfixtures contains definitions for the REST protocol that test services must implement, specifically for callback requests from the test service to the test harness.
|
Package callbackfixtures contains definitions for the REST protocol that test services must implement, specifically for callback requests from the test service to the test harness. |
Click to show internal directories.
Click to hide internal directories.