package streamer import "live-streamer/config" type Message interface { messageType() string } type StartMessage struct{} type StopMessage struct{} type AddVideoMessage struct { Path string } type RemoveVideoMessage struct { Path string } type NextVideoMessage struct{} type PrevVideoMessage struct{} type GetCurrentVideoMessage struct { Response chan string } type GetVideoListMessage struct { Response chan []config.InputItem } type GetVideoListPathMessage struct { Response chan []string } type GetCurrentIndexMessage struct { Response chan int } type CloseMessage struct{} func (m StartMessage) messageType() string { return "start" } func (m StopMessage) messageType() string { return "stop" } func (m AddVideoMessage) messageType() string { return "add" } func (m RemoveVideoMessage) messageType() string { return "remove" } func (m NextVideoMessage) messageType() string { return "next" } func (m PrevVideoMessage) messageType() string { return "prev" } func (m GetCurrentVideoMessage) messageType() string { return "getCurrentVideo" } func (m GetVideoListMessage) messageType() string { return "getVideoList" } func (m GetVideoListPathMessage) messageType() string { return "getVideoListPath" } func (m GetCurrentIndexMessage) messageType() string { return "getCurrentIndex" } func (m CloseMessage) messageType() string { return "close" }