|
1 | | -# supabase-go |
| 1 | +An isomorphic Go client for Supabase. |
| 2 | + |
| 3 | +## Features |
| 4 | + |
| 5 | +- [ ] Integration with [Supabase.Realtime](https://github.com/supabase-community/realtime-go) |
| 6 | + - Realtime listeners for database changes |
| 7 | +- [x] Integration with [Postgrest](https://github.com/supabase-community/postgrest-go) |
| 8 | + - Access your database using a REST API generated from your schema & database functions |
| 9 | +- [ ] Integration with [Gotrue](https://github.com/supabase-community/gotrue-go) |
| 10 | + - User authentication, including OAuth, email/password, and native sign-in |
| 11 | +- [ ] Integration with [Supabase Storage](https://github.com/supabase-community/storage-go) |
| 12 | + - Store files in S3 with additional managed metadata |
| 13 | +- [ ] Integration with [Supabase Edge Functions](https://github.com/supabase-community/functions-go) |
| 14 | + - Run serverless functions on the edge |
| 15 | + |
| 16 | +## Quickstart |
| 17 | + |
| 18 | +1. To get started, create a new project in the [Supabase Admin Panel](https://app.supabase.io). |
| 19 | +2. Grab your Supabase URL and Supabase Public Key from the Admin Panel (Settings -> API Keys). |
| 20 | +3. Initialize the client! |
| 21 | + |
| 22 | +_Reminder: `supabase-go` has some APIs that require the `service_key` rather than the `public_key` (for instance: the administration of users, bypassing database roles, etc.). If you are using the `service_key` **be sure it is not exposed client side.** Additionally, if you need to use both a service account and a public/user account, please do so using a separate client instance for each._ |
| 23 | + |
| 24 | +## Documentation |
| 25 | + |
| 26 | +### Get Started |
| 27 | +First of all, you need to install the library: |
| 28 | +```sh |
| 29 | + go install github.com/supabase-community/supabase-go |
| 30 | +``` |
| 31 | + |
| 32 | +Then you can use |
| 33 | +```go |
| 34 | + client, err := supabase.NewClient(API_URL, API_KEY, nil) |
| 35 | + if err != nil { |
| 36 | + fmt.Println("cannot initalize client", err) |
| 37 | + } |
| 38 | + data, count, err := client.From("countries").Select("*", "exact", false).Execute() |
| 39 | +``` |
0 commit comments