Skip to content
Snippets Groups Projects
Commit e1710789 authored by sivan's avatar sivan
Browse files

add db

parent fe87f4e9
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ type GeneralFormat map[string]interface{} ...@@ -25,7 +25,7 @@ type GeneralFormat map[string]interface{}
func SendAQLQuery(AQLQuery string) (*[]byte, error) { func SendAQLQuery(AQLQuery string) (*[]byte, error) {
var queryResult []Document var queryResult []Document
conn, err := http.NewConnection(http.ConnectionConfig{ conn, err := http.NewConnection(http.ConnectionConfig{
Endpoints: []string{"http://arangodb.database.svc.cluster.local:8529"}, Endpoints: []string{"https://aae8f5c054da.arangodb.cloud:8529"},
}) })
if err != nil { if err != nil {
log.Println("could not connect to database") // Handle error log.Println("could not connect to database") // Handle error
...@@ -33,7 +33,7 @@ func SendAQLQuery(AQLQuery string) (*[]byte, error) { ...@@ -33,7 +33,7 @@ func SendAQLQuery(AQLQuery string) (*[]byte, error) {
} }
c, err := driver.NewClient(driver.ClientConfig{ c, err := driver.NewClient(driver.ClientConfig{
Connection: conn, Connection: conn,
Authentication: driver.BasicAuthentication("root", "DikkeDraak"), Authentication: driver.BasicAuthentication("root", "kXR0PFepIVm3EqgQ2MVc"),
}) })
if err != nil { if err != nil {
log.Println("Could not log in to the ArangoDB") // Handle error log.Println("Could not log in to the ArangoDB") // Handle error
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment