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

31 lines
522 B

package arango_db
import (
"context"
"log"
driver "github.com/arangodb/go-driver"
)
type Client struct {
ctx context.Context
conn *Connection
driver.Client
}
func NewClient(ctx context.Context, conn *Connection, user string, password string) *Client {
client, err := driver.NewClient(driver.ClientConfig{
Connection: conn.conn,
Authentication: driver.BasicAuthentication(user, password),
})
if err != nil {
log.Fatal(err)
}
return &Client{
ctx: ctx,
conn: conn,
Client: client,
}
}