wings/router/websocket/message.go

24 lines
738 B
Go
Raw Normal View History

2020-04-06 01:00:33 +00:00
package websocket
const (
AuthenticationSuccessEvent = "auth success"
TokenExpiringEvent = "token expiring"
TokenExpiredEvent = "token expired"
AuthenticationEvent = "auth"
SetStateEvent = "set state"
SendServerLogsEvent = "send logs"
SendCommandEvent = "send command"
SendStatsEvent = "send stats"
2020-04-06 01:00:33 +00:00
ErrorEvent = "daemon error"
2020-09-27 16:09:34 +00:00
JwtErrorEvent = "jwt error"
2020-04-06 01:00:33 +00:00
)
type Message struct {
2020-09-13 05:12:23 +00:00
// The event to perform.
2020-04-06 01:00:33 +00:00
Event string `json:"event"`
// The data to pass along, only used by power/command currently. Other requests
// should either omit the field or pass an empty value as it is ignored.
Args []string `json:"args,omitempty"`
}