March 31, 2023

Bringing back the HarperDB Go SDK

Welcome to Community Posts
Click below to read the full article.
Summary of What to Expect
Table of Contents
  1. Import the HarperDB Go SDK into your project by adding the following code: import "".
  2. Establish a connection to your HarperDB instance by creating a new instance of the Client struct: client := harperdb.NewClient("http://localhost:9925", "HDB_ADMIN", "password").
  3. Execute queries against your database using the SDK. For example, create a Schema with the CreateSchema method: err := client.CreateSchema("testschema"). You can also view and drop the Schema using ViewSchema and DropSchema.
  4. Manage users, roles, and more with the SDK. Examples include listing users, adding a new user, altering a user, and dropping a user.
  5. Query information about the current user performing the queries using client.UserInfo().
  6. Configure routes with the SDK, which allows dynamic reconfiguration of the server. Set and unset routes using client.SetRoutes(OpSetRoutes{Server: "hdb1", Routes: routes}) and client.DeleteRoutes(routes).
  7. The SDK will initially focus on operations and management API endpoints but will expand to support the entire API surface in the future.
  8. Find the HarperDB Go SDK on the HarperDB GitHub repository. Import it into your project and refer to the documentation for usage instructions.
  9. The re-instatement of the HarperDB Go SDK provides an easier way for developers using Go to interact with HarperDB and build scalable applications. Follow the steps outlined in the blog post to start using the new SDK.
  10. Stay updated for future releases, including the introduction of the alpha-release of the Terraform provider.
  11. Access the HarperDB Go SDK on the HarperDB GitHub repository and check out the documentation for usage details and additional features.
  12. The availability of the Go SDK makes it convenient for Go developers to work with HarperDB and create reliable applications. Explore the SDK and refer to the HarperDB blog for more information and reasons to try it.

The HarperDB Go SDK can be found in GitHub. With the SDK, it’s now easier than ever to interact with HarperDB and build scalable, secure, and reliable applications.