GitHub - supabase-community/storage-go: Storage util client for Supabase in Go (original) (raw)

Storage GO

This library is a Golang client for the Supabase Storage API. It's a collection of helper functions that help you manage your buckets through the API.

Quick start guide

Install

go get github.com/supabase-community/storage-go

Connecting to the storage backend

package main

import ( "fmt" "log" "os"

storage_go "github.com/supabase-community/storage-go"

)

func main() { storageClient := storage_go.NewClient("https://.supabase.co/storage/v1", "", nil) }

Handling resources

Handling Storage Buckets

Handling Files

fileBody := ... // load your file here

result, err := storageClient.UploadFile("test", "test.txt", fileBody)

Note: The upload method also accepts a map of optional parameters.

Note: The list method also accepts a map of optional parameters.

License