Documentation
¶
Index ¶
- Constants
- type Functionality
- func (f *Functionality) EventsToRegister() []event.Type
- func (f *Functionality) ExperimentsToRegister() []string
- func (f *Functionality) GetServerInfo(profile peer.CwtchPeer, serverOnion string) Server
- func (f *Functionality) GetServerInfoList(profile peer.CwtchPeer) []Server
- func (f *Functionality) NotifySettingsUpdate(settings settings.GlobalSettings)
- func (f *Functionality) OnContactReceiveValue(profile peer.CwtchPeer, conversation model.Conversation, ...)
- func (f *Functionality) OnContactRequestValue(profile peer.CwtchPeer, conversation model.Conversation, eventID string, ...)
- func (f *Functionality) OnEvent(ev event.Event, profile peer.CwtchPeer)
- func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer)
- type Server
- type ServerKey
- type SyncStatus
Constants ¶
const ( // ServerList is a json encoded list of servers ServerList = event.Field("ServerList") )
const ( // UpdateServerInfo is an event containing a ProfileOnion and a ServerList UpdateServerInfo = event.Type("UpdateServerInfo") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Functionality ¶
type Functionality struct { }
Functionality groups some common UI triggered functions for contacts...
func FunctionalityGate ¶
func FunctionalityGate() *Functionality
FunctionalityGate returns filesharing functionality - gates now happen on function calls.
func (*Functionality) EventsToRegister ¶
func (f *Functionality) EventsToRegister() []event.Type
func (*Functionality) ExperimentsToRegister ¶
func (f *Functionality) ExperimentsToRegister() []string
func (*Functionality) GetServerInfo ¶
func (f *Functionality) GetServerInfo(profile peer.CwtchPeer, serverOnion string) Server
GetServerInfo compiles all the information the UI might need regarding a particular server including any verified cryptographic keys
func (*Functionality) GetServerInfoList ¶
func (f *Functionality) GetServerInfoList(profile peer.CwtchPeer) []Server
GetServerInfoList compiles all the information the UI might need regarding all servers..
func (*Functionality) NotifySettingsUpdate ¶
func (f *Functionality) NotifySettingsUpdate(settings settings.GlobalSettings)
func (*Functionality) OnContactReceiveValue ¶
func (f *Functionality) OnContactReceiveValue(profile peer.CwtchPeer, conversation model.Conversation, path attr.ScopedZonedPath, value string, exists bool)
func (*Functionality) OnContactRequestValue ¶
func (f *Functionality) OnContactRequestValue(profile peer.CwtchPeer, conversation model.Conversation, eventID string, path attr.ScopedZonedPath)
func (*Functionality) OnEvent ¶
func (f *Functionality) OnEvent(ev event.Event, profile peer.CwtchPeer)
OnEvent handles File Sharing Hooks like Manifest Received and FileDownloaded
func (*Functionality) PublishServerUpdate ¶
func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer)
PublishServerUpdate serializes the current list of group servers and publishes an event with this information
type Server ¶
type Server struct { Onion string `json:"onion"` Identifier int `json:"identifier"` Status string `json:"status"` Description string `json:"description"` Keys []ServerKey `json:"keys"` SyncProgress SyncStatus `json:"syncProgress"` }
Server encapsulates the information needed to represent a server...
type SyncStatus ¶
type SyncStatus struct { StartTime string `json:"startTime"` LastMessageTime string `json:"lastMessageTime"` }
SyncStatus packages up server sync information...