MetadataStorage

Provides access to validation rules and anonymization metadata required for processing FUS reports. Implementations may fetch and cache metadata from remote sources and/or bundled resources.

Functions

Link copied to clipboard
open suspend fun close()

Called when FusClient is closed.

Link copied to clipboard

Revisions for client data validation rules.

Link copied to clipboard
abstract fun getFieldsToAnonymize(groupId: String, eventId: String): Set<String>

Returns fields of the given groupId/eventId that must be anonymized.

Link copied to clipboard
abstract fun getGroupValidators(groupId: String): IGroupValidators<T>

Returns group validators for the given groupId.

Link copied to clipboard

Revisions for ids validation rules.

Link copied to clipboard

Returns event ids that should be skipped during anonymization.

Link copied to clipboard

Revisions for system data validation rules.

Link copied to clipboard
abstract fun isUnreachable(): Boolean
Link copied to clipboard
abstract suspend fun reload()

Reloads the metadata from the local cache. Useful for when a local file is modified for testing purposes.

Link copied to clipboard
abstract suspend fun scheduleUpdate()

Schedules periodic metadata updates creating a new coroutine child scope

Link copied to clipboard
abstract suspend fun update(): Boolean

Performs a one-shot metadata update, returning true if successful.