servers

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServerList is a json encoded list of servers
	ServerList = event.Field("ServerList")
)
View Source
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) DeleteServerInfo added in v0.23.0

func (f *Functionality) DeleteServerInfo(profile peer.CwtchPeer, serverOnion string) error

DeleteServer purges a server and all related keys from a profile

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, error)

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) error

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 ServerKey

type ServerKey struct {
	Type string `json:"type"`
	Key  string `json:"key"`
}

ServerKey packages up key information... TODO: Can this be merged with KeyBundle?

type SyncStatus

type SyncStatus struct {
	StartTime       string `json:"startTime"`
	LastMessageTime string `json:"lastMessageTime"`
}

SyncStatus packages up server sync information...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL