-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add go sdk blogpost #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for developers-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| Each Open Payments resource has a dedicated service with methods that map directly to API operations: | ||
|
|
||
| - `client.WalletAddress.Get()`, `GetKeys()`, `GetDIDDocument()` |
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.
I think we don't have official support for GetDIDDocument so we can remove it
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.
i ended up removing this section https://github.com/interledger/interledger.org-developers/pull/181/files/1b08bd204e4a5536d687d921bb73c24820e2eaaa#r2699919966
|
|
||
| We're actively developing Open Payments Go and have exciting plans ahead: | ||
|
|
||
| - **Official documentation integration** — Open Payments docs will include Go examples alongside JavaScript, TypeScript, and PHP examples. |
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.
You can just directly say that Go lang snippets are now published in the docs
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.
Also, I suggest saying "alongside other languages." or "alongside other languages like..." since there will be (are) more langs.
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.
good call. changed to use less brittle phrasing and linked to the docs since they are published now. Also merged these final sections into a "Get Involved" section since "What's Next" didnt feel necessary anymore.
|
|
||
| // Initialize the authenticated client | ||
| client, err := openpayments.NewAuthenticatedClient( | ||
| "https://wallet.example.com/alice", // Your wallet address |
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.
Doesn't have to be "Your wallet address" specifically, just the one the client uses to identify itself
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.
removed
| | `httpsignatureutils` | HTTP signature creation and validation utilities | | ||
| | `test/integration` | Integration tests against Rafiki local and testnet environments | | ||
|
|
||
| ### Service-Oriented Architecture |
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.
Ditto above, but here we can probably redirect the users to the SDKs section in the docs instead of listing everything here.
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.
removed
|
|
||
| Open Payments Go is designed around Go idioms and best practices, making it feel natural for Go developers while handling the complexity of the Open Payments protocol. | ||
|
|
||
| ### Project Structure |
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.
I feel like this section will fit better in the actual README of the repository instead of the blog post, if someone wants to explore the project.
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.
yeah I agree... felt like I needed to get into the details of what it is somewhat but this is just too in-the-weeds.
I re-purposesd this section. I removed the project structure and methods, renamed to Under the Hood and framed it more as notable developer experience decisions. It still includes the HTTP Signatures Made Simple and Type-Safe Generated Types with OpenAPI Overlays which I think are important to highlight.
| | `generated/resourceserver` | Types generated from the Resource Server OpenAPI spec | | ||
| | `generated/walletaddressserver` | Types generated from the Wallet Address Server OpenAPI spec | | ||
| | `httpsignatureutils` | HTTP signature creation and validation utilities | | ||
| | `test/integration` | Integration tests against Rafiki local and testnet environments | |
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.
Should this reference also be to test wallet instead of testnet? Calling it out just in case.
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.
yes, but ended up removing.
|
|
||
| - **Type safety at compile time**: Catch integration errors before runtime with Go's strong typing and the SDK's generated types. | ||
|
|
||
| - **Battle-tested**: Comprehensive integration tests run against both local Rafiki environments and the Interledger testnet, ensuring real-world reliability. |
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.
Same here, testnet
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.
fixed
Co-authored-by: Max Kurapov <max@interledger.org>
Co-authored-by: Max Kurapov <max@interledger.org>
Co-authored-by: Max Kurapov <max@interledger.org>
PR Checklist
Fixes #123)bun run formatto ensure code is properly formattedbun run lintpasses without errorsSummary