Package-level declarations

Types

Link copied to clipboard

This interface exists to facilitate the implementation of ToggleImpl which contains logic inside an api module. This is an internal implementation to thread the need between toggles-api and toggles-impl and should NEVER be used publicly.

Link copied to clipboard
data class JsonException(val domain: String, val reason: String?)
Link copied to clipboard
data class JsonFeature(val state: String?, val hash: String?, val minSupportedVersion: Int?, val settings: JSONObject?, val exceptions: List<JsonException>, val features: Map<String, JsonToggle>?)
Link copied to clipboard
Link copied to clipboard
data class JsonToggle(val state: String?, val minSupportedVersion: Double?, val rollout: JsonToggleRollout?, val targets: List<JsonToggleTarget>, val cohorts: List<JsonToggleCohort>, val settings: JSONObject?, val exceptions: List<JsonException>)
Link copied to clipboard
data class JsonToggleCohort(val name: String, val weight: Int)
Link copied to clipboard
Link copied to clipboard
data class JsonToggleRolloutStep(val percent: Double)

Shared JSON model classes and a pre-built Moshi instance used exclusively by com.duckduckgo.anvil.annotations.ContributesRemoteFeature-generated _RemoteFeature classes.

Link copied to clipboard
data class JsonToggleTarget(val variantKey: String, val localeCountry: String, val localeLanguage: String, val isReturningUser: Boolean?, val isPrivacyProEligible: Boolean?, val entitlement: String?, val minSdkVersion: Int?)

Properties

Link copied to clipboard

Pre-built Moshi instance configured with JSONObjectAdapter. Used by all @ContributesRemoteFeature-generated _RemoteFeature classes for serializing/deserializing com.duckduckgo.feature.toggles.api.Toggle.State and parsing remote config JSON payloads.