Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
9ec04cb7
Commit
9ec04cb7
authored
Jul 18, 2019
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
ITS ALIVE
parent
89872e8c
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/client.go
+3
-1
3 additions, 1 deletion
api/client.go
bindings/client.go
+2
-1
2 additions, 1 deletion
bindings/client.go
bindings/client_test.go
+85
-28
85 additions, 28 deletions
bindings/client_test.go
with
90 additions
and
30 deletions
api/client.go
+
3
−
1
View file @
9ec04cb7
...
@@ -208,6 +208,8 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
...
@@ -208,6 +208,8 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
privateKey
:=
params
.
PrivateKeyGen
(
rand
.
Reader
)
privateKey
:=
params
.
PrivateKeyGen
(
rand
.
Reader
)
publicKey
:=
privateKey
.
PublicKeyGen
()
publicKey
:=
privateKey
.
PublicKeyGen
()
fmt
.
Println
(
"gened private keys"
)
// Handle precanned registration
// Handle precanned registration
if
preCan
{
if
preCan
{
var
successLook
bool
var
successLook
bool
...
@@ -295,7 +297,7 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
...
@@ -295,7 +297,7 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
// Disconnect from regServer here since it will not be needed
// Disconnect from regServer here since it will not be needed
(
cl
.
comm
)
.
(
*
io
.
Messaging
)
.
Comms
.
Disconnect
(
cl
.
ndf
.
Registration
.
Address
)
(
cl
.
comm
)
.
(
*
io
.
Messaging
)
.
Comms
.
Disconnect
(
cl
.
ndf
.
Registration
.
Address
)
}
}
fmt
.
Println
(
"passed reg"
)
// Loop over all Servers
// Loop over all Servers
for
_
,
gateway
:=
range
cl
.
ndf
.
Gateways
{
for
_
,
gateway
:=
range
cl
.
ndf
.
Gateways
{
...
...
This diff is collapsed.
Click to expand it.
bindings/client.go
+
2
−
1
View file @
9ec04cb7
...
@@ -8,6 +8,7 @@ package bindings
...
@@ -8,6 +8,7 @@ package bindings
import
(
import
(
"errors"
"errors"
"fmt"
"gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/parse"
"gitlab.com/elixxir/client/parse"
...
@@ -123,7 +124,7 @@ func (cl *Client) Connect() error {
...
@@ -123,7 +124,7 @@ func (cl *Client) Connect() error {
// gwAddressesList is CSV of gateway addresses
// gwAddressesList is CSV of gateway addresses
// grp is the CMIX group needed for keys generation in JSON string format
// grp is the CMIX group needed for keys generation in JSON string format
func
(
cl
*
Client
)
Register
(
preCan
bool
,
registrationCode
,
nick
,
email
string
)
([]
byte
,
error
)
{
func
(
cl
*
Client
)
Register
(
preCan
bool
,
registrationCode
,
nick
,
email
string
)
([]
byte
,
error
)
{
fmt
.
Println
(
"calling client reg"
)
UID
,
err
:=
cl
.
client
.
Register
(
preCan
,
registrationCode
,
nick
,
email
)
UID
,
err
:=
cl
.
client
.
Register
(
preCan
,
registrationCode
,
nick
,
email
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
bindings/client_test.go
+
85
−
28
View file @
9ec04cb7
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment