Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmvergara/supabase-go-tables
Generate Go structs from your Supabase tables
https://github.com/mmvergara/supabase-go-tables
golang supabase supabase-client supabase-go
Last synced: 4 days ago
JSON representation
Generate Go structs from your Supabase tables
- Host: GitHub
- URL: https://github.com/mmvergara/supabase-go-tables
- Owner: mmvergara
- License: mit
- Created: 2024-06-05T11:17:23.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-19T19:13:42.000Z (7 months ago)
- Last Synced: 2025-01-15T21:09:18.140Z (about 1 month ago)
- Topics: golang, supabase, supabase-client, supabase-go
- Language: HTML
- Homepage: https://mmvergara.github.io/supabase-go-tables/
- Size: 83 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Supabase Go Tables
Generate Go structs from your Supabase tables 🚀
## Generate Manually via API
**https://mmvergara.github.io/supabase-go-tables/**
## Generate Using CLI (Recommended)
### Installation
```bash
npm i -g supabase-go-tables
# or use any package manager
```### Usage
```bash
# run on root folder where .env file is present
npx supabase-go-tables
```Make sure that `SUPABASE_URL` and `SUPABASE_ANON_KEY` are set in your environment variables
This command will copy the generated Go structs to your clipboard.
### Sample Output
```go
type TableFormat struct {
profiles string
products string
}var Tables = TableFormat{
profiles: "profiles",
products: "products",
}// Then you can do
supabaseClient.From(Tables.profiles).Select("*").Execute()
```