pub struct Configuration {
pub filter_list_type: FilterListType,
pub working_directory: Option<String>,
pub locale: Locale,
pub default_filter_list_expires_period_sec: i32,
pub filters_compilation_policy: FiltersCompilationPolicy,
pub metadata_url: String,
pub metadata_locales_url: String,
pub request_timeout_ms: i32,
pub request_proxy_mode: RequestProxyMode,
pub auto_lift_up_database: bool,
pub app_name: String,
pub version: String,
}
Expand description
Configuration object
Fields§
§filter_list_type: FilterListType
Type of filter lists to manage
working_directory: Option<String>
Absolute path for library working directory.
This will be used for database operating.
if value is None
cwd
will be used
locale: Locale
Locale
is the locale that needs to be used to extract localized names and descriptions.
Locale en-GB
will be normalized to internal en_GB
representation.
Default value: en
default_filter_list_expires_period_sec: i32
Default period for expires in seconds (unless specified in “Expires”, or its value is too small). Default value: 86400 Values < 3600 will be clamped to 3600
filters_compilation_policy: FiltersCompilationPolicy
Settings for filters compilation or collection from compiled parts.
§Compilation
During the update, each filter will be “compiled” into main filter and its includes. Main filter remains unchanged. But in includes, (include, if/else/endif) directives will be resolved, using this policy. Recursive includes will be inlined.
§Collection
When you get filters, they will be collected from compiled parts (main filter + includes). All directives in main filter will be resolved, using this policy, and includes will be injected.
metadata_url: String
URL of the index (filters.json) file
metadata_locales_url: String
URL of the locales (filters_i18n.json) file
request_timeout_ms: i32
Requests timeouts in milliseconds. Default value 60000
request_proxy_mode: RequestProxyMode
Requests proxy mode
auto_lift_up_database: bool
“Uplifting” a database is a set of measures that brings the database up to date:
- Database creation
- Filling with schema
- Creation of service tables and entities
- Migrating between versions of a given library
If you want to disable this option, you will need to manually call flm.lift_up_database()
when you update the library in your application.
app_name: String
Client app name
version: String
Client app version