groups

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 8 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 GroupFunctionality

type GroupFunctionality struct {
}

GroupFunctionality provides experiment gated server functionality

func ExperimentGate

func ExperimentGate(experimentMap map[string]bool) (*GroupFunctionality, error)

ExperimentGate returns GroupFunctionality if the experiment is enabled, and an error otherwise.

func (*GroupFunctionality) GetServerInfo

func (gf *GroupFunctionality) GetServerInfo(serverOnion string, profile peer.ReadContacts) Server

GetServerInfo compiles all the information the UI might need regarding a particular server including any verified cryptographic keys

func (*GroupFunctionality) GetServerInfoList

func (gf *GroupFunctionality) GetServerInfoList(profile ReadServerInfo) []Server

GetServerInfoList compiles all the information the UI might need regarding all servers..

func (*GroupFunctionality) HandleImportString

func (gf *GroupFunctionality) HandleImportString(peer peer.CwtchPeer, importString string) error

HandleImportString handles import strings for groups and servers

func (*GroupFunctionality) SendMessage

func (gf *GroupFunctionality) SendMessage(peer peer.CwtchPeer, handle string, message string) (string, error)

SendMessage is a deprecated api

func (*GroupFunctionality) ValidPrefix

func (gf *GroupFunctionality) ValidPrefix(importString string) bool

ValidPrefix returns true if an import string contains a prefix that indicates it contains information about a server or a group

type ReadServerInfo

type ReadServerInfo interface {
	peer.ReadContacts
	peer.ReadServers
}

ReadServerInfo is a meta-interface for reading information about servers..

type Server

type Server struct {
	Onion  string      `json:"onion"`
	Status string      `json:"status"`
	Keys   []ServerKey `json:"keys"`
}

type ServerKey

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

Jump to

Keyboard shortcuts

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