Golang client for Supabase Storage API
Install
go get github.com/supabase-community/storage-go
Usage
package main
import (
"fmt"
"github.com/supabase-community/storage-go"
)
func main() {
client := storage_go.NewClient("https://abc.supabase.co/storage/v1", "<service-token>", nil)
// Get buckets
fmt.Println(client.ListBuckets())
// Upload a file
resp := client.UploadFile("bucket-name", "file.txt", []byte("hello world"))
fmt.Println(resp)
}