Documentation ¶
Index ¶
- func ConfigUpdate(w http.ResponseWriter, r *http.Request)
- func Join(w http.ResponseWriter, r *http.Request)
- func Leave(w http.ResponseWriter, r *http.Request)
- func List(w http.ResponseWriter, r *http.Request)
- func Ping(w http.ResponseWriter, r *http.Request)
- func Refill(w http.ResponseWriter, r *http.Request)
- func Reset(w http.ResponseWriter, r *http.Request)
- type BootstrapData
- type Config
- type Peer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigUpdate ¶
func ConfigUpdate(w http.ResponseWriter, r *http.Request)
func Join ¶
func Join(w http.ResponseWriter, r *http.Request)
Join get information of the new member via http and stores it in Firestore
func Leave ¶
func Leave(w http.ResponseWriter, r *http.Request)
Leave get information of the leaving peer via http and deletes it in Firestore
Types ¶
type BootstrapData ¶
BootstrapData is a complete data structure
type Peer ¶
type Peer struct { ID string `json:"id,omitempty"` // UUID Name string `json:"name,omitempty"` // chat name Ip string `json:"ip,omitempty"` Port string `json:"port,omitempty"` Protocol string `json:"protocol,omitempty"` // "tcp" or "udp" // todo get rid of unused field status Status string `json:"status,omitempty"` Timestamp string `json:"timestamp,omitempty"` // Unix time in seconds }
Peer is the struct for the collection
Click to show internal directories.
Click to hide internal directories.