XmtpElixirSdk.Storage (xmtp_elixir_sdk v0.1.2)

Copy Markdown

Local storage helper used by the SDK core.

Summary

Types

t()

@type t() :: %XmtpElixirSdk.Storage{root: Path.t()}

Functions

clear_all(storage)

@spec clear_all(t()) :: :ok | {:error, XmtpElixirSdk.Error.t()}

delete_file(storage, path)

@spec delete_file(t(), Path.t()) ::
  {:ok, boolean()} | {:error, XmtpElixirSdk.Error.t()}

export_db(storage, path)

@spec export_db(t(), Path.t()) :: {:ok, binary()} | {:error, XmtpElixirSdk.Error.t()}

file_count(storage)

@spec file_count(t()) :: {:ok, non_neg_integer()} | {:error, XmtpElixirSdk.Error.t()}

file_exists(storage, path)

@spec file_exists(t(), Path.t()) ::
  {:ok, boolean()} | {:error, XmtpElixirSdk.Error.t()}

import_db(storage, path, data)

@spec import_db(t(), Path.t(), binary()) :: :ok | {:error, XmtpElixirSdk.Error.t()}

init(storage)

@spec init(t()) :: {:ok, t()} | {:error, XmtpElixirSdk.Error.t()}

list_files(storage)

@spec list_files(t()) :: {:ok, [Path.t()]} | {:error, XmtpElixirSdk.Error.t()}

new(root)

@spec new(Path.t()) :: t()