appwrite-go

Implements server-side Go applications using the Appwrite SDK for users, databases, storage, and functions.

4|Updated Feb 5, 2025
One-click install
npx skills add https://github.com/aniruddha81/Gaali-Finder-v2 --skill appwrite-go-aniruddha81
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appwrite-go
Source: https://github.com/aniruddha81/Gaali-Finder-v2/tree/main/.agents/skills/appwrite-go
Command: npx skills add https://github.com/aniruddha81/Gaali-Finder-v2 --skill appwrite-go-aniruddha81

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires github.com/appwrite/sdk-for-go, github.com/open-runtimes/types-for-go/v4.

What problem does it solve? Building Go backends against Appwrite requires knowing the correct SDK patterns—per-service packages, functional options, TablesDB versus legacy Databases, permission strings, and SSR session handling. This Skill provides working code patterns so you avoid deprecated APIs and common permission mistakes. ## Core Features & Use Cases - Service Operations: Covers users, TablesDB rows and columns, file storage, teams, and serverless function execution with the Go SDK. - SSR Authentication: Implements admin and session clients, email/password login, OAuth2 flows, and secure cookie handling for Go web frameworks. - Permissions & Errors: Shows permission/role string construction and structured AppwriteException error handling. - Use Case: You are building a Go API that stores user uploads in Appwrite Storage and rows in TablesDB; use this Skill to generate correct client setup, queries, and per-resource permissions. ## Quick Start Ask the AI to write Go code using the Appwrite SDK to create a table, insert a row with permissions, and upload a file to a storage bucket.

Frequently Asked Questions about appwrite-go

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up the Appwrite Go SDK client?

Install github.com/appwrite/sdk-for-go, then call client.New with functional options: WithEndpoint, WithProject, and WithKey using your API key. Each service (users, tablesdb, storage) is constructed from that client via its own New function.

How do I create and query rows in Appwrite with Go?

Use the tablesdb service, not the deprecated Databases class. Call CreateRow with a data map, and pass query helpers like query.Equal, query.Limit, or query.CursorAfter for filtering, sorting, and pagination.

Should I use Databases or TablesDB in the Appwrite Go SDK?

Use TablesDB for all new code; the Databases class is deprecated. Only use Databases when maintaining an existing codebase that already depends on it or when explicitly required.

How does SSR authentication work with Appwrite in Go?

Use two clients: an admin client with an API key to create sessions, and a per-request session client that reads the a_session_<PROJECT_ID> cookie. Set the cookie with HttpOnly, Secure, and SameSiteStrict flags after login.

Why do users get permission errors on Appwrite rows or files?

Appwrite grants no access by default; permissions must be set explicitly at the row/file level or inherited from table/bucket settings. Build them with helpers like permission.Read(role.User(id)) and avoid role.Any() with write permissions.

How do I handle Appwrite API errors in Go?

Use errors.As to unwrap the error into *apperr.AppwriteException, which exposes Message, HTTP Code, and Type fields. Common codes include 401 for invalid credentials, 404 for missing resources, and 429 for rate limits.