This repository was archived by the owner on Mar 17, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
docs: add sdk reference pages for node, python, go #54
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ Planetscale | |
| liquibase | ||
| allowlisting | ||
| cdktf | ||
| Presigned | ||
| presigned | ||
|
|
||
| # Defaults from mintlify | ||
| Mintlify | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| title: "Introduction" | ||
| description: "Language-specific SDK documentation for Suga" | ||
| --- | ||
|
|
||
| Suga automatically generates type-safe SDKs from your `suga.yaml` configuration. Define your infrastructure resources and access permissions once, then get pre-configured clients with only the methods your application needs. | ||
|
|
||
| ## Available Languages | ||
|
|
||
| <CardGroup cols={3}> | ||
| <Card title="Python" icon="python" href="/sdks/python" /> | ||
| <Card title="Node.js" icon="node-js" href="/sdks/node" /> | ||
| <Card title="Go" icon="golang" href="/sdks/go" /> | ||
| </CardGroup> | ||
|
|
||
| ## How It Works | ||
|
|
||
| 1. **Define resources and permissions** using the Suga editor: | ||
|
|
||
| ```bash | ||
| suga edit | ||
| ``` | ||
|
|
||
| Or manually in your `suga.yaml`: | ||
|
|
||
| ```yaml | ||
| buckets: | ||
| images: | ||
| access: | ||
| app: | ||
| - read | ||
| - write | ||
| ``` | ||
|
|
||
| 2. **Generate your SDK** with access already configured: | ||
|
|
||
| ```bash | ||
| suga generate --python --python-out ./client | ||
| ``` | ||
|
|
||
| 3. **Use pre-configured resources**: | ||
| ```python | ||
| client = SugaClient() | ||
| client.images.read("file.txt") | ||
| client.images.write("file.txt") | ||
| ``` | ||
|
|
||
| Your SDK automatically handles authentication, permissions, and environment differences. The same code works locally with `suga dev` and when deployed to the cloud. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| title: "Overview" | ||
| description: "Go SDK for Suga infrastructure resources" | ||
| --- | ||
|
|
||
| ## Generate SDK | ||
|
|
||
| Generate the Go client based on your `suga.yaml`: | ||
|
|
||
| ```yaml title="suga.yaml" | ||
| buckets: | ||
| image: | ||
| access: | ||
| app: | ||
| - read | ||
| - write | ||
| ``` | ||
|
|
||
| ```bash | ||
| suga generate --go --go-out ./suga --go-package-name suga | ||
| ``` | ||
|
|
||
| For all available options, see the [`suga generate`](/cli/generate) command documentation. | ||
|
|
||
| ## Import | ||
|
|
||
| ```go | ||
| import "example/suga" | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```go | ||
| // Initialize client | ||
| client, err := suga.NewClient() | ||
| if err != nil { | ||
| log.Fatal(err) | ||
| } | ||
|
|
||
| // Access your resources (names from your suga.yaml) | ||
| err = client.Image.Write("file.txt", []byte("data")) | ||
| content, err := client.Image.Read("file.txt") | ||
| ``` | ||
|
|
||
| ## Available Resources | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Storage" icon="database" href="/sdks/go/storage"> | ||
| Object storage operations - read, write, delete, list files | ||
| </Card> | ||
| </CardGroup> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Double-check icon keys for language groups.
Mintlify icon keys can be strict; please verify “node-js” and “golang” are valid.
🌐 Web query:
💡 Result:
Short answer
Recommended icon names
Sources
Use a custom SVG or URL for the Go icon. Font Awesome provides “python” and “node-js” out of the box, but there’s no official “golang” icon—update the Go group in docs/docs.json to reference a custom SVG or external URL.
🤖 Prompt for AI Agents