Skip to content

feat: add InsForge Go SDK#1

Open
Davidson3556 wants to merge 1 commit intoInsForge:mainfrom
Davidson3556:main
Open

feat: add InsForge Go SDK#1
Davidson3556 wants to merge 1 commit intoInsForge:mainfrom
Davidson3556:main

Conversation

@Davidson3556
Copy link
Copy Markdown

@Davidson3556 Davidson3556 commented Mar 28, 2026

Summary

  • Add Go SDK with full feature parity to the existing JavaScript SDK
  • Auth: sign up, sign in (password + OAuth), sign out, session refresh, profile management, email verification, password reset
  • Database: fluent PostgREST-style query builder (select/insert/update/delete with filters), RPC calls, raw SQL
  • Storage: upload (direct + S3 presigned multipart), download (direct + presigned), list, remove, public URLs
  • AI: chat completions (streaming + non-streaming), embeddings, image generation
  • Realtime: Socket.IO v4 WebSocket pub/sub with subscribe/publish/on/off/once
  • Functions: serverless edge function invocation with configurable HTTP methods
  • Email: transactional email sending

How did you test this change?

  • Go unit tests (insforge/): net/http/httptest in-process server covering Auth (sign up success/error, sign in token storage, sign out), Database (SELECT, INSERT, RPC), and Storage (public URL, list, remove)
  • Verified all endpoint paths and request/response field names against the JS SDK source and backend shared schemas
  • Verified backend route handlers to confirm filter passing, auth middleware, and PostgREST proxy behavior

Note

Add InsForge Go SDK with auth, database, storage, AI, realtime, functions, and email modules

  • Introduces a new Go module github.com/InsForge/insforge-go (Go 1.21) with a top-level Client that wires all service modules via a shared internal HTTP client.
  • Adds Auth with full user lifecycle flows (sign-up, sign-in, OAuth, session refresh, password reset); Database with a PostgREST-style query builder (select, filter, insert, update, delete, RPC); and Storage with bucket-scoped upload, download, list, and delete.
  • Adds AI with non-streaming and SSE streaming chat completions, embeddings, and image generation; Realtime using gorilla/websocket for pub/sub event handling; Functions for invoking edge functions; and Emails for sending transactional email.
  • All modules share a common InsForgeError type and a generic Result[T] for structured responses.
  • Basic tests for Auth, Database, and Storage are included using httptest servers.

Macroscope summarized 47c6c68.

Full-featured Go SDK for InsForge with feature parity to the JS SDK:

- Auth: sign up, sign in (password + OAuth), sign out, session refresh,
  profile management, email verification, password reset
- Database: fluent PostgREST-style query builder (select/insert/update/delete
  with filters), RPC calls, raw SQL
- Storage: upload (direct + S3 presigned multipart), download (direct +
  presigned), list, remove, public URLs
- AI: chat completions (streaming + non-streaming), embeddings, image generation
- Realtime: Socket.IO v4 WebSocket pub/sub with subscribe/publish/on/off/once
- Functions: serverless edge function invocation
- Email: transactional email sending

Includes unit tests for Auth, Database, and Storage modules.
@Davidson3556
Copy link
Copy Markdown
Author

@tonychang04 kindly review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant