MariaDB SkySQL DBaaS API Golang SDK

Overview

The MariaDB SkySQL DBaaS API Golang SDK allows Go applications to create, monitor, and delete database services in MariaDB SkySQL.

The MariaDB SkySQL DBaaS API Golang SDK is a Technical Preview. Software in Tech Preview should not be used for production workloads.

Alternatively, SkySQL services can be managed interactively using your web browser and the SkySQL Portal.

Compatibility

  • Distributed Transactions

  • Multi-Node Analytics

  • Replicated Transactions

  • Single Node Analytics

  • Single Node Transactions

Installation

Go can automatically download the SkySQL DBaaS API Golang SDK if a dependency is added to your Go project.

Add the module as a dependency to your Go project's go.mod file using the require_ directive:

require (
   github.com/mariadb-corporation/skysql-api-go v0.0.22
)

Authentication and Authorization

The MariaDB SkySQL DBaaS API requires authentication and authorization.

To authenticate and authorize with the API, perform the following procedure:

  1. Sign up for SkySQL

  2. Obtain a SkySQL API Key

  3. Your Go application must use the API key to request a bearer token.

  1. Your Go application must use the bearer token to authenticate for API requests:

    • The Authorization header must be in the format Authorization: Bearer SKYSQL_BEARER_TOKEN, where SKYSQL_BEARER_TOKEN is the bearer token.