Files
tinyquiz/pkg/rtcomm/stateUpdate.go
2021-04-25 14:09:08 +02:00

29 lines
643 B
Go

package rtcomm
type StateUpdate struct {
Players []Player `json:"players,omitempty"`
Question *QuestionUpdate `json:"question,omitempty"`
Break *BreakUpdate `json:"break,omitempty"`
Results bool `json:"results,omitempty"`
}
type Player struct {
Organiser bool `json:"organiser"`
Name string `json:"name"`
}
type QuestionUpdate struct {
Title string `json:"title"`
RemainingTime uint64 `json:"remainingTime"`
Answers []Answer `json:"answers"`
}
type Answer struct {
ID string `json:"id"`
Title string `json:"title"`
}
type BreakUpdate struct {
//TODO add interim results
}