# README
rediscloud-go-api
This repository is a Go SDK for the Redis Cloud REST API.
Getting Started
Installing
You can use this module by using go get
to add it to either your GOPATH
workspace or
the project's dependencies.
go get github.com/RedisLabs/rediscloud-go-api
Example
This is an example of using the SDK
package main
import (
"context"
"fmt"
rediscloud_api "github.com/RedisLabs/rediscloud-go-api"
"github.com/RedisLabs/rediscloud-go-api/service/subscriptions"
)
func main() {
// The client will use the credentials from `REDISCLOUD_ACCESS_KEY` and `REDISCLOUD_SECRET_KEY` by default
client, err := rediscloud_api.NewClient()
if err != nil {
panic(err)
}
id, err := client.Subscription.Create(context.TODO(), subscriptions.CreateSubscription{
// ...
})
if err != nil {
panic(err)
}
fmt.Printf("Created subscription: %d", id)
}
# Functions
AdditionalUserAgent allows extra information to be appended to the user agent sent in all requests to the API.
Auth is used to set the authentication credentials - will otherwise default to using environment variables for the credentials.
BaseURL sets the URL to use for the API endpoint - will default to `https://api.redislabs.com/v1`.
Logger allows for a custom implementation to handle the debug log messages - defaults to using the Go standard log package.
LogRequests allows the logging of HTTP request and responses - will default to false (disabled).
No description provided by the author
Transporter allows the customisation of the RoundTripper used to communicate with the API - will default to the Go default.
# Constants
AccessKeyEnvVar is the environment variable that will be used for the access key by default.
SecretKeyEnvVar is the environment variable that will be used for the secret key by default.
Version is the release number of this SDK.
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author