receive frontend logs using WS.

This commit is contained in:
Miroslav Šedivý
2021-09-09 22:08:39 +02:00
parent 83aa2dde41
commit afc79ed847
4 changed files with 32 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package event
const (
SYSTEM_INIT = "system/init"
SYSTEM_ADMIN = "system/admin"
SYSTEM_LOGS = "system/logs"
SYSTEM_DISCONNECT = "system/disconnect"
)

View File

@ -29,6 +29,14 @@ type SystemAdmin struct {
BroadcastStatus BroadcastStatus `json:"broadcast_status"`
}
type SystemLogs = []SystemLog
type SystemLog struct {
Level string `json:"level"`
Fields map[string]string `json:"fields"`
Message string `json:"message"`
}
type SystemDisconnect struct {
Message string `json:"message"`
}