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
a59b02b2
Commit
a59b02b2
authored
2 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
Xx 4117/group membership documentation
parent
4cd1cdce
No related branches found
No related tags found
2 merge requests
!510
Release
,
!358
Xx 4117/group membership documentation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/group.go
+26
-7
26 additions, 7 deletions
bindings/group.go
with
26 additions
and
7 deletions
bindings/group.go
+
26
−
7
View file @
a59b02b2
...
...
@@ -46,15 +46,15 @@ func (ut *groupTracker) make(g gs.Group) *Group {
ut
.
mux
.
Lock
()
defer
ut
.
mux
.
Unlock
()
id
:=
ut
.
count
utID
:=
ut
.
count
ut
.
count
++
ut
.
tracked
[
id
]
=
&
Group
{
ut
.
tracked
[
utID
]
=
&
Group
{
g
:
g
,
id
:
id
,
id
:
utID
,
}
return
ut
.
tracked
[
id
]
return
ut
.
tracked
[
utID
]
}
// get a Group from the groupChatTracker given its ID.
...
...
@@ -148,7 +148,7 @@ func (g *GroupChat) MakeGroup(
}
// Construct group
grp
,
rounds
,
status
,
err
:=
g
.
m
.
MakeGroup
(
members
,
name
,
message
)
grp
,
round
ID
s
,
status
,
err
:=
g
.
m
.
MakeGroup
(
members
,
name
,
message
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -156,7 +156,7 @@ func (g *GroupChat) MakeGroup(
// Construct the group report
report
:=
GroupReport
{
Id
:
grp
.
ID
.
Bytes
(),
RoundsList
:
makeRoundsList
(
rounds
...
),
RoundsList
:
makeRoundsList
(
round
ID
s
...
),
Status
:
int
(
status
),
}
...
...
@@ -365,7 +365,26 @@ func (g *Group) GetCreatedMS() int64 {
// All subsequent members are ordered by their ID.
//
// Returns:
// - []byte - a JSON marshalled version of the member list.
// - []byte - JSON marshalled [group.Membership], which is an array of
// [group.Member].
//
// Example JSON [group.Membership] return:
// [
// {
// "ID": "U4x/lrFkvxuXu59LtHLon1sUhPJSCcnZND6SugndnVID",
// "DhKey": {
// "Value": 3534334367214237261,
// "Fingerprint": 16801541511233098363
// }
// },
// {
// "ID": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD",
// "DhKey": {
// "Value": 7497468244883513247,
// "Fingerprint": 16801541511233098363
// }
// }
// ]
func
(
g
*
Group
)
GetMembership
()
([]
byte
,
error
)
{
return
json
.
Marshal
(
g
.
g
.
Members
)
}
...
...
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