gocqlastra

package module
v0.0.0-...-b8f66a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 8 Imported by: 0

README

gocqlastra

This is a wrapped of gocql to use with DataStax Astra. For more information, please go to see gocql document.

Usage

    go get github.com/sriio/gocqlastra@latest
    cluster, _ := gocqlastra.NewCluster("<<PATH/TO/>>secure-connect.zip")
    cluster.Authenticator = &gocql.PasswordAuthenticator{
        Username: "<<CLIENT ID>>",
        Password: "<<CLIENT SECRET>>",
    }
    session, _ := cluster.CreateSession()
    defer session.Close()

Credits

I have taken most of the code logic from the cassandra-driver project written in Javascript and rewrite it using Golang. And this is a wrapped of gocql. I will give credit to gocql. You don't need to use my package, but it can save your development time.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCluster

func NewCluster(secureConnectBundle string) (*gocql.ClusterConfig, error)

NewCluster generates a new config for the default cluster implementation and implemented required configuration for connecting to Astra Cassandra.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL