Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ozanmakes/storage-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storage GO

Golang client for Supabase Storage API

Quick start

Install

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

Usage

package main

import (
	"fmt"
	"os"

	"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

	file, err := os.Open("dummy.txt")
	if err != nil {
		panic(err)
	}

	resp := client.UploadFile("bucket-name", "file.txt", file)
	fmt.Println(resp)
}

Note to self: Update after tagging: GOPROXY=proxy.golang.org go list -m github.com/supabase-community/[email protected]

About

Storage util client for Supabase in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%