Documentation ¶
Overview ¶
Package groups implements a group-model of communication on top of the AirDispatch protocol. It is implemented in the Melange source code to show that it is truly the client's interpretation of how Group-based messaging should exist, independent of how AirDispatch sees the world.
Index ¶
- type Group
- func (g *Group) Delete() error
- func (g *Group) GetMessages(since uint64) ([]*message.Mail, error)
- func (g *Group) Invite(user string, rekey bool) error
- func (g *Group) Kick(user string) error
- func (g *Group) Leave(user *identity.Identity, alert bool) error
- func (g *Group) PostMessage(msg *message.Mail, sender *identity.Identity) (string, error)
- func (g *Group) RemoveMessage(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func CreateGroup ¶
func CreateGroup( name string, owner *identity.Identity, server *identity.Address, r routing.Router, memberString ...string, ) (*Group, error)
CreateGroup will create a new Melange group on a server.
It performs the following sequence of actions: 1. Generate a new identity. 2. Register the identity with a server. 3. Choose a random symmetric key to use for group messages. 4. Send invitations to each original member:
- Signed by the group creator
- Signed by the group identity
- Containing the group identity
- Containing the symmetric key
func CreateGroupFromInvitation ¶
CreateGroupFromInvitation will create a Group object for use.
func RequestJoinGroup ¶
func (*Group) Delete ¶
Delete will deregister a group (identity) from a server thus deleting all of its messages.
func (*Group) GetMessages ¶
GetMessages will download all messages from a group in order to display them to the user. Remember that all group communication is considered "public" so we will utilize the RetrievePublicMail method.
func (*Group) PostMessage ¶
PostMessage will post an AirDispatch message to a specific Melange group. Specifically, it will do the following.
1. Sign the message with the keys of the group and the author. 2. Encrypt the message with the current group identity / key. 3. Publish the message as "public" from the group identity.
func (*Group) RemoveMessage ¶
RemoveMessageFromGroup will remove an AirDispatch message from a group.