Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
mobile
iOS
Elixxir dApps SDK Swift
Commits
ec6c667c
Commit
ec6c667c
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add MultiLookupUD function wrapper
parent
9383977d
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!90
Update Bindings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/XXClient/Functions/MultiLookupUD.swift
+57
-0
57 additions, 0 deletions
Sources/XXClient/Functions/MultiLookupUD.swift
with
57 additions
and
0 deletions
Sources/XXClient/Functions/MultiLookupUD.swift
0 → 100644
+
57
−
0
View file @
ec6c667c
import
Bindings
import
XCTestDynamicOverlay
public
struct
MultiLookupUD
{
public
struct
Params
:
Equatable
{
public
init
(
e2eId
:
Int
,
udContact
:
Data
,
lookupIds
:
[
Data
],
singleRequestParams
:
Data
=
GetSingleUseParams
.
liveDefault
()
)
{
self
.
e2eId
=
e2eId
self
.
udContact
=
udContact
self
.
lookupIds
=
lookupIds
self
.
singleRequestParams
=
singleRequestParams
}
public
var
e2eId
:
Int
public
var
udContact
:
Data
public
var
lookupIds
:
[
Data
]
public
var
singleRequestParams
:
Data
}
public
var
run
:
(
Params
,
UdMultiLookupCallback
)
throws
->
Void
public
func
callAsFunction
(
params
:
Params
,
callback
:
UdMultiLookupCallback
)
throws
->
Void
{
try
run
(
params
,
callback
)
}
}
extension
MultiLookupUD
{
public
static
func
live
()
->
MultiLookupUD
{
MultiLookupUD
{
params
,
callback
in
var
error
:
NSError
?
let
result
=
BindingsMultiLookupUD
(
params
.
e2eId
,
params
.
udContact
,
callback
.
makeBindingsUdMultiLookupCallback
(),
try
JSONEncoder
()
.
encode
(
params
.
lookupIds
),
params
.
singleRequestParams
,
&
error
)
if
let
error
=
error
{
throw
error
}
guard
result
else
{
fatalError
(
"BindingsMultiLookupUD returned `false` without providing error"
)
}
}
}
}
extension
MultiLookupUD
{
public
static
let
unimplemented
=
MultiLookupUD
(
run
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
)
)
}
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