You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
676 B
Go

package influxdb
import (
_ "fmt"
_ "github.com/influxdata/influxdb-client-go/v2"
)
type DBClient struct {
URL string
Bucket string
Token string
// Client *influxdb2.Client
}
type DBAdmin struct {
// struct for admin methods
*DBClient
}
func NewDBClient(url, bucket, token string) *DBClient {
db := &DBClient{URL:url, Bucket:bucket, Token:token}
return db
}
func NewDBAdmin(url, bucket, token string) *DBAdmin {
admin := &DBAdmin{}
admin.DBClient = NewDBClient(url, bucket, token)
return admin
}
// base level funcs
func (d *DBClient) Start() {
// connect to DB
// d.Client = influxdb2.NewClient(d.URL,d.Token)
}