Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authDB/blame/commit/e064ef3af167aff4ae1fc90576ee7bdb87ba4c24/internal/transport/arango/client.go You should set ROOT_URL correctly, otherwise the web may not work correctly.

32 lines
522 B

2 years ago
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,
}
}