Skip to content
Snippets Groups Projects
Commit 160601e4 authored by Jono Wenger's avatar Jono Wenger
Browse files

Merge remote-tracking branch 'origin/clientIntegration' into clientIntegration

# Conflicts:
#	main.go
parents c34d64fd aa004776
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,9 @@ package main ...@@ -2,7 +2,9 @@ package main
import ( import (
"gitlab.com/elixxir/client/api" "gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/interfaces/contact"
"gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/xx_network/primitives/utils"
"io/ioutil" "io/ioutil"
"gitlab.com/elixxir/client/single" "gitlab.com/elixxir/client/single"
"os" "os"
...@@ -101,3 +103,21 @@ func waitUntilConnected(connected chan bool) { ...@@ -101,3 +103,21 @@ func waitUntilConnected(connected chan bool) {
} }
}() }()
} }
func readBotContact() contact.Contact {
// Read from file
data, err := utils.ReadFile(botContactPath)
jww.INFO.Printf("Contact file size read in: %d bytes", len(data))
if err != nil {
jww.FATAL.Panicf("Failed to read contact file: %+v", err)
}
// Unmarshal contact
c, err := contact.Unmarshal(data)
if err != nil {
jww.FATAL.Panicf("Failed to unmarshal contact: %+v", err)
}
return c
}
\ No newline at end of file
...@@ -8,17 +8,21 @@ import ( ...@@ -8,17 +8,21 @@ import (
"time" "time"
) )
var password string var password = "password"
var session string var session = ".session"
var ndfPath string var ndfPath = "ndf.json"
var singleMngr *single.Manager var botContactPath = "botContact.bin"
var botContact contact.Contact var botContact contact.Contact
var singleMngr *single.Manager
var body *gowd.Element var body *gowd.Element
func main() { func main() {
//_, singleMngr = initClient() botContact = readBotContact()
_, singleMngr = initClient()
// creates a new bootstrap fluid container // creates a new bootstrap fluid container
body = bootstrap.NewContainer(false) body = bootstrap.NewContainer(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment