Skip to content

cautodev/storage-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

storage-rs

Rust Client library to interact with Supabase Storage.

⚠️ WARNING
WARNING: This script is not ready for production use.

Installation

To install simple run the following command:

cargo add storage-supabase

or add the following to your Cargo.toml file:

[dependencies]
storage-supabase = "0.1.0"

Usage

Add use statement to your code:

use storage_supabase::StorageClient;

Then that's it! You can now use the StorageClient to interact with Supabase Storage.

Example

Here is an example of how to list all the buckets in your Supabase Storage asynchronously:

    let client = StorageClient::new("https://<your_project_id>.supabase.co", "<your_anon_key>");

    let bucket = client.list_buckets_async().await;

    match bucket {
        Ok(buckets) => {
            println!("Buckets: {:?}", buckets);
        },
        Err(e) => {
            println!("Error: {:?}", e);
        }
    } 

Releases

No releases published

Packages

No packages published

Languages