Tungsten v0.1.0 Tungsten.CDP.Storage View Source

Storage

This domain has no documentation

Link to this section Summary

Link to this section Types

Link to this type

cdp_storage_type_type() View Source
cdp_storage_type_type() ::
  :other
  | :all
  | :cache_storage
  | :service_workers
  | :websql
  | :shader_cache
  | :local_storage
  | :indexeddb
  | :file_systems
  | :cookies
  | :appcache

Storage.StorageType

Enum of possible storage types.

Link to this type

cdp_usage_for_type_type() View Source
cdp_usage_for_type_type() :: %{
  storage_type: cdp_storage_type_type(),
  usage: integer() | float()
}

Storage.UsageForType

Usage for a storage type.

Link to this section Functions

Link to this function

clear_data_for_origin(session, parameters, options \\ []) View Source
clear_data_for_origin(
  GenServer.server(),
  %{origin: String.t(), storage_types: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Storage.clearDataForOrigin

Clears storage for origin.

Link to this function

get_usage_and_quota(session, parameters, options \\ []) View Source
get_usage_and_quota(
  GenServer.server(),
  %{origin: String.t()},
  Tungsten.Connection.exec_options()
) ::
  {:ok,
   %{
     usage: integer() | float(),
     quota: integer() | float(),
     usage_breakdown: [cdp_usage_for_type_type()]
   }}
  | {:error, term()}

Storage.getUsageAndQuota

Returns usage and quota in bytes.

Link to this function

track_cache_storage_for_origin(session, parameters, options \\ []) View Source
track_cache_storage_for_origin(
  GenServer.server(),
  %{origin: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Storage.trackCacheStorageForOrigin

Registers origin to be notified when an update occurs to its cache storage list.

Link to this function

track_indexed_db_for_origin(session, parameters, options \\ []) View Source
track_indexed_db_for_origin(
  GenServer.server(),
  %{origin: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Storage.trackIndexedDBForOrigin

Registers origin to be notified when an update occurs to its IndexedDB.

Link to this function

untrack_cache_storage_for_origin(session, parameters, options \\ []) View Source
untrack_cache_storage_for_origin(
  GenServer.server(),
  %{origin: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Storage.untrackCacheStorageForOrigin

Unregisters origin from receiving notifications for cache storage.

Link to this function

untrack_indexed_db_for_origin(session, parameters, options \\ []) View Source
untrack_indexed_db_for_origin(
  GenServer.server(),
  %{origin: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Storage.untrackIndexedDBForOrigin

Unregisters origin from receiving notifications for IndexedDB.