WeaviateEx.Backup.Storage (WeaviateEx v0.7.4)

View Source

Backup storage backend types.

Available Backends

  • :filesystem - Local filesystem storage
  • :s3 - Amazon S3 or S3-compatible storage
  • :gcs - Google Cloud Storage
  • :azure - Azure Blob Storage

Examples

iex> Storage.valid?(:s3)
true

iex> Storage.to_api_path(:filesystem)
"filesystem"

iex> Storage.from_api("gcs")
{:ok, :gcs}

Summary

Functions

List all available storage backends.

Parse from API response.

Convert to API path segment.

Check if backend is valid.

Types

t()

@type t() :: :filesystem | :s3 | :gcs | :azure

Functions

all()

@spec all() :: [t()]

List all available storage backends.

Examples

iex> Storage.all()
[:filesystem, :s3, :gcs, :azure]

from_api(arg1)

@spec from_api(String.t()) :: {:ok, t()} | {:error, :invalid_backend}

Parse from API response.

Examples

iex> Storage.from_api("s3")
{:ok, :s3}

iex> Storage.from_api("invalid")
{:error, :invalid_backend}

to_api_path(atom)

@spec to_api_path(t()) :: String.t()

Convert to API path segment.

Examples

iex> Storage.to_api_path(:filesystem)
"filesystem"

iex> Storage.to_api_path(:s3)
"s3"

valid?(backend)

@spec valid?(atom()) :: boolean()

Check if backend is valid.

Examples

iex> Storage.valid?(:s3)
true

iex> Storage.valid?(:invalid)
false