2020-10-26 20:29:58 +00:00
|
|
|
package constants
|
|
|
|
|
|
|
|
import "cwtch.im/cwtch/event"
|
|
|
|
|
2020-11-04 21:41:10 +00:00
|
|
|
// The server manager defines its own events, most should be self-explanatory:
|
2020-10-26 20:29:58 +00:00
|
|
|
const (
|
2020-11-23 21:13:09 +00:00
|
|
|
NewServer = event.Type("NewServer")
|
2020-11-04 21:41:10 +00:00
|
|
|
|
|
|
|
// Force a UI update
|
2020-11-23 21:13:09 +00:00
|
|
|
ListServers = event.Type("ListServers")
|
2020-11-04 21:41:10 +00:00
|
|
|
|
|
|
|
// Takes an Onion, used to toggle off/on Server availability
|
2020-11-23 21:13:09 +00:00
|
|
|
StartServer = event.Type("StartServer")
|
|
|
|
StopServer = event.Type("StopServer")
|
2020-11-04 21:41:10 +00:00
|
|
|
|
|
|
|
// Takes an Onion and a AutoStartEnabled boolean
|
2020-11-23 21:13:09 +00:00
|
|
|
AutoStart = event.Type("AutoStart")
|
2020-11-04 21:41:10 +00:00
|
|
|
|
|
|
|
// Get the status of a particular server (takes an Onion)
|
2020-11-23 21:13:09 +00:00
|
|
|
CheckServerStatus = event.Type("CheckServerStatus")
|
|
|
|
ServerStatusUpdate = event.Type("ServerStatusUpdate")
|
2020-11-04 21:41:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2020-11-23 21:13:09 +00:00
|
|
|
AutoStartEnabled = event.Field("AutoStartEnabled")
|
|
|
|
)
|