https://github.com/style77/appwrite-for-go
Appwrite SDK made in Go
https://github.com/style77/appwrite-for-go
appwrite appwrite-for-go appwrite-sdk baas go golang mbaas sdk
Last synced: 8 months ago
JSON representation
Appwrite SDK made in Go
- Host: GitHub
- URL: https://github.com/style77/appwrite-for-go
- Owner: style77
- License: mit
- Created: 2022-12-22T23:37:58.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T16:51:20.000Z (almost 3 years ago)
- Last Synced: 2025-01-30T18:11:13.242Z (8 months ago)
- Topics: appwrite, appwrite-for-go, appwrite-sdk, baas, go, golang, mbaas, sdk
- Language: Go
- Homepage: https://appwrite.io
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Appwrite Golang SDK
SDK for Appwrite in Golang (Go), a simple and secure API for your database, storage, functions, and more.The name of repository is based on the official Golang SDK name, which is `sdk-for-go`. However, I'm using `appwrite-for-go` to avoid confusion with my other repositories, and to get it listed in GitHub.
## Getting Started
### Installation
```bash
go get github.com/Style77/sdk-for-go
```### Usage
Simple usage for listing all the documents in a collection:
```go
package mainimport (
"fmt"
"github.com/Style77/sdk-for-go"
)func main() {
client := appwrite.NewClient()
client.SetEndpoint("http://localhost/v1") // Your API Endpoint
client.SetProject("") // Your project ID
client.SetKey("") // Your secret API key// Call any of the Appwrite services: for example, database
response, err := client.Database.ListDocuments("databaseId", "collectionId", nil) // List all the documents in the collectionif err != nil {
fmt.Println(err)
}fmt.Println(response)
}
```