Skip to content
Back

Getting document data using Golang SDK

  • 0
  • General
  • Databases
Mousaab/eecharge
28 Feb, 2025, 10:04

Hi While using NodeJS sdk, you get document in form of js object with all attributes as members, in Go Sdk, I notice we got Document type/struct as return with only the following fields accessible: type Document struct { // Document ID. Id string json:"$id" // Collection ID. CollectionId string json:"$collectionId" // Database ID. DatabaseId string json:"$databaseId" // Document creation date in ISO 8601 format. CreatedAt string json:"$createdAt" // Document update date in ISO 8601 format. UpdatedAt string json:"$updatedAt" // Document permissions. Learn more about // permissions. Permissions []string json:"$permissions" } I am really stuck, I tried decode function but it couldnt get to work

All help is appreciated 🙂

TL;DR
Developers are having trouble accessing all document attributes in Golang SDK compared to NodeJS SDK. The SDK returns a Document type/struct with limited accessible fields. The decode function didn't work for them.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more