Update go client
What does this PR do?
Adding chunking support to go SDK
Fixes #8
Test Plan
Test storage.CreateFile and functions.CreateDeployment endpoints
Related PRs and Issues
- #8
- https://github.com/appwrite/sdk-generator/pull/16
Have you read the Contributing Guidelines on issues?
Yes
@lohanidamodar This isn't complete but before I complete this could you check https://github.com/Suven-p/sdk-for-go/blob/7123c8348cb6360a0db1dfa6ba5831c5c8435579/databases/databases.go#L31 to see if it is a good idea. The usage for optional parameters is database.List(databases.WithListQuery([queries]), databases.WithListSearch("Search term"). This gets very verbose with
WithCreateCollectionPermissions([]interface{}{
appwrite.NewPermission().Read(appwrite.NewRole().any()),
appwrite.NewPermission().Write(appwrite.NewRole().any())
})
and this is a single argument to CreateCollection endpoint.
@lohanidamodar This isn't complete but before I complete this could you check Suven-p/sdk-for-go@
7123c83/databases/databases.go#L31 to see if it is a good idea. The usage for optional parameters isdatabase.List(databases.WithListQuery([queries]), databases.WithListSearch("Search term"). This gets very verbose withWithCreateCollectionPermissions([]interface{}{ appwrite.NewPermission().Read(appwrite.NewRole().any()), appwrite.NewPermission().Write(appwrite.NewRole().any()) })and this is a single argument to CreateCollection endpoint.
@Suven-p I'm completely new to Go ecosystem and don't completely understand what do you mean. Can you share some perspective. Also we would love to keep syntax close to Platform (i.e GO lang) standards and possibly consistent with existing SDKs whenever possible. Share some more perspective and what's the common standards of Golang, and let me know how I can help.
@lohanidamodar This should be done now. I am not sure how to test this since there are a lot of routes. Are the default tests sufficient?
For the directory structure, I am following the standard library@https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/go.mod ie one module with many packages organized by directory.
For optional parameters, I am following this article.
The test case for last commit fails due to https://github.com/appwrite/appwrite/issues/5392 Should the end byte be set to the correct value (size -1)?