Closed cesarvspr closed 2 years ago
I found the solution on dashboard SDK
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/influxdata/influxdb-client-go/v2"
)
func main() {
// Create a client
// You can generate an API Token from the "API Tokens Tab" in the UI
client := influxdb2.NewClient("https://europe-west1-1.gcp.cloud2.influxdata.com", os.Getenv("INFLUX_TOKEN"))
// always close client at the end
defer client.Close()
}
How to use this lib with a Influx Db Cloud like
https://europe-west1-1.gcp.cloud2.influxdata.com/
the cloud dashboard gives me a token, but the go client asks for the user and password.