Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CwtchPeer ¶
type CwtchPeer interface { Init(event.Manager) AutoHandleEvents(events []event.Type) PeerWithOnion(string) InviteOnionToGroup(string, string) error SendMessageToPeer(string, string) string TrustPeer(string) error BlockPeer(string) error UnblockPeer(string) error AcceptInvite(string) error RejectInvite(string) DeleteContact(string) DeleteGroup(string) JoinServer(string) SendMessageToGroup(string, string) error SendMessageToGroupTracked(string, string) (string, error) GetProfile() *model.Profile GetPeerState(string) connections.ConnectionState StartGroup(string) (string, []byte, error) ImportGroup(string) error ExportGroup(string) (string, error) GetGroup(string) *model.Group GetGroupState(string) connections.ConnectionState GetGroups() []string AddContact(nick, onion string, trusted bool) GetContacts() []string GetContact(string) *model.PublicProfile SetAttribute(string, string) GetAttribute(string) (string, bool) SetContactAttribute(string, string, string) GetContactAttribute(string, string) (string, bool) SetGroupAttribute(string, string, string) GetGroupAttribute(string, string) (string, bool) Listen() StartPeersConnections() StartGroupConnections() Shutdown() }
CwtchPeer provides us with a way of testing systems built on top of cwtch without having to directly implement a cwtchPeer.
func FromProfile ¶
FromProfile generates a new peer from a profile.
func NewCwtchPeer ¶
NewCwtchPeer creates and returns a new cwtchPeer with the given name.
Click to show internal directories.
Click to hide internal directories.