add WS handlers

This commit is contained in:
m1k1o
2020-09-27 00:10:34 +02:00
parent b2afd1af6d
commit ea80f07bcd
9 changed files with 149 additions and 32 deletions

View File

@ -3,4 +3,8 @@ package types
type BroadcastManager interface {
Start()
Stop()
IsActive() bool
Create(url string)
Destroy()
GetUrl() string
}

View File

@ -36,6 +36,12 @@ const (
SCREEN_SET = "screen/set"
)
const (
BORADCAST_STATUS = "broadcast/status"
BORADCAST_CREATE = "broadcast/create"
BORADCAST_DESTROY = "broadcast/destroy"
)
const (
ADMIN_BAN = "admin/ban"
ADMIN_KICK = "admin/kick"

View File

@ -110,3 +110,14 @@ type ScreenConfigurations struct {
Event string `json:"event"`
Configurations map[int]types.ScreenConfiguration `json:"configurations"`
}
type BroadcastStatus struct {
Event string `json:"event"`
URL string `json:"url"`
IsActive bool `json:"isActive"`
}
type BroadcastCreate struct {
Event string `json:"event"`
URL string `json:"url"`
}