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
310e3973
Commit
310e3973
authored
Aug 5, 2022
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
allow nullable facts for ud.NewFromBackup in bindings
parent
ddaf72be
No related branches found
No related tags found
1 merge request
!510
Release
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/ud.go
+12
-8
12 additions, 8 deletions
bindings/ud.go
with
12 additions
and
8 deletions
bindings/ud.go
+
12
−
8
View file @
310e3973
...
...
@@ -144,8 +144,8 @@ func LoadOrNewUserDiscovery(e2eID int, follower UdNetworkStatus,
// Parameters:
// - e2eID - e2e object ID in the tracker
// - follower - network follower func wrapped in UdNetworkStatus
// - emailFactJson -
a
JSON marshalled email fact.Fact
// - phoneFactJson -
a
JSON marshalled phone fact.Fact
// - emailFactJson -
nullable
JSON marshalled email fact.Fact
// - phoneFactJson -
nullable
JSON marshalled phone fact.Fact
func
NewUdManagerFromBackup
(
e2eID
int
,
follower
UdNetworkStatus
,
emailFactJson
,
phoneFactJson
[]
byte
)
(
*
UserDiscovery
,
error
)
{
...
...
@@ -156,15 +156,19 @@ func NewUdManagerFromBackup(e2eID int, follower UdNetworkStatus, emailFactJson,
}
var
email
,
phone
fact
.
Fact
if
emailFactJson
!=
nil
{
err
=
json
.
Unmarshal
(
emailFactJson
,
&
email
)
if
err
!=
nil
{
return
nil
,
err
}
}
if
phoneFactJson
!=
nil
{
err
=
json
.
Unmarshal
(
phoneFactJson
,
&
phone
)
if
err
!=
nil
{
return
nil
,
err
}
}
UdNetworkStatusFn
:=
func
()
xxdk
.
Status
{
return
xxdk
.
Status
(
follower
.
UdNetworkStatus
())
...
...
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