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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
23f48c68
"...ElixxirDAppsSDK/Connection/Functors/ConnectionSend.swift" did not exist on "28f7f025856ddee14db937cace42c15c5c6ec080"
Commit
23f48c68
authored
2 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
add some e2e.Handler bindings
parent
792fba01
No related branches found
No related tags found
1 merge request
!510
Release
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/e2eHandler.go
+17
-6
17 additions, 6 deletions
bindings/e2eHandler.go
with
17 additions
and
6 deletions
bindings/e2eHandler.go
+
17
−
6
View file @
23f48c68
...
...
@@ -89,23 +89,34 @@ func (e *E2e) RemoveService(tag string) error {
// parameters - encrypted with end-to-end encryption.
// Default parameters can be retrieved through
func
(
e
*
E2e
)
SendE2E
(
messageType
int
,
recipientId
,
payload
,
e2eParams
[]
byte
)
([]
byte
,
[]
byte
,
int64
,
error
)
{
e2eParams
[]
byte
)
([]
byte
,
error
)
{
params
:=
e2e
.
GetDefaultParams
()
err
:=
params
.
UnmarshalJSON
(
e2eParams
)
if
err
!=
nil
{
return
nil
,
nil
,
0
,
err
return
nil
,
err
}
recipient
,
err
:=
id
.
Unmarshal
(
recipientId
)
if
err
!=
nil
{
return
nil
,
nil
,
0
,
err
return
nil
,
err
}
roundIds
,
messageId
,
ts
,
err
:=
e
.
api
.
GetE2E
()
.
SendE2E
(
catalog
.
MessageType
(
messageType
),
recipient
,
payload
,
params
)
if
err
!=
nil
{
return
nil
,
nil
,
0
,
err
return
nil
,
err
}
convertedRids
,
err
:=
json
.
Marshal
(
roundIds
)
return
convertedRids
,
messageId
[
:
],
ts
.
UnixNano
(),
err
result
:=
SendE2eResults
{
roundIds
:
roundIds
,
messageId
:
messageId
.
Marshal
(),
ts
:
ts
.
UnixNano
(),
}
return
json
.
Marshal
(
result
)
}
// SendE2eResults is the return type for SendE2e
type
SendE2eResults
struct
{
roundIds
[]
id
.
Round
messageId
[]
byte
ts
int64
}
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