Supabase.Storage.Behaviour behaviour (supabase_storage v0.4.2)

Defines Supabase Storage Client callbacks

Summary

Types

bucket_id()

@type bucket_id() :: String.t()

conn()

@type conn() :: Supabase.Client.t()

Callbacks

create_bucket(conn, bucket_id, map)

@callback create_bucket(conn(), bucket_id(), map()) :: Supabase.result(:created)

delete_bucket(conn, bucket_id)

@callback delete_bucket(conn(), bucket_id()) :: Supabase.result(:deleted)

empty_bucket(conn, bucket_id)

@callback empty_bucket(conn(), bucket_id()) :: Supabase.result(:emptied)

from(conn, bucket_id)

@callback from(conn(), bucket_id()) :: Supabase.Storage.t()

get_bucket(conn, bucket_id)

@callback get_bucket(conn(), bucket_id()) :: Supabase.result(Supabase.Storage.Bucket.t())

list_buckets(conn)

@callback list_buckets(conn()) :: Supabase.result([Supabase.Storage.Bucket.t()])

update_bucket(conn, bucket_id, map)

@callback update_bucket(conn(), bucket_id(), map()) :: Supabase.result(:updated)