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
72a30d6a
Commit
72a30d6a
authored
May 25, 2021
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add API call for DeleteContact
parent
c436065e
No related branches found
No related tags found
1 merge request
!23
Release
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/client.go
+14
-0
14 additions, 0 deletions
api/client.go
with
14 additions
and
0 deletions
api/client.go
+
14
−
0
View file @
72a30d6a
...
@@ -541,6 +541,20 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) {
...
@@ -541,6 +541,20 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) {
return
numRegistered
,
len
(
nodes
),
nil
return
numRegistered
,
len
(
nodes
),
nil
}
}
// DeleteContact is a function which removes a partner from Client's storage
func
(
c
*
Client
)
DeleteContact
(
partnerId
*
id
.
ID
)
error
{
if
err
:=
c
.
storage
.
E2e
()
.
DeletePartner
(
partnerId
);
err
!=
nil
{
return
err
}
if
err
:=
c
.
storage
.
Auth
()
.
Delete
(
partnerId
);
err
!=
nil
{
return
err
}
// todo: find a way to clean partition up?
//c.storage.Partition().Clean()
return
nil
}
// ----- Utility Functions -----
// ----- Utility Functions -----
// parseNDF parses the initial ndf string for the client. do not check the
// parseNDF parses the initial ndf string for the client. do not check the
// signature, it is deprecated.
// signature, it is deprecated.
...
...
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