Skip to content

RedisLabs/rediscloud-go-api

Folders and files

NameName
Last commit message
Last commit date
Jul 15, 2024
Dec 3, 2024
Nov 3, 2020
Apr 17, 2025
Oct 29, 2020
Apr 3, 2025
Apr 11, 2025
Oct 29, 2020
Oct 29, 2020
Nov 5, 2020
Nov 11, 2020
Apr 3, 2025
Jan 23, 2025
Jan 4, 2023
Jun 22, 2023
Apr 3, 2025
May 17, 2024
Jul 8, 2024
Apr 25, 2024
Apr 17, 2025
May 15, 2024
Aug 28, 2024
Aug 28, 2024
Dec 3, 2024
Dec 3, 2024
Jul 15, 2024
Apr 23, 2024
Jan 23, 2025
Jun 27, 2023
Oct 30, 2023
Apr 10, 2025
Aug 28, 2024
Apr 15, 2024
Jan 14, 2022
Jul 19, 2024
Oct 30, 2023
Jan 23, 2025
Nov 23, 2020

Repository files navigation

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)
}