WeaviateEx.Backup.Location (WeaviateEx v0.7.4)
View SourceBackup storage location configurations.
Provides location configuration structs for each supported storage backend.
Examples
# Local filesystem
Location.filesystem("/var/backups")
# Amazon S3
Location.s3("my-bucket", "/backups",
endpoint: "s3.us-west-2.amazonaws.com",
region: "us-west-2"
)
# Google Cloud Storage
Location.gcs("my-bucket", "/backups",
credentials: %{...}
)
# Azure Blob Storage
Location.azure("my-container", "/backups",
connection_string: "..."
)
Summary
Functions
Create Azure location.
Get storage backend type from location.
Create filesystem location.
Create GCS location.
Create S3 location.
Convert location to API format.
Types
Functions
@spec azure(String.t(), String.t(), keyword()) :: WeaviateEx.Backup.Location.Azure.t()
Create Azure location.
Options
:connection_string- Azure connection string
Examples
iex> Location.azure("my-container", "/backups")
%Location.Azure{container: "my-container", path: "/backups"}
Get storage backend type from location.
Examples
iex> Location.backend(Location.filesystem("/backups"))
:filesystem
iex> Location.backend(Location.s3("bucket", "/path"))
:s3
@spec filesystem(String.t()) :: WeaviateEx.Backup.Location.Filesystem.t()
Create filesystem location.
Examples
iex> Location.filesystem("/var/backups")
%Location.Filesystem{path: "/var/backups"}
@spec gcs(String.t(), String.t(), keyword()) :: WeaviateEx.Backup.Location.GCS.t()
Create GCS location.
Options
:project_id- GCP project ID:credentials- Service account credentials map
Examples
iex> Location.gcs("my-bucket", "/backups")
%Location.GCS{bucket: "my-bucket", path: "/backups"}
iex> Location.gcs("my-bucket", "/backups", project_id: "my-project")
%Location.GCS{bucket: "my-bucket", path: "/backups", project_id: "my-project"}
@spec s3(String.t(), String.t(), keyword()) :: WeaviateEx.Backup.Location.S3.t()
Create S3 location.
Options
:endpoint- S3 endpoint URL:region- AWS region:access_key_id- AWS access key ID:secret_access_key- AWS secret access key:use_ssl- Use SSL (default: true)
Examples
iex> Location.s3("my-bucket", "/backups")
%Location.S3{bucket: "my-bucket", path: "/backups", use_ssl: true}
iex> Location.s3("my-bucket", "/backups", region: "us-west-2")
%Location.S3{bucket: "my-bucket", path: "/backups", region: "us-west-2", use_ssl: true}
Convert location to API format.
Examples
iex> Location.to_api(Location.filesystem("/backups"))
%{path: "/backups"}
iex> Location.to_api(Location.s3("bucket", "/path"))
%{bucket: "bucket", path: "/path", useSSL: true}