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
c43ec974
Commit
c43ec974
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add GroupChatMakeGroup functor
parent
0f4cb344
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!102
Release 1.0.0
,
!25
Update Bindings
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/ElixxirDAppsSDK/GroupChat/Functors/GroupChatMakeGroup.swift
+33
-0
33 additions, 0 deletions
...ixxirDAppsSDK/GroupChat/Functors/GroupChatMakeGroup.swift
Sources/ElixxirDAppsSDK/GroupChat/GroupChat.swift
+3
-0
3 additions, 0 deletions
Sources/ElixxirDAppsSDK/GroupChat/GroupChat.swift
with
36 additions
and
0 deletions
Sources/ElixxirDAppsSDK/GroupChat/Functors/GroupChatMakeGroup.swift
0 → 100644
+
33
−
0
View file @
c43ec974
import
Bindings
import
XCTestDynamicOverlay
public
struct
GroupChatMakeGroup
{
public
var
run
:
([
Data
],
Data
?,
Data
?)
throws
->
GroupReport
public
func
callAsFunction
(
membership
:
[
Data
],
message
:
Data
?,
name
:
Data
?
)
throws
->
GroupReport
{
try
run
(
membership
,
message
,
name
)
}
}
extension
GroupChatMakeGroup
{
public
static
func
live
(
_
bindingsGroupChat
:
BindingsGroupChat
)
->
GroupChatMakeGroup
{
GroupChatMakeGroup
{
membership
,
message
,
name
in
let
reportData
=
try
bindingsGroupChat
.
makeGroup
(
try
JSONEncoder
()
.
encode
(
membership
),
message
:
message
,
name
:
name
)
return
try
GroupReport
.
decode
(
reportData
)
}
}
}
extension
GroupChatMakeGroup
{
public
static
let
unimplemented
=
GroupChatMakeGroup
(
run
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
)
)
}
This diff is collapsed.
Click to expand it.
Sources/ElixxirDAppsSDK/GroupChat/GroupChat.swift
+
3
−
0
View file @
c43ec974
...
@@ -3,6 +3,7 @@ import Bindings
...
@@ -3,6 +3,7 @@ import Bindings
public
struct
GroupChat
{
public
struct
GroupChat
{
public
var
getGroup
:
GroupChatGetGroup
public
var
getGroup
:
GroupChatGetGroup
public
var
getGroups
:
GroupChatGetGroups
public
var
getGroups
:
GroupChatGetGroups
public
var
makeGroup
:
GroupChatMakeGroup
public
var
joinGroup
:
GroupChatJoinGroup
public
var
joinGroup
:
GroupChatJoinGroup
public
var
leaveGroup
:
GroupChatLeaveGroup
public
var
leaveGroup
:
GroupChatLeaveGroup
public
var
numGroups
:
GroupChatNumGroups
public
var
numGroups
:
GroupChatNumGroups
...
@@ -15,6 +16,7 @@ extension GroupChat {
...
@@ -15,6 +16,7 @@ extension GroupChat {
GroupChat
(
GroupChat
(
getGroup
:
.
live
(
bindingsGroupChat
),
getGroup
:
.
live
(
bindingsGroupChat
),
getGroups
:
.
live
(
bindingsGroupChat
),
getGroups
:
.
live
(
bindingsGroupChat
),
makeGroup
:
.
live
(
bindingsGroupChat
),
joinGroup
:
.
live
(
bindingsGroupChat
),
joinGroup
:
.
live
(
bindingsGroupChat
),
leaveGroup
:
.
live
(
bindingsGroupChat
),
leaveGroup
:
.
live
(
bindingsGroupChat
),
numGroups
:
.
live
(
bindingsGroupChat
),
numGroups
:
.
live
(
bindingsGroupChat
),
...
@@ -28,6 +30,7 @@ extension GroupChat {
...
@@ -28,6 +30,7 @@ extension GroupChat {
public
static
let
unimplemented
=
GroupChat
(
public
static
let
unimplemented
=
GroupChat
(
getGroup
:
.
unimplemented
,
getGroup
:
.
unimplemented
,
getGroups
:
.
unimplemented
,
getGroups
:
.
unimplemented
,
makeGroup
:
.
unimplemented
,
joinGroup
:
.
unimplemented
,
joinGroup
:
.
unimplemented
,
leaveGroup
:
.
unimplemented
,
leaveGroup
:
.
unimplemented
,
numGroups
:
.
unimplemented
,
numGroups
:
.
unimplemented
,
...
...
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