-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Generator for API functions Added a quick and dirty generator that takes a <package>/client.go file and turns each of the <package>.Client methods into functions. This allows us to automatically generate package-level functions for each API operation. We write the Client methods and then call go generate to handle creating API operations on the package. As an example, let's say we have a domain package and a domain.Client, which supports a Create method. Usage would then be domain.NewClient().Create() When we run go generate for all packages, we'll also get a domain.Create() function which calls the Client method under the hood. * feat: Clients for API operations Up until now, our SDK offered only one way to perform API operations. That is package level functions like actortoken.Create(). These package-level functions would use a global Backend to send requests to the Clerk API. This design works well for most cases, but is a bit inflexible. The existence of a global Backend means that there's no way to configure individual API operations (override secret key, url, HTTP client). We now provide an alternative API, which uses clients with a dedicated Backend for each individual API.
- Loading branch information
Showing
9 changed files
with
383 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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
Oops, something went wrong.